亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? hifn7751var.h

?? linux下基于加密芯片的加密設備
?? H
字號:
/* $FreeBSD: src/sys/dev/hifn/hifn7751var.h,v 1.5 2004/10/15 00:36:07 sam Exp $ *//*	$OpenBSD: hifn7751var.h,v 1.42 2002/04/08 17:49:42 jason Exp $	*//* * Invertex AEON / Hifn 7751 driver * Copyright (c) 1999 Invertex Inc. All rights reserved. * Copyright (c) 1999 Theo de Raadt * Copyright (c) 2000-2001 Network Security Technologies, Inc. *			http://www.netsec.net * * Please send any comments, feedback, bug-fixes, or feature requests to * software@invertex.com. * * 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. * * Effort sponsored in part by the Defense Advanced Research Projects * Agency (DARPA) and Air Force Research Laboratory, Air Force * Materiel Command, USAF, under agreement number F30602-01-2-0537. * */#ifndef __HIFN7751VAR_H__#define __HIFN7751VAR_H__#ifdef __KERNEL__/* * Some configurable values for the driver.  By default command+result * descriptor rings are the same size.  The src+dst descriptor rings * are sized at 3.5x the number of potential commands.  Slower parts * (e.g. 7951) tend to run out of src descriptors; faster parts (7811) * src+cmd/result descriptors.  It's not clear that increasing the size * of the descriptor rings helps performance significantly as other * factors tend to come into play (e.g. copying misaligned packets). */#define	HIFN_D_CMD_RSIZE	24	/* command descriptors */#define	HIFN_D_SRC_RSIZE	((HIFN_D_CMD_RSIZE * 7) / 2)	/* source descriptors */#define	HIFN_D_RES_RSIZE	HIFN_D_CMD_RSIZE	/* result descriptors */#define	HIFN_D_DST_RSIZE	HIFN_D_SRC_RSIZE	/* destination descriptors *//* *  Length values for cryptography */#define HIFN_DES_KEY_LENGTH		8#define HIFN_3DES_KEY_LENGTH		24#define HIFN_MAX_CRYPT_KEY_LENGTH	HIFN_3DES_KEY_LENGTH#define HIFN_IV_LENGTH			8#define	HIFN_AES_IV_LENGTH		16#define HIFN_MAX_IV_LENGTH		HIFN_AES_IV_LENGTH/* *  Length values for authentication */#define HIFN_MAC_KEY_LENGTH		64#define HIFN_MD5_LENGTH			16#define HIFN_SHA1_LENGTH		20#define HIFN_MAC_TRUNC_LENGTH		12#define MAX_SCATTER 64/* * Data structure to hold all 4 rings and any other ring related data. */struct hifn_dma {	/*	 *  Descriptor rings.  We add +1 to the size to accomidate the	 *  jump descriptor.	 */	struct hifn_desc	cmdr[HIFN_D_CMD_RSIZE+1];	struct hifn_desc	srcr[HIFN_D_SRC_RSIZE+1];	struct hifn_desc	dstr[HIFN_D_DST_RSIZE+1];	struct hifn_desc	resr[HIFN_D_RES_RSIZE+1];	struct hifn_command	*hifn_commands[HIFN_D_RES_RSIZE];	u_char			command_bufs[HIFN_D_CMD_RSIZE][HIFN_MAX_COMMAND];	u_char			result_bufs[HIFN_D_CMD_RSIZE][HIFN_MAX_RESULT];	u_int32_t		slop[HIFN_D_CMD_RSIZE];	u_int64_t		test_src, test_dst;	/*	 *  Our current positions for insertion and removal from the desriptor	 *  rings. 	 */	int			cmdi, srci, dsti, resi;	volatile int		cmdu, srcu, dstu, resu;	int			cmdk, srck, dstk, resk;};struct hifn_session {	int hs_used;	u_int8_t hs_iv[HIFN_MAX_IV_LENGTH];};#define	HIFN_RING_SYNC(sc, r, i, f)					\	/* DAVIDM bus_dmamap_sync((sc)->sc_dmat, (sc)->sc_dmamap, (f)) */#define	HIFN_CMDR_SYNC(sc, i, f)	HIFN_RING_SYNC((sc), cmdr, (i), (f))#define	HIFN_RESR_SYNC(sc, i, f)	HIFN_RING_SYNC((sc), resr, (i), (f))#define	HIFN_SRCR_SYNC(sc, i, f)	HIFN_RING_SYNC((sc), srcr, (i), (f))#define	HIFN_DSTR_SYNC(sc, i, f)	HIFN_RING_SYNC((sc), dstr, (i), (f))#define	HIFN_CMD_SYNC(sc, i, f)						\	/* DAVIDM bus_dmamap_sync((sc)->sc_dmat, (sc)->sc_dmamap, (f)) */#define	HIFN_RES_SYNC(sc, i, f)						\	/* DAVIDM bus_dmamap_sync((sc)->sc_dmat, (sc)->sc_dmamap, (f)) */typedef int bus_size_t;/* * Holds data specific to a single HIFN board. */struct hifn_softc {	struct pci_dev		*sc_dev;	/* device backpointer */	spinlock_t		sc_mtx;		/* per-instance lock */	int			sc_num;		/* for multiple devs */	unsigned long		sc_bar0;	bus_size_t		sc_bar0_lastreg;/* bar0 last reg written */	unsigned long		sc_bar1;	bus_size_t		sc_bar1_lastreg;/* bar1 last reg written */	int			sc_irq;	u_int32_t		sc_dmaier;	u_int32_t		sc_drammodel;	/* 1=dram, 0=sram */	struct hifn_dma		*sc_dma;	dma_addr_t		sc_dma_physaddr;/* physical address of sc_dma */	int			sc_dmansegs;	int32_t			sc_cid;	int			sc_maxses;	int			sc_nsessions;	struct hifn_session	*sc_sessions;	int			sc_ramsize;	int			sc_flags;#define	HIFN_HAS_RNG		0x1	/* includes random number generator */#define	HIFN_HAS_PUBLIC		0x2	/* includes public key support */#define	HIFN_HAS_AES		0x4	/* includes AES support */#define	HIFN_IS_7811		0x8	/* Hifn 7811 part */#define	HIFN_IS_7956		0x10	/* Hifn 7956/7955 don't have SDRAM */	struct timer_list	sc_rngto;	/* for polling RNG */	struct timer_list	sc_tickto;	/* for managing DMA */	int			sc_rngfirst;	int			sc_rnghz;	/* RNG polling frequency */	int			sc_c_busy;	/* command ring busy */	int			sc_s_busy;	/* source data ring busy */	int			sc_d_busy;	/* destination data ring busy */	int			sc_r_busy;	/* result ring busy */	int			sc_active;	/* for initial countdown */	int			sc_needwakeup;	/* ops q'd wating on resources */	int			sc_curbatch;	/* # ops submitted w/o int */	int			sc_suspended;};#define	HIFN_LOCK(_sc)		spin_lock_irqsave(&(_sc)->sc_mtx, l_flags)#define	HIFN_UNLOCK(_sc)	spin_unlock_irqrestore(&(_sc)->sc_mtx, l_flags)/* *  hifn_command_t * *  This is the control structure used to pass commands to hifn_encrypt(). * *  flags *  ----- *  Flags is the bitwise "or" values for command configuration.  A single *  encrypt direction needs to be set: * *	HIFN_ENCODE or HIFN_DECODE * *  To use cryptography, a single crypto algorithm must be included: * *	HIFN_CRYPT_3DES or HIFN_CRYPT_DES * *  To use authentication is used, a single MAC algorithm must be included: * *	HIFN_MAC_MD5 or HIFN_MAC_SHA1 * *  By default MD5 uses a 16 byte hash and SHA-1 uses a 20 byte hash. *  If the value below is set, hash values are truncated or assumed *  truncated to 12 bytes: * *	HIFN_MAC_TRUNC * *  Keys for encryption and authentication can be sent as part of a command, *  or the last key value used with a particular session can be retrieved *  and used again if either of these flags are not specified. * *	HIFN_CRYPT_NEW_KEY, HIFN_MAC_NEW_KEY * *  session_num *  ----------- *  A number between 0 and 2048 (for DRAM models) or a number between  *  0 and 768 (for SRAM models).  Those who don't want to use session *  numbers should leave value at zero and send a new crypt key and/or *  new MAC key on every command.  If you use session numbers and *  don't send a key with a command, the last key sent for that same *  session number will be used. * *  Warning:  Using session numbers and multiboard at the same time *            is currently broken. * *  mbuf *  ---- *  Either fill in the mbuf pointer and npa=0 or *	 fill packp[] and packl[] and set npa to > 0 *  *  mac_header_skip *  --------------- *  The number of bytes of the source_buf that are skipped over before *  authentication begins.  This must be a number between 0 and 2^16-1 *  and can be used by IPsec implementers to skip over IP headers. *  *** Value ignored if authentication not used *** * *  crypt_header_skip *  ----------------- *  The number of bytes of the source_buf that are skipped over before *  the cryptographic operation begins.  This must be a number between 0 *  and 2^16-1.  For IPsec, this number will always be 8 bytes larger *  than the auth_header_skip (to skip over the ESP header). *  *** Value ignored if cryptography not used *** * */struct hifn_operand {	union {#if 0		struct mbuf *m;#endif		struct uio *io;	} u;	void		*map;	bus_size_t	mapsize;	int		nsegs;	struct {	    dma_addr_t  ds_addr;	    int         ds_len;	} segs[MAX_SCATTER];};struct hifn_command {	u_int16_t session_num;	u_int16_t base_masks, cry_masks, mac_masks;	u_int8_t iv[HIFN_MAX_IV_LENGTH], *ck, mac[HIFN_MAC_KEY_LENGTH];	int cklen;	int sloplen, slopidx;	struct hifn_operand src;	struct hifn_operand dst;	struct hifn_softc *softc;	struct cryptop *crp;	struct cryptodesc *enccrd, *maccrd;};#define	src_m		src.u.m#define	src_io		src.u.io#define	src_map		src.map#define	src_mapsize	src.mapsize#define	src_segs	src.segs#define	src_nsegs	src.nsegs#define	dst_m		dst.u.m#define	dst_io		dst.u.io#define	dst_map		dst.map#define	dst_mapsize	dst.mapsize#define	dst_segs	dst.segs#define	dst_nsegs	dst.nsegs/* *  Return values for hifn_crypto() */#define HIFN_CRYPTO_SUCCESS	0#define HIFN_CRYPTO_BAD_INPUT	(-1)#define HIFN_CRYPTO_RINGS_FULL	(-2)/************************************************************************** * *  Function:  hifn_crypto * *  Purpose:   Called by external drivers to begin an encryption on the *             HIFN board. * *  Blocking/Non-blocking Issues *  ============================ *  The driver cannot block in hifn_crypto (no calls to tsleep) currently. *  hifn_crypto() returns HIFN_CRYPTO_RINGS_FULL if there is not enough *  room in any of the rings for the request to proceed. * *  Return Values *  ============= *  0 for success, negative values on error * *  Defines for negative error codes are: *   *    HIFN_CRYPTO_BAD_INPUT  :  The passed in command had invalid settings. *    HIFN_CRYPTO_RINGS_FULL :  All DMA rings were full and non-blocking *                              behaviour was requested. * *************************************************************************//* * Convert back and forth from 'sid' to 'card' and 'session' */#define HIFN_CARD(sid)		(((sid) & 0xf0000000) >> 28)#define HIFN_SESSION(sid)	((sid) & 0x000007ff)#define HIFN_SID(crd,ses)	(((crd) << 28) | ((ses) & 0x7ff))#endif /* _KERNEL */struct hifn_stats {	u_int64_t hst_ibytes;	u_int64_t hst_obytes;	u_int32_t hst_ipackets;	u_int32_t hst_opackets;	u_int32_t hst_invalid;	u_int32_t hst_nomem;		/* malloc or one of hst_nomem_* */	u_int32_t hst_abort;	u_int32_t hst_noirq;		/* IRQ for no reason */	u_int32_t hst_totbatch;		/* ops submitted w/o interrupt */	u_int32_t hst_maxbatch;		/* max ops submitted together */	u_int32_t hst_unaligned;	/* unaligned src caused copy */	/*	 * The following divides hst_nomem into more specific buckets.	 */	u_int32_t hst_nomem_map;	/* bus_dmamap_create failed */	u_int32_t hst_nomem_load;	/* bus_dmamap_load_* failed */	u_int32_t hst_nomem_mbuf;	/* MGET* failed */	u_int32_t hst_nomem_mcl;	/* MCLGET* failed */	u_int32_t hst_nomem_cr;		/* out of command/result descriptor */	u_int32_t hst_nomem_sd;		/* out of src/dst descriptors */};#endif /* __HIFN7751VAR_H__ */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
老司机免费视频一区二区三区| 捆绑调教一区二区三区| 欧日韩精品视频| 美国av一区二区| 久久精品亚洲精品国产欧美| 91电影在线观看| 国产1区2区3区精品美女| 亚洲欧洲性图库| 日韩欧美www| 欧美久久久久久久久| 99国产精品久久| 国产激情视频一区二区在线观看| 成人欧美一区二区三区小说| 日韩精品一区二区在线观看| 91国在线观看| 成人的网站免费观看| 乱一区二区av| 日韩av一区二区在线影视| 国产精品的网站| 亚洲久草在线视频| 久久夜色精品国产欧美乱极品| 一本色道久久综合亚洲91| 韩国午夜理伦三级不卡影院| 亚洲视频一二区| 久久久久久久综合| 91精品国产综合久久香蕉麻豆| 成人a免费在线看| 老色鬼精品视频在线观看播放| 一区二区三区日韩欧美精品| 国产精品天天看| 久久久蜜桃精品| 欧美电视剧免费全集观看| 欧美日韩中文一区| 在线一区二区三区做爰视频网站| 成人国产电影网| 亚洲影视在线播放| 亚洲制服丝袜在线| 一区二区三区在线播| 一区二区中文视频| 亚洲欧洲一区二区在线播放| 成人免费在线视频观看| 亚洲欧洲韩国日本视频| 中文字幕一区二区三区四区 | 精品免费日韩av| 日韩精品中文字幕在线不卡尤物| 欧美一区二区三区爱爱| 精品国产3级a| 国产欧美精品国产国产专区| 国产精品麻豆一区二区| 亚洲天堂中文字幕| 欧美一区二区在线视频| 日韩欧美国产电影| 91精品国产欧美一区二区成人| 欧美日本精品一区二区三区| 欧美色倩网站大全免费| 免费久久精品视频| 蜜桃精品视频在线| 国产69精品久久久久毛片| 国产**成人网毛片九色| 91麻豆免费看| 欧美日韩mp4| 国产日产精品一区| 中文字幕一区二区视频| 午夜精品影院在线观看| 久久精品久久精品| 成人激情黄色小说| 8x福利精品第一导航| 日韩一卡二卡三卡国产欧美| 国产欧美精品一区二区三区四区 | 日本国产一区二区| 91精品国产综合久久国产大片 | 欧美日韩和欧美的一区二区| 日韩一区二区免费高清| 亚洲视频电影在线| 偷拍日韩校园综合在线| 国产乱一区二区| 成人福利视频在线看| 在线观看免费成人| 精品国产乱码久久久久久免费 | 国产精品国产a| 一区二区三区精品视频| 国产美女主播视频一区| 欧洲精品中文字幕| 日本一区二区三级电影在线观看| 亚洲欧美另类小说| 国产一区二区美女| 色8久久精品久久久久久蜜| 波多野结衣在线一区| 欧美亚洲国产bt| 精品欧美黑人一区二区三区| 亚洲裸体在线观看| 国产自产v一区二区三区c| 国产成人在线观看免费网站| 欧美美女一区二区在线观看| 欧美激情在线一区二区| 天天爽夜夜爽夜夜爽精品视频| 日韩福利电影在线| 国产在线视视频有精品| 日韩一区二区三区在线| 最新高清无码专区| 国产精品一区二区在线播放| 在线观看网站黄不卡| 中文字幕不卡在线观看| 国产毛片一区二区| 欧美三级在线看| 亚洲欧美综合网| 国产精品一区二区在线观看不卡 | 欧美日韩国产天堂| 国产精品国产三级国产三级人妇| 美国十次综合导航| 色综合久久88色综合天天6| 久久精品网站免费观看| 久久国产尿小便嘘嘘| 在线成人av网站| 午夜精品一区在线观看| 国内精品久久久久影院色| 精品女同一区二区| 日韩成人伦理电影在线观看| 678五月天丁香亚洲综合网| 一区二区免费在线播放| 国产精品一区在线观看你懂的| 26uuu亚洲| 国产一区二区在线免费观看| 日韩欧美精品三级| 久久www免费人成看片高清| 欧美大胆一级视频| 国产精品综合一区二区三区| 国产精品欧美一区二区三区| 成人app网站| 一区二区三区日韩欧美精品| av资源网一区| 亚洲成人av电影| 欧美亚洲尤物久久| 精品一区二区三区在线视频| 国产清纯美女被跳蛋高潮一区二区久久w | 蜜臀精品久久久久久蜜臀| 欧美成人精品福利| 国产宾馆实践打屁股91| 一区二区久久久久| 欧美日韩成人综合在线一区二区 | 欧美成人激情免费网| 国产一区二区在线看| 色偷偷久久一区二区三区| 亚洲444eee在线观看| 精品女同一区二区| 99国产精品国产精品久久| 久久亚洲一级片| 93久久精品日日躁夜夜躁欧美| 亚洲一二三专区| 精品美女一区二区| 亚洲国产你懂的| 3d动漫精品啪啪一区二区竹菊| 国产在线精品一区在线观看麻豆| 亚洲欧美日韩人成在线播放| 韩国成人在线视频| 亚洲视频一区二区免费在线观看| 欧美日韩精品一区视频| 丁香六月久久综合狠狠色| 国产欧美精品日韩区二区麻豆天美| 成人av免费在线播放| 丝袜亚洲精品中文字幕一区| xvideos.蜜桃一区二区| 色偷偷成人一区二区三区91| 亚洲午夜私人影院| 久久久青草青青国产亚洲免观| 欧美视频一区二区| 91影院在线免费观看| 婷婷一区二区三区| 一区二区三区在线免费观看| av中文字幕亚洲| 久久草av在线| 看片的网站亚洲| 亚洲成人一二三| 国产精品日日摸夜夜摸av| 久久精品亚洲一区二区三区浴池| 精品精品国产高清a毛片牛牛 | 午夜免费欧美电影| 免费成人在线观看| 欧美网站大全在线观看| 亚洲综合在线观看视频| 激情综合网最新| 精品久久久久久久人人人人传媒 | 久久久影院官网| 国内精品久久久久影院一蜜桃| 91精品综合久久久久久| 日韩成人伦理电影在线观看| 日韩天堂在线观看| 久久99精品视频| 国产午夜精品一区二区三区四区| 国产成人免费在线观看不卡| 国产精品萝li| 91免费看片在线观看| 无码av免费一区二区三区试看| 777色狠狠一区二区三区| 久久精品国产99久久6| 国产精品午夜电影| 欧美午夜在线一二页| 美女在线一区二区| 久久色中文字幕| 成人免费观看视频|