1# Generated by h2py from stdin 2 3# Included from sys/ioccom.h 4IOCPARM_SHIFT = 13 5IOCPARM_MASK = ((1 << IOCPARM_SHIFT) - 1) 6def IOCPARM_LEN(x): return (((x) >> 16) & IOCPARM_MASK) 7 8def IOCBASECMD(x): return ((x) & ~(IOCPARM_MASK << 16)) 9 10def IOCGROUP(x): return (((x) >> 8) & 0xff) 11 12IOCPARM_MAX = (1 << IOCPARM_SHIFT) 13IOC_VOID = 0x20000000 14IOC_OUT = 0x40000000 15IOC_IN = 0x80000000 16IOC_INOUT = (IOC_IN|IOC_OUT) 17IOC_DIRMASK = (IOC_VOID|IOC_OUT|IOC_IN) 18 19# Included from sys/cdefs.h 20def __has_feature(x): return 0 21 22def __has_include(x): return 0 23 24def __has_builtin(x): return 0 25 26__GNUCLIKE___SECTION = 1 27__GNUCLIKE_CTOR_SECTION_HANDLING = 1 28__GNUCLIKE_BUILTIN_CONSTANT_P = 1 29__GNUCLIKE_BUILTIN_VARARGS = 1 30__GNUCLIKE_BUILTIN_STDARG = 1 31__GNUCLIKE_BUILTIN_VAALIST = 1 32__GNUC_VA_LIST_COMPATIBILITY = 1 33__GNUCLIKE_BUILTIN_NEXT_ARG = 1 34__GNUCLIKE_BUILTIN_MEMCPY = 1 35__CC_SUPPORTS_INLINE = 1 36__CC_SUPPORTS___INLINE = 1 37__CC_SUPPORTS___INLINE__ = 1 38__CC_SUPPORTS___FUNC__ = 1 39__CC_SUPPORTS_WARNING = 1 40__CC_SUPPORTS_VARADIC_XXX = 1 41__CC_SUPPORTS_DYNAMIC_ARRAY_INIT = 1 42def __P(protos): return protos 43 44def __STRING(x): return #x 45 46def __XSTRING(x): return __STRING(x) 47 48def __P(protos): return () 49 50def __STRING(x): return "x" 51 52def __aligned(x): return __attribute__((__aligned__(x))) 53 54def __section(x): return __attribute__((__section__(x))) 55 56def __aligned(x): return __attribute__((__aligned__(x))) 57 58def __section(x): return __attribute__((__section__(x))) 59 60def _Alignas(x): return alignas(x) 61 62def _Alignas(x): return __aligned(x) 63 64def _Alignof(x): return alignof(x) 65 66def _Alignof(x): return __alignof(x) 67 68def __nonnull(x): return __attribute__((__nonnull__(x))) 69 70def __predict_true(exp): return __builtin_expect((exp), 1) 71 72def __predict_false(exp): return __builtin_expect((exp), 0) 73 74def __predict_true(exp): return (exp) 75 76def __predict_false(exp): return (exp) 77 78def __format_arg(fmtarg): return __attribute__((__format_arg__ (fmtarg))) 79 80def __GLOBL(sym): return __GLOBL1(sym) 81 82def __FBSDID(s): return __IDSTRING(__CONCAT(__rcsid_,__LINE__),s) 83 84def __RCSID(s): return __IDSTRING(__CONCAT(__rcsid_,__LINE__),s) 85 86def __RCSID_SOURCE(s): return __IDSTRING(__CONCAT(__rcsid_source_,__LINE__),s) 87 88def __SCCSID(s): return __IDSTRING(__CONCAT(__sccsid_,__LINE__),s) 89 90def __COPYRIGHT(s): return __IDSTRING(__CONCAT(__copyright_,__LINE__),s) 91 92_POSIX_C_SOURCE = 199009 93_POSIX_C_SOURCE = 199209 94__XSI_VISIBLE = 700 95_POSIX_C_SOURCE = 200809 96__XSI_VISIBLE = 600 97_POSIX_C_SOURCE = 200112 98__XSI_VISIBLE = 500 99_POSIX_C_SOURCE = 199506 100_POSIX_C_SOURCE = 198808 101__POSIX_VISIBLE = 200809 102__ISO_C_VISIBLE = 1999 103__POSIX_VISIBLE = 200112 104__ISO_C_VISIBLE = 1999 105__POSIX_VISIBLE = 199506 106__ISO_C_VISIBLE = 1990 107__POSIX_VISIBLE = 199309 108__ISO_C_VISIBLE = 1990 109__POSIX_VISIBLE = 199209 110__ISO_C_VISIBLE = 1990 111__POSIX_VISIBLE = 199009 112__ISO_C_VISIBLE = 1990 113__POSIX_VISIBLE = 198808 114__ISO_C_VISIBLE = 0 115__POSIX_VISIBLE = 0 116__XSI_VISIBLE = 0 117__BSD_VISIBLE = 0 118__ISO_C_VISIBLE = 1990 119__POSIX_VISIBLE = 0 120__XSI_VISIBLE = 0 121__BSD_VISIBLE = 0 122__ISO_C_VISIBLE = 1999 123__POSIX_VISIBLE = 0 124__XSI_VISIBLE = 0 125__BSD_VISIBLE = 0 126__ISO_C_VISIBLE = 2011 127__POSIX_VISIBLE = 200809 128__XSI_VISIBLE = 700 129__BSD_VISIBLE = 1 130__ISO_C_VISIBLE = 2011 131CRYPTO_DRIVERS_INITIAL = 4 132CRYPTO_SW_SESSIONS = 32 133NULL_HASH_LEN = 16 134MD5_HASH_LEN = 16 135SHA1_HASH_LEN = 20 136RIPEMD160_HASH_LEN = 20 137SHA2_256_HASH_LEN = 32 138SHA2_384_HASH_LEN = 48 139SHA2_512_HASH_LEN = 64 140MD5_KPDK_HASH_LEN = 16 141SHA1_KPDK_HASH_LEN = 20 142HASH_MAX_LEN = SHA2_512_HASH_LEN 143NULL_HMAC_BLOCK_LEN = 64 144MD5_HMAC_BLOCK_LEN = 64 145SHA1_HMAC_BLOCK_LEN = 64 146RIPEMD160_HMAC_BLOCK_LEN = 64 147SHA2_256_HMAC_BLOCK_LEN = 64 148SHA2_384_HMAC_BLOCK_LEN = 128 149SHA2_512_HMAC_BLOCK_LEN = 128 150HMAC_MAX_BLOCK_LEN = SHA2_512_HMAC_BLOCK_LEN 151HMAC_IPAD_VAL = 0x36 152HMAC_OPAD_VAL = 0x5C 153NULL_BLOCK_LEN = 4 154DES_BLOCK_LEN = 8 155DES3_BLOCK_LEN = 8 156BLOWFISH_BLOCK_LEN = 8 157SKIPJACK_BLOCK_LEN = 8 158CAST128_BLOCK_LEN = 8 159RIJNDAEL128_BLOCK_LEN = 16 160AES_BLOCK_LEN = RIJNDAEL128_BLOCK_LEN 161CAMELLIA_BLOCK_LEN = 16 162EALG_MAX_BLOCK_LEN = AES_BLOCK_LEN 163AALG_MAX_RESULT_LEN = 64 164CRYPTO_ALGORITHM_MIN = 1 165CRYPTO_DES_CBC = 1 166CRYPTO_3DES_CBC = 2 167CRYPTO_BLF_CBC = 3 168CRYPTO_CAST_CBC = 4 169CRYPTO_SKIPJACK_CBC = 5 170CRYPTO_MD5_HMAC = 6 171CRYPTO_SHA1_HMAC = 7 172CRYPTO_RIPEMD160_HMAC = 8 173CRYPTO_MD5_KPDK = 9 174CRYPTO_SHA1_KPDK = 10 175CRYPTO_RIJNDAEL128_CBC = 11 176CRYPTO_AES_CBC = 11 177CRYPTO_ARC4 = 12 178CRYPTO_MD5 = 13 179CRYPTO_SHA1 = 14 180CRYPTO_NULL_HMAC = 15 181CRYPTO_NULL_CBC = 16 182CRYPTO_DEFLATE_COMP = 17 183CRYPTO_SHA2_256_HMAC = 18 184CRYPTO_SHA2_384_HMAC = 19 185CRYPTO_SHA2_512_HMAC = 20 186CRYPTO_CAMELLIA_CBC = 21 187CRYPTO_AES_XTS = 22 188CRYPTO_AES_ICM = 23 189CRYPTO_AES_NIST_GMAC = 24 190CRYPTO_AES_NIST_GCM_16 = 25 191CRYPTO_BLAKE2B = 29 192CRYPTO_BLAKE2S = 30 193CRYPTO_CHACHA20 = 31 194CRYPTO_SHA2_224_HMAC = 32 195CRYPTO_RIPEMD160 = 33 196CRYPTO_SHA2_224 = 34 197CRYPTO_SHA2_256 = 35 198CRYPTO_SHA2_384 = 36 199CRYPTO_SHA2_512 = 37 200CRYPTO_POLY1305 = 38 201CRYPTO_AES_CCM_CBC_MAC = 39 202CRYPTO_AES_CCM_16 = 40 203CRYPTO_ALGORITHM_MAX = 40 204CRYPTO_ALG_FLAG_SUPPORTED = 0x01 205CRYPTO_ALG_FLAG_RNG_ENABLE = 0x02 206CRYPTO_ALG_FLAG_DSA_SHA = 0x04 207CRYPTO_FLAG_HARDWARE = 0x01000000 208CRYPTO_FLAG_SOFTWARE = 0x02000000 209COP_ENCRYPT = 1 210COP_DECRYPT = 2 211COP_F_BATCH = 0x0008 212CRK_MAXPARAM = 8 213CRK_ALGORITM_MIN = 0 214CRK_MOD_EXP = 0 215CRK_MOD_EXP_CRT = 1 216CRK_DSA_SIGN = 2 217CRK_DSA_VERIFY = 3 218CRK_DH_COMPUTE_KEY = 4 219CRK_ALGORITHM_MAX = 4 220CRF_MOD_EXP = (1 << CRK_MOD_EXP) 221CRF_MOD_EXP_CRT = (1 << CRK_MOD_EXP_CRT) 222CRF_DSA_SIGN = (1 << CRK_DSA_SIGN) 223CRF_DSA_VERIFY = (1 << CRK_DSA_VERIFY) 224CRF_DH_COMPUTE_KEY = (1 << CRK_DH_COMPUTE_KEY) 225CRD_F_ENCRYPT = 0x01 226CRD_F_IV_PRESENT = 0x02 227CRD_F_IV_EXPLICIT = 0x04 228CRD_F_DSA_SHA_NEEDED = 0x08 229CRD_F_COMP = 0x0f 230CRD_F_KEY_EXPLICIT = 0x10 231CRYPTO_F_IMBUF = 0x0001 232CRYPTO_F_IOV = 0x0002 233CRYPTO_F_BATCH = 0x0008 234CRYPTO_F_CBIMM = 0x0010 235CRYPTO_F_DONE = 0x0020 236CRYPTO_F_CBIFSYNC = 0x0040 237CRYPTO_BUF_CONTIG = 0x0 238CRYPTO_BUF_IOV = 0x1 239CRYPTO_BUF_MBUF = 0x2 240CRYPTO_OP_DECRYPT = 0x0 241CRYPTO_OP_ENCRYPT = 0x1 242CRYPTO_HINT_MORE = 0x1 243def CRYPTO_SESID2HID(_sid): return (((_sid) >> 32) & 0x00ffffff) 244 245def CRYPTO_SESID2CAPS(_sid): return (((_sid) >> 32) & 0xff000000) 246 247def CRYPTO_SESID2LID(_sid): return (((u_int32_t) (_sid)) & 0xffffffff) 248 249CRYPTOCAP_F_HARDWARE = CRYPTO_FLAG_HARDWARE 250CRYPTOCAP_F_SOFTWARE = CRYPTO_FLAG_SOFTWARE 251CRYPTOCAP_F_SYNC = 0x04000000 252CRYPTO_SYMQ = 0x1 253CRYPTO_ASYMQ = 0x2 254