168 lines
4.7 KiB
C
168 lines
4.7 KiB
C
/*
|
|
******************************************************************************
|
|
* INTERPEAK INTERNAL API HEADER FILE
|
|
*
|
|
* Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: ipfreescale_h.h,v $ $Revision: 1.16.48.2 $
|
|
* $Source: /home/interpeak/CVSRoot/ipfreescale/src/ipfreescale_h.h,v $
|
|
* $Author: jsheng $ $Date: 2014-07-23 02:21:14 $
|
|
* $State: Exp $ $Locker: $
|
|
*
|
|
* INTERPEAK_COPYRIGHT_STRING
|
|
* Design and implementation by Markus Carlstedt <markus@interpeak.se>
|
|
******************************************************************************
|
|
*/
|
|
#ifndef IPFREESCALE_H_H
|
|
#define IPFREESCALE_H_H
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 1 DESCRIPTION
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 2 CONFIGURATION
|
|
****************************************************************************
|
|
*/
|
|
|
|
#include "ipfreescale_config.h"
|
|
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 3 INCLUDE FILES
|
|
****************************************************************************
|
|
*/
|
|
|
|
#include <ipcom_type.h>
|
|
#include <ipcom_cstyle.h>
|
|
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 4 DEFINES
|
|
****************************************************************************
|
|
*/
|
|
|
|
/* Syslog facility */
|
|
#ifdef IPCOM_SYSLOG_FACILITY
|
|
#undef IPCOM_SYSLOG_FACILITY
|
|
#endif
|
|
#define IPCOM_SYSLOG_FACILITY IPCOM_LOG_IPFREESCALE
|
|
|
|
/* Syslog priority */
|
|
#ifdef IPCOM_SYSLOG_PRIORITY
|
|
#undef IPCOM_SYSLOG_PRIORITY
|
|
#endif
|
|
#ifdef IP_DEBUG
|
|
#define IPCOM_SYSLOG_PRIORITY IPCOM_LOG_DEBUG
|
|
#else
|
|
#define IPCOM_SYSLOG_PRIORITY IPCOM_LOG_WARNING
|
|
#endif
|
|
|
|
#ifdef IP_VOLATILE
|
|
#undef IP_VOLATILE
|
|
#endif
|
|
#define IP_VOLATILE volatile
|
|
|
|
/* Unit support definitions */
|
|
#define IPFREESCALE_UNIT_MDEU (1)
|
|
#define IPFREESCALE_UNIT_DEU (1 << 1)
|
|
#define IPFREESCALE_UNIT_AESU (1 << 2)
|
|
#define IPFREESCALE_UNIT_AFEU (1 << 3)
|
|
#define IPFREESCALE_UNIT_RNG (1 << 4)
|
|
#define IPFREESCALE_UNIT_PKEU (1 << 5)
|
|
#define IPFREESCALE_UNIT_CCMP (1 << 6)
|
|
#define IPFREESCALE_UNIT_AESCCM (1 << 7)
|
|
#define IPFREESCALE_UNIT_CRC (1 << 8)
|
|
#define IPFREESCALE_UNIT_DMA (1 << 9)
|
|
|
|
|
|
/* Algorithm definitions */
|
|
#define IPFREESCALE_MD5_DIGEST_SIZE 16
|
|
#define IPFREESCALE_SHA1_DIGEST_SIZE 20
|
|
|
|
#define IPFREESCALE_DES_KEY_SIZE 8
|
|
#define IPFREESCALE_DES_IV_SIZE 8
|
|
#define IPFREESCALE_DES_BLOCK_SIZE 8
|
|
|
|
#define IPFREESCALE_3DES_KEY_SIZE 24
|
|
#define IPFREESCALE_3DES_IV_SIZE 8
|
|
#define IPFREESCALE_3DES_BLOCK_SIZE 8
|
|
|
|
#define IPFREESCALE_AES_IV_SIZE 16
|
|
#define IPFREESCALE_AES_BLOCK_SIZE 16
|
|
|
|
#ifdef IPFREESCALE_SEC2
|
|
#define IPFREESCALE_RC4_CTX_SIZE 259
|
|
#endif
|
|
#ifdef IPFREESCALE_SEC4
|
|
/* ARC4 context in SEC4 is 256B SBox, 2B I&J pointers
|
|
* But encrypted as "black key" using AES-ECB require
|
|
* multiple of 16B => 272 B */
|
|
#define IPFREESCALE_RC4_CTX_SIZE 272
|
|
#endif
|
|
|
|
|
|
#ifdef IPFREESCALE_COLDFIRE
|
|
#define IPFREESCALE_CRYPTO_BUFSIZE 32768
|
|
#endif
|
|
|
|
#ifdef IPFREESCALE_SEC2
|
|
#define IPFREESCALE_CRYPTO_BUFSIZE 65535
|
|
#endif
|
|
|
|
#ifdef IPFREESCALE_SEC4
|
|
/* Enlarged to 32 bits size to use extended length
|
|
* for job descriptors in SEC4 driver */
|
|
#define IPFREESCALE_CRYPTO_BUFSIZE 4294967295
|
|
#endif
|
|
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 5 TYPES
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
*===========================================================================
|
|
* Ipfreescale_coldfire_data
|
|
*===========================================================================
|
|
* Message digest context use for handle the init, update and final
|
|
* calls.
|
|
*/
|
|
typedef struct Ipfreescale_digest_context_struct
|
|
{
|
|
Ip_u8 *msg;
|
|
Ip_u32 length;
|
|
}
|
|
Ipfreescale_digest_context;
|
|
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 6 FUNCTIONS
|
|
****************************************************************************
|
|
*/
|
|
|
|
IP_GLOBAL int ipfreescale_cmd_freescale(int argc, char **argv);
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|
|
|
|
/*
|
|
****************************************************************************
|
|
* END OF FILE
|
|
****************************************************************************
|
|
*/
|