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