⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sec2_dpd_table.h

📁 freescale ppc sec2加解密单元驱动
💻 H
字号:
/**************************************************************************** * sec2_dpd_Table.h -- Request to DPD Table translation table **************************************************************************** * Copyright (c) Certicom Corp. 1996-2000.  All rights reserved * Copyright (c) 2003-2005 Freescale Semiconductor * All Rights Reserved. Proprietary and Confidential. * * NOTICE: The information contained in this file is proprietary * to Freescale Semiconductor, and is being made available to * Freescale's customers under strict license agreements. * Use or disclosure of this information is permissible only * under the terms of the existing license agreement. ***************************************************************************//* Revision History: * 1.0   Aug 24,2003 dgs - adapted from the final version of mpc18x *       May 24,2003 sec - re-ordered RRMODP pointers per T2.0 *       Aug 23,2004 sec - add TLS support *       Oct 15,2004 sec - reordered R2modN and MODEXP pointers * 1.1.0 Dec 05,2004 sec - prep for release * 1.1.1 Dec 16,2004 sec - remove old unused diagnostics *       Jan 17,2005 sec - add in missing IPSEC table entry * 1.2   Jan 27,2005 sec - fix up some obsolete names */#ifndef _SEC2_DPD_TABLE_H_#define _SEC2_DPD_TABLE_H_extern BOOLEAN ChkDesIvLen(unsigned long len);extern BOOLEAN ChkDesKeyLen(unsigned long len);extern BOOLEAN ChkDesStaticDataLen(unsigned long len);extern BOOLEAN ChkDesDataLen(unsigned long len);extern BOOLEAN ChkDesCryptLen(unsigned long len);extern BOOLEAN ChkDesCtxLen(unsigned long len);extern BOOLEAN ChkArcKeyLen(unsigned long len);extern BOOLEAN ChkArcCtxLen(unsigned long len);extern BOOLEAN ChkOptionalArcCtxLen(unsigned long len);extern BOOLEAN ChkEccLen(unsigned long len);extern BOOLEAN ChkAesIvLen(unsigned long len);extern BOOLEAN ChkAesKeyLen(unsigned long len);extern BOOLEAN ChkCcmpKeyLen(unsigned long len);/*! \enum FLD_TYPE    \brief A field can either be for reading from or writing to*/typedef enum {    Read,    Write,    Extent} FLD_TYPE;/*  DPD_FLD_DETAILS_ENTRY    Describes where and how a field in a request goes to a field in a DPD*/typedef struct{    char                    *txt;               /* Description of the                                                   field within the request                                                   a NULL indicates the end                                                   of field entries */    unsigned int            lenOffset1st;       /* Offset into request pointer                                                   for the initial length field */    unsigned int            lenOffsetNxt;       /* Offset into request pointer                                                   for the next length field                                                   Used when input points to                                                   output of the previous                                                   request */    unsigned int            ptrOffset1st;       /* Offset into request pointer                                                   for the initial data area */    unsigned int            extOffset;    FLD_TYPE                dataType;           /* Data type either:                                                   a "Read" or "Write" area */    BOOLEAN                 (*pFncSize)(unsigned long len); /* Pointer to                                                    function that checks                                                    whether the length is                                                    consistent with the request */} DPD_FLD_DETAILS_ENTRY;/*! \struct DPD_DETAILS_ENTRY    \brief Describes how a request is broken into a single DPD or a set of chained    DPDs*/typedef struct DPD_DETAILS_ENTRY{    unsigned long           opId;               /* Operation ID for entry */    char                    *txt;               /* Description of request                                                   a NULL indicates the end                                                   of the table */    unsigned long           sz;                 /* Size of request */    const unsigned long     *hdrDesc;           /* Descriptor Header */    unsigned int            lenOffsetBlockLen;  /* Offset into request pointer                                                   for total length of data */    DPD_FLD_DETAILS_ENTRY   fld[NUM_DPD_FLDS];} DPD_DETAILS_ENTRY;        /* Each request is enumerated here */#ifndef offsetof/*  offsetof(s,m)    Macro that identifies the byte offset of a field m within a structure s*/#define offsetof(s,m)   (size_t)&(((s *)0)->m)#endif#define STD_OFFSETS(s,l1,l2,p1,p2)  offsetof(s,l1), offsetof(s,l2),\                                    offsetof(s,p1), 0#define EXT_OFFSETS(s,l1,l2,p1,p2)  offsetof(s,l1), offsetof(s,l2),\                                    offsetof(s,p1), offsetof(s,p2)#define NULL_PTR_OFFSETS(s,l1,l2)   offsetof(s,l1), offsetof(s,l2), 0, 0#define ZERO_LEN_OFFSETS(s,p1,p2)   0, 0, offsetof(s,p1), offsetof(s,p2)#define ALL_ZERO_OFFSETS            0, 0, 0, 0extern DPD_DETAILS_ENTRY sec2_DpdDetails[];#endif  /*_SEC2_DPD_TABLE_H_*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -