cryptodev.h (d074adf18be2801d2c19bf50677ff10495348fc5) | cryptodev.h (74d3f1b63dbea05038e966cf4bb69a01b0589500) |
---|---|
1/* $FreeBSD$ */ 2/* $OpenBSD: cryptodev.h,v 1.31 2002/06/11 11:14:29 beck Exp $ */ 3 4/*- 5 * The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu) 6 * Copyright (c) 2002-2006 Sam Leffler, Errno Consulting 7 * 8 * This code was written by Angelos D. Keromytis in Athens, Greece, in --- 411 unchanged lines hidden (view full) --- 420 * All error codes except EAGAIN 421 * indicate possible data corruption (as in, 422 * the data have been touched). On all 423 * errors, the crp_session may have changed 424 * (reset to a new one), so the caller 425 * should always check and use the new 426 * value on future requests. 427 */ | 1/* $FreeBSD$ */ 2/* $OpenBSD: cryptodev.h,v 1.31 2002/06/11 11:14:29 beck Exp $ */ 3 4/*- 5 * The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu) 6 * Copyright (c) 2002-2006 Sam Leffler, Errno Consulting 7 * 8 * This code was written by Angelos D. Keromytis in Athens, Greece, in --- 411 unchanged lines hidden (view full) --- 420 * All error codes except EAGAIN 421 * indicate possible data corruption (as in, 422 * the data have been touched). On all 423 * errors, the crp_session may have changed 424 * (reset to a new one), so the caller 425 * should always check and use the new 426 * value on future requests. 427 */ |
428#define crp_startcopy crp_flags |
|
428 int crp_flags; 429 430#define CRYPTO_F_CBIMM 0x0010 /* Do callback immediately */ 431#define CRYPTO_F_DONE 0x0020 /* Operation completed */ 432#define CRYPTO_F_CBIFSYNC 0x0040 /* Do CBIMM if op is synchronous */ 433#define CRYPTO_F_ASYNC_ORDERED 0x0100 /* Completions must happen in order */ 434#define CRYPTO_F_IV_SEPARATE 0x0200 /* Use crp_iv[] as IV. */ 435 --- 16 unchanged lines hidden (view full) --- 452 int crp_digest_start; /* Location of MAC/tag. Length is 453 * from the session. 454 */ 455 456 uint8_t crp_iv[EALG_MAX_BLOCK_LEN]; /* IV if IV_SEPARATE. */ 457 458 const void *crp_cipher_key; /* New cipher key if non-NULL. */ 459 const void *crp_auth_key; /* New auth key if non-NULL. */ | 429 int crp_flags; 430 431#define CRYPTO_F_CBIMM 0x0010 /* Do callback immediately */ 432#define CRYPTO_F_DONE 0x0020 /* Operation completed */ 433#define CRYPTO_F_CBIFSYNC 0x0040 /* Do CBIMM if op is synchronous */ 434#define CRYPTO_F_ASYNC_ORDERED 0x0100 /* Completions must happen in order */ 435#define CRYPTO_F_IV_SEPARATE 0x0200 /* Use crp_iv[] as IV. */ 436 --- 16 unchanged lines hidden (view full) --- 453 int crp_digest_start; /* Location of MAC/tag. Length is 454 * from the session. 455 */ 456 457 uint8_t crp_iv[EALG_MAX_BLOCK_LEN]; /* IV if IV_SEPARATE. */ 458 459 const void *crp_cipher_key; /* New cipher key if non-NULL. */ 460 const void *crp_auth_key; /* New auth key if non-NULL. */ |
461#define crp_endcopy crp_opaque |
|
460 461 void *crp_opaque; /* Opaque pointer, passed along */ 462 463 int (*crp_callback)(struct cryptop *); /* Callback function */ 464 465 struct bintime crp_tstamp; /* performance time stamp */ 466 uint32_t crp_seq; /* used for ordered dispatch */ 467 uint32_t crp_retw_id; /* --- 149 unchanged lines hidden (view full) --- 617int crypto_dispatch(struct cryptop *crp); 618#define CRYPTO_ASYNC_ORDERED 0x1 /* complete in order dispatched */ 619int crypto_dispatch_async(struct cryptop *crp, int flags); 620void crypto_dispatch_batch(struct cryptopq *crpq, int flags); 621#define CRYPTO_SYMQ 0x1 622int crypto_unblock(uint32_t, int); 623void crypto_done(struct cryptop *crp); 624 | 462 463 void *crp_opaque; /* Opaque pointer, passed along */ 464 465 int (*crp_callback)(struct cryptop *); /* Callback function */ 466 467 struct bintime crp_tstamp; /* performance time stamp */ 468 uint32_t crp_seq; /* used for ordered dispatch */ 469 uint32_t crp_retw_id; /* --- 149 unchanged lines hidden (view full) --- 619int crypto_dispatch(struct cryptop *crp); 620#define CRYPTO_ASYNC_ORDERED 0x1 /* complete in order dispatched */ 621int crypto_dispatch_async(struct cryptop *crp, int flags); 622void crypto_dispatch_batch(struct cryptopq *crpq, int flags); 623#define CRYPTO_SYMQ 0x1 624int crypto_unblock(uint32_t, int); 625void crypto_done(struct cryptop *crp); 626 |
627struct cryptop *crypto_clonereq(struct cryptop *crp, crypto_session_t cses, 628 int how); |
|
625void crypto_destroyreq(struct cryptop *crp); 626void crypto_initreq(struct cryptop *crp, crypto_session_t cses); 627void crypto_freereq(struct cryptop *crp); 628struct cryptop *crypto_getreq(crypto_session_t cses, int how); 629 630extern int crypto_usercrypto; /* userland may do crypto requests */ 631extern int crypto_devallowsoft; /* only use hardware crypto */ 632 --- 87 unchanged lines hidden --- | 629void crypto_destroyreq(struct cryptop *crp); 630void crypto_initreq(struct cryptop *crp, crypto_session_t cses); 631void crypto_freereq(struct cryptop *crp); 632struct cryptop *crypto_getreq(crypto_session_t cses, int how); 633 634extern int crypto_usercrypto; /* userland may do crypto requests */ 635extern int crypto_devallowsoft; /* only use hardware crypto */ 636 --- 87 unchanged lines hidden --- |