original files of m241
This commit is contained in:
@@ -0,0 +1,180 @@
|
||||
/* dot1xAuthLib.h - 802.1X Authenticator Definitions */
|
||||
|
||||
/* Copyright 2002-2003 Wind River Systems, Inc. */
|
||||
#include "copyright_wrs.h"
|
||||
|
||||
/*
|
||||
modification history
|
||||
--------------------
|
||||
01t,05apr10,kxr Coverity: VOID to void
|
||||
01s,12feb07,spw Bump version
|
||||
01r,07sep06,tfo Bump version to 2.3.2.
|
||||
01r,29sep06,dwb Bumping version numbers for fall06 release
|
||||
01q,13apr06,rb Update version numbers for Spring06 (SPR 120179)
|
||||
01p,23sep05,eja Break SNMP dependency
|
||||
01o,05aug05,eja Version 2.1 update
|
||||
01n,30may05,eja cleanup
|
||||
01m,17may05,eja Clean up header dependencies
|
||||
01l,04feb05,eja 80211i/WPA integration
|
||||
01k,17jan05,eja Add mode element to PAE object
|
||||
01j,03jan05,eja Cleanup
|
||||
01i,30apr03,ss added version info
|
||||
01h,21apr03,ggg File name, location change
|
||||
01g,21feb03,ggg Update copyright dates
|
||||
01f,22jan03,ggg Add key slots ifConfig members
|
||||
01e,31oct02,ggg Remove warning
|
||||
01d,13may02,mef to clean-up the code
|
||||
01c,25mar02,mef to add more configure option to interface
|
||||
01b,04mar02,mef to add interface configuration structure
|
||||
01a,26Dec01,mef written.
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
DESCRIPTION
|
||||
|
||||
This file contains the definitions that are used by different
|
||||
components of the system to interact with 802.1X Framework.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __INCdot1xAuthLibh
|
||||
#define __INCdot1xAuthLibh
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <vxWorks.h>
|
||||
|
||||
#define DOT1X_AUTH_VERSION "2.4"
|
||||
IMPORT UCHAR *dot1xAuthVersion;
|
||||
|
||||
/* typedefs */
|
||||
|
||||
/* Result code types used between 802.1X SNMP MIB
|
||||
* support and 1X Framework.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
DOT1X_AUTH_MIB_SET_DONE,
|
||||
DOT1X_AUTH_MIB_SET_WAIT,
|
||||
DOT1X_AUTH_MIB_SET_ERROR
|
||||
} DOT1X_AUTH_MIB_SET_STATUS;
|
||||
|
||||
/* Physical Network Interface Type */
|
||||
|
||||
typedef enum
|
||||
{
|
||||
DOT1X_AUTH_WIRED_IF = 1,
|
||||
DOT1X_AUTH_WIRELESS_IF
|
||||
} DOT1X_AUTH_IF_TYPE;
|
||||
|
||||
/* Interface Operation Type */
|
||||
|
||||
typedef enum
|
||||
{
|
||||
DOT1X_AUTH_WIRELESS = 1,
|
||||
DOT1X_AUTH_MULTIPLE_HOST,
|
||||
DOT1X_AUTH_SINGLE_HOST
|
||||
} DOT1X_AUTH_IF_OPR_TYPE;
|
||||
|
||||
/* WEP Key Types */
|
||||
|
||||
typedef enum
|
||||
{
|
||||
DOT1X_AUTH_40BIT_KEY = 1,
|
||||
DOT1X_AUTH_128BIT_KEY
|
||||
} DOT1X_AUTH_WEP_KEY_TYPE;
|
||||
|
||||
/* UCAST Key Support Types */
|
||||
|
||||
typedef enum
|
||||
{
|
||||
DOT1X_AUTH_NO_UCAST_KEY = 1,
|
||||
DOT1X_AUTH_FAKE_UCAST_KEY,
|
||||
DOT1X_AUTH_REAL_UCAST_KEY
|
||||
} DOT1X_AUTH_UCAST_SUPPORT;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* Interface Type */
|
||||
DOT1X_AUTH_IF_TYPE type;
|
||||
|
||||
/* Interface operation type. If interface is "WIRELESS", it must be
|
||||
* "WIRELESS". If interface is "WIRED", all three possible values can
|
||||
* be used. */
|
||||
DOT1X_AUTH_IF_OPR_TYPE operationType;
|
||||
|
||||
/* Inactivity Timeout for a port. (second) */
|
||||
int inactivityTimeout;
|
||||
|
||||
/* Connectivity Timeout for a port.(second) */
|
||||
int connectivityTimeout;
|
||||
|
||||
/* Following configuration fields are usable only for "WIRELESS"
|
||||
* interfaces. */
|
||||
|
||||
/* WEP Key Length */
|
||||
DOT1X_AUTH_WEP_KEY_TYPE wepKeyType;
|
||||
|
||||
/* Interface uses slot 0 as static WEP key. It may be used to support
|
||||
* MD5 supplicants. In that case 1X AUTH will only renew MCAST key in
|
||||
* slot 1. */
|
||||
BOOL staticWepKeySupport;
|
||||
|
||||
/* If the static WEP key will be supported, the key info must be
|
||||
*provided. */
|
||||
char *staticWepKey;
|
||||
|
||||
/* Renewal Timeout for MCAST Key. (second) */
|
||||
int mcastKeyPeriod;
|
||||
|
||||
/* UCAST Key support*/
|
||||
DOT1X_AUTH_UCAST_SUPPORT ucastKeySupportType;
|
||||
|
||||
/* Use session key as UCAST key or generate UCAST key and deliver it. */
|
||||
BOOL ucastKeyIsSessionKey;
|
||||
|
||||
/* Renewal Timeout in for UCAST Key. (second) */
|
||||
int ucastKeyPeriod;
|
||||
|
||||
/* Slots used for uCast */
|
||||
UINT32 ucastKeySlots;
|
||||
|
||||
/* Slots uses for mCast */
|
||||
UINT32 mcastKeySlots;
|
||||
} DOT1X_AUTH_IF_CONFIG;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
UINT32 taskPriority; /* 1X AUTH Task Priority*/
|
||||
UINT32 nbrOfPorts; /* number of estimated active ports at a moment */
|
||||
FUNCPTR eapolAsfAlert; /* pointer to the EAPOL_ASF_ALERT messages */
|
||||
int replayCntType; /* Replay Cnt Type in EAPOL-Key message */
|
||||
int ntpExecMode;
|
||||
char * ntpSvrIpAddr; /* NTP Sever IP Address */
|
||||
UINT16 ntpPort; /* NTP Port */
|
||||
FUNCPTR ntpTimeGetFunc;
|
||||
void * pMib;
|
||||
} DOT1X_AUTH_SYS_CONFIG;
|
||||
|
||||
/* definitions */
|
||||
|
||||
#define DOT1X_AUTH_INVALID_PORT_NBR 0
|
||||
|
||||
/* Function Prototypes */
|
||||
|
||||
IMPORT STATUS dot1xAuthInit (DOT1X_AUTH_SYS_CONFIG *);
|
||||
STATUS dot1xAuthPortListShow(int);
|
||||
IMPORT STATUS dot1xAuthShutdown(void);
|
||||
IMPORT STATUS dot1xAuthAttach(INT32, UCHAR *, DOT1X_AUTH_IF_CONFIG *);
|
||||
IMPORT STATUS dot1xAuthDetach(INT32, UCHAR *);
|
||||
IMPORT STATUS dot1xAuthTimerTimeoutSend (UINT32, int, UINT8);
|
||||
IMPORT DOT1X_AUTH_MIB_SET_STATUS dot1xAuthMibSet(UINT32, INT32, VOID *,
|
||||
UINT32, FUNCPTR, INT32);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __INCdot1xAuthLibh */
|
||||
@@ -0,0 +1,115 @@
|
||||
/* dot1xAuthSvrLib.h - IEEE 802.1X Authetication Server interface file*/
|
||||
|
||||
/* Copyright 2002-2003 Wind River Systems, Inc. */
|
||||
#include "copyright_wrs.h"
|
||||
|
||||
/*
|
||||
modification history
|
||||
--------------------
|
||||
01e,04dec06,dwb Cleanup from ipradius port
|
||||
01d,28nov06,dwb More changes for porting to ipradius
|
||||
01c,21nov06,dwb Changes for ipnet porting
|
||||
01b,21apr03,ggg File name, location change
|
||||
01a,08Feb02,myz written
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __INCdot1xAuthSvrLibh
|
||||
#define __INCdot1xAuthSvrLibh
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define DOT1X_AS_NORMAL_SHUTDOWN 0 /* Library shutdown type, normal shutdown*/
|
||||
#define DOT1X_AS_FORCE_SHUTDOWN 1 /* Library shutdown type, forced shutdown*/
|
||||
#define DOT1X_AS_STATION_ID_LEN 6 /* attribute station ID length */
|
||||
|
||||
#define DOT1X_AS_WIRELESS_PORT_TYPE 19 /* wireless port type */
|
||||
#define DOT1X_AS_ETHERNET_PORT_TYPE 15 /* ethernet port type */
|
||||
|
||||
#define DOT1X_AS_SESSION_SEND_KEY 1 /* key type, session send key */
|
||||
#define DOT1X_AS_SESSION_RCEV_KEY 2 /* key type, session receive key */
|
||||
|
||||
/* Result codes of the authentication server interface */
|
||||
|
||||
enum DOT1X_AS_CODE {
|
||||
DOT1X_AS_ACCESS_ACCEPT = 1, /* access accept code */
|
||||
DOT1X_AS_ACCESS_REJECT, /* access reject code */
|
||||
DOT1X_AS_ACCOUNTING_RESPONSE, /* accounting response code */
|
||||
DOT1X_AS_ACCESS_CHALLENGE, /* access challenge code */
|
||||
DOT1X_AS_SESSION_KEY, /* session key received code */
|
||||
DOT1X_AS_GEN_ERROR, /* general error code */
|
||||
DOT1X_AS_RETRY_LIMIT_REACHED, /* server retry limit reached code */
|
||||
DOT1X_AS_ACCESS_CANCELLED, /* radius server shut down */
|
||||
DOT1X_AS_ACCESS_TIMEOUT /* radius server timeout */
|
||||
};
|
||||
|
||||
/*** typedefs ***/
|
||||
|
||||
/* attribute header structure, attributes deliverd to user */
|
||||
|
||||
typedef struct {
|
||||
UINT16 type; /* what type of attribute */
|
||||
UINT16 len; /* length of the attribute, excluding header */
|
||||
} DOT1X_AS_ATTR_HEADER_T;
|
||||
|
||||
#define DOT1X_AS_ATTR_HEADER_LEN (sizeof(DOT1X_AS_ATTR_HEADER_T))
|
||||
|
||||
/* The required user supplied info for sending the EAP packet */
|
||||
|
||||
typedef struct {
|
||||
FUNCPTR pUserCallback; /* routine called when reply comes back */
|
||||
int mtu; /* MTU Max Tranmission Unit */
|
||||
char * pId; /* User Identification */
|
||||
int len; /* length of the User Identification */
|
||||
char callingId[DOT1X_AS_STATION_ID_LEN]; /* source MAC address */
|
||||
char calledId [DOT1X_AS_STATION_ID_LEN]; /* Port MAC address */
|
||||
UINT8 * pState; /* State attribute if there is one */
|
||||
int sLen; /* length of the previous field */
|
||||
int portType; /* port type */
|
||||
} DOT1X_AS_REQUIRED_INFO;
|
||||
|
||||
/* Radius server information */
|
||||
#define DOT1X_AUTH_MAX_RADIUS_SERVERS 2
|
||||
#define DOT1X_AUTH_TAG_LAST_SERVER 0
|
||||
#define DOT1X_AUTH_TAG_MORE_SERVERS 1
|
||||
|
||||
typedef struct {
|
||||
int domain;
|
||||
UINT16 port;
|
||||
char *server_addr;
|
||||
char *shared_secret;
|
||||
int password_type;
|
||||
UINT16 retry_count;
|
||||
UINT16 timeout;
|
||||
UINT8 endTag;
|
||||
} DOT1X_AUTH_RADIUS_SERVER_INFO;
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
|
||||
extern STATUS dot1xAuthServerEapMsgSend (UINT32 msgHandle, UINT8 * pMsg,
|
||||
int len,
|
||||
DOT1X_AS_REQUIRED_INFO * pInfo);
|
||||
|
||||
extern STATUS dot1xAuthServerLibInit (
|
||||
DOT1X_AUTH_RADIUS_SERVER_INFO *serverInfo);
|
||||
extern STATUS dot1xAuthServerLibRadiusServerSet(
|
||||
DOT1X_AUTH_RADIUS_SERVER_INFO *serverInfo);
|
||||
extern STATUS dot1xAuthServerLibShutDown (int);
|
||||
|
||||
#else
|
||||
|
||||
extern STATUS dot1xAuthServerEapMsgSend();
|
||||
extern STATUS dot1xAuthServerLibRadiusServerSet(
|
||||
DOT1X_AUTH_RADIUS_SERVER_INFO *serverInfo);
|
||||
extern STATUS dot1xAuthServerLibInit ();
|
||||
STATUS dot1xAuthServerLibShutDown ();
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __INCdot1xAuthSvrLibh */
|
||||
@@ -0,0 +1,61 @@
|
||||
/* dot1xAuthTimerLib.h - 802.1X Authenticator Timer Manager Definitions */
|
||||
|
||||
/* Copyright 2002-2003 Wind River Systems, Inc. */
|
||||
#include "copyright_wrs.h"
|
||||
|
||||
/*
|
||||
modification history
|
||||
--------------------
|
||||
01c,21apr03,ggg File name, location change
|
||||
01b,13may02,mef to clean up the code.
|
||||
01a,26Dec01,mef written.
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
DESCRIPTION
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __INCdot1xAuthTimerLibh
|
||||
#define __INCdot1xAuthTimerLibh
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "vxWorks.h"
|
||||
|
||||
/* typedefs */
|
||||
|
||||
typedef enum /* DOT1X Timer Types */
|
||||
/* For detailed Information
|
||||
check standard pg.34
|
||||
*/
|
||||
{
|
||||
DOT1X_AUTH_TIMER_AWHILE, /* aWhile Timer */
|
||||
DOT1X_AUTH_TIMER_QUIETWHILE, /* quietWhile Timer */
|
||||
DOT1X_AUTH_TIMER_REAUTHWHEN, /* reAuthWhen Timer */
|
||||
DOT1X_AUTH_TIMER_TXWHEN, /* txWhen Timer */
|
||||
DOT1X_AUTH_TIMER_INTERNAL /* 1x Auth Internal Timer */
|
||||
} DOT1X_AUTH_TIMER_TYPE;
|
||||
|
||||
/* definitions */
|
||||
|
||||
#define DOT1X_AUTH_TIMER_NBR 5 /* # of timers */
|
||||
|
||||
/* Function Prototypes */
|
||||
|
||||
IMPORT int dot1xAuthTimerManagerInit (INT32);
|
||||
IMPORT UINT32 dot1xAuthTimerTickGet ();
|
||||
IMPORT STATUS dot1xAuthTimerManagerShutdown ();
|
||||
IMPORT STATUS dot1xAuthTimerStart (UINT32, DOT1X_AUTH_TIMER_TYPE, UINT16, UINT8);
|
||||
IMPORT STATUS dot1xAuthTimerStop (UINT32, DOT1X_AUTH_TIMER_TYPE, UINT8);
|
||||
IMPORT STATUS dot1xAuthTimerStopAll (UINT32);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __INCdot1xAuthTimerLibh */
|
||||
|
||||
@@ -0,0 +1,241 @@
|
||||
/* dot1xCommonIoctls.h - 802.1X required shadow ioctls */
|
||||
|
||||
/* Copyright 2002-2004 Wind River Systems, Inc. */
|
||||
#include "copyright_wrs.h"
|
||||
|
||||
/*
|
||||
modification history
|
||||
--------------------
|
||||
01n,06jun08,mry Adding events for MIC ERROR notification from driver
|
||||
01m,20mar08,mry Removing old supplicant IOCTLs
|
||||
01l,31oct07,mry Fix for WIND00109746
|
||||
01k,09feb06,rb Added mSSID compatibility
|
||||
01j,31aug05,eja Fix for trace bug B0086
|
||||
01i,17may05,eja Add API
|
||||
01h,10may05,eja Add user mode ioctls
|
||||
01g,20apr05,eja Add Base6.1 ioctls
|
||||
01f,01mar05,rb Modified definitions of WIOCSDOT1XPORTSTATUS and
|
||||
WIOCSAUTHCALLBACK
|
||||
01e,23feb05,rb Updated to new IOCTL scheme for WED 2.1
|
||||
01d,04feb05,eja 80211i/WPA integration
|
||||
01c,18jan05,eja Add structure and enums for 802.11i integration
|
||||
01b,11jan05,rb Pruned IOCTL list for new integration with wireless driver
|
||||
01a,10jan05,rb Added new IOCTLs for 2.0 release
|
||||
*/
|
||||
|
||||
/*
|
||||
DESCRIPTION
|
||||
*/
|
||||
|
||||
#ifndef __INCdot1xCommonIoctlsh
|
||||
#define __INCdot1xCommonIoctlsh
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
* Public DOT11 IOCTL Commands
|
||||
*****************************************************************************/
|
||||
#include "sys/ioctl.h"
|
||||
|
||||
/* For backwards compatability, define the "user mode" IOCTL macros manually
|
||||
if they are not already defined. They should be defined in vxWorks 6.1 and
|
||||
higher */
|
||||
|
||||
#ifndef IOC_USER
|
||||
#define IOC_USER 0x8000
|
||||
#endif /* IOC_USER */
|
||||
|
||||
#ifndef _IOU
|
||||
#define _IOU(x,y) (IOC_USER | _IO(x,y))
|
||||
#endif
|
||||
|
||||
#ifndef _IORU
|
||||
#define _IORU(x,y,t) (IOC_USER | _IOR(x,y,t))
|
||||
#endif
|
||||
|
||||
#ifndef _IOWU
|
||||
#define _IOWU(x,y,t) (IOC_USER | _IOW(x,y,t))
|
||||
#endif
|
||||
|
||||
#ifndef _IOWRU
|
||||
#define _IOWRU(x,y,t) (IOC_USER | _IOWR(x,y,t))
|
||||
#endif
|
||||
|
||||
/* These are types used to define the access lengths in the "WIOC" IOCTLS */
|
||||
#define DOT11_ADDR_LEN 6
|
||||
typedef UINT8 DOT11_ADDR[DOT11_ADDR_LEN];
|
||||
|
||||
#define DOT11_PMK_LEN 32
|
||||
typedef UINT8 DOT11_PMK[DOT11_PMK_LEN];
|
||||
|
||||
/* 802.1X port status enumeration */
|
||||
typedef enum
|
||||
{
|
||||
DOT1X_PORTSTATUS_UNCONTROLLED = 0,
|
||||
DOT1X_PORTSTATUS_CLOSED,
|
||||
DOT1X_PORTSTATUS_OPEN
|
||||
} DOT1X_PORT_STATUS;
|
||||
|
||||
/* 802.1X port event type enumeration */
|
||||
typedef enum
|
||||
{
|
||||
DOT1X_PORTEVENT_ASSOCIATION = 1,
|
||||
DOT1X_PORTEVENT_DISASSOCIATION,
|
||||
DOT1X_MICERR_EVENT_PAIR,
|
||||
DOT1X_MICERR_EVENT_GROUP
|
||||
} DOT1X_PORT_EVENT;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
INT32 status; /* Port status */
|
||||
UINT8 macAddr[6]; /* mac address of the port */
|
||||
} _WRS_PACK_ALIGN(1) DOT1X_PORTSTATUS;
|
||||
|
||||
typedef struct param_s
|
||||
{
|
||||
UINT32 callback; /* Callback event handler */
|
||||
UINT32 cookie; /* private data */
|
||||
} _WRS_PACK_ALIGN(1) DOT1X_PARAMS;
|
||||
|
||||
typedef struct dot1xIntegration
|
||||
{
|
||||
UINT8 * pSuppAddr;
|
||||
int cmd;
|
||||
caddr_t data;
|
||||
} DOT11_DOT1X_INT;
|
||||
|
||||
/***************************************************************************
|
||||
* WIOCSCIPHPOL - Set the available cipher suites
|
||||
****************************************************************************/
|
||||
typedef unsigned long int DOT11_KEY_TYPE;
|
||||
#define DOT11_KEY_SEARCH (65536)
|
||||
#define DOT11_CIPHPOL_NONE 0
|
||||
#define DOT11_CIPHPOL_WEP40 (0x01)
|
||||
#define DOT11_CIPHPOL_WEP104 (0x02)
|
||||
#define DOT11_CIPHPOL_TKIP (0x04)
|
||||
#define DOT11_CIPHPOL_AES (0x08)
|
||||
#define DOT11_KEY_TYPE_NONE 0
|
||||
#define DOT11_KEY_TYPE_WEP40 DOT11_CIPHPOL_WEP40
|
||||
#define DOT11_KEY_TYPE_WEP104 DOT11_CIPHPOL_WEP104
|
||||
#define DOT11_KEY_TYPE_TKIP DOT11_CIPHPOL_TKIP
|
||||
#define DOT11_KEY_TYPE_AES DOT11_CIPHPOL_AES
|
||||
#define DOT11_WEP40_KEY_SIZE 5 /* Bytes */
|
||||
#define DOT11_WEP104_KEY_SIZE 13 /* Bytes */
|
||||
#define DOT11_AES_KEY_SIZE 16 /* Bytes */
|
||||
#define DOT11_TKIP_KEY_SIZE 32 /* 16 Bytes key, 2x8 bytes MIC */
|
||||
typedef struct
|
||||
{
|
||||
DOT11_KEY_TYPE keyType;
|
||||
INT32 keySlot; /* Keyslot key was installed to */
|
||||
UINT8 macAddr[DOT11_ADDR_LEN];
|
||||
union
|
||||
{
|
||||
UINT8 wep40[DOT11_WEP40_KEY_SIZE];
|
||||
UINT8 wep104[DOT11_WEP104_KEY_SIZE];
|
||||
UINT8 aes[DOT11_AES_KEY_SIZE];
|
||||
UINT8 tkip[DOT11_TKIP_KEY_SIZE];
|
||||
} type;
|
||||
UINT16 dummy_pad; /* Make struct 4 byte aligned to avoid compiler packing issues */
|
||||
} DOT11_KEY;
|
||||
|
||||
/* Added for broadcom driver support. Its been invented to align support
|
||||
* for both broadcom and atheros drivers. */
|
||||
#define DOT11_KEY_MAX_WEP_KEY_SIZE DOT11_WEP104_KEY_SIZE
|
||||
typedef struct
|
||||
{
|
||||
/* WARNING */
|
||||
/* This member must remain first as the atheros driver is expecting
|
||||
* a char * from passed through the ioctl */
|
||||
UINT8 wepKey[DOT11_KEY_MAX_WEP_KEY_SIZE];
|
||||
UINT8 keyLength;
|
||||
} DOT11_WEPKEY;
|
||||
|
||||
/* These parameters shadow the current wlan ioctls but are defined
|
||||
here to reduce unneeded intermodule dependencies */
|
||||
#define EIOCGWEPSTATUS (0x20f) /* Get WEP status*/
|
||||
#define EIOCSWEP (0x210) /* Enable/disable WEP */
|
||||
#define EIOCSWEPKEY0 (0x211) /* Set WEP key 0*/
|
||||
#define EIOCSWEPKEY1 (0x212) /* Set WEP key 1*/
|
||||
#define EIOCSWEPKEY2 (0x213) /* Set WEP key 2*/
|
||||
#define EIOCSWEPKEY3 (0x214) /* Set WEP key 3*/
|
||||
#define EIOCSWEPDEFAULTKEY (0x215) /* Set default WEP key */
|
||||
#define EIOCSWEPTYPE (0x21d) /* Set WEP type - 64 bit or 128 bit */
|
||||
#define EIOCSUNICASTKEYNUM (0x22b) /* Set unicast key slot */
|
||||
#define EIOCSMULTICASTKEYNUM (0x22d) /* Set multicast key slot */
|
||||
#define EIOCGCONNECTEDBSSID (0x220) /* Get BSSID */
|
||||
#define EIOCSAUTHCALLBACK (0x24B) /* Register authentication callback */
|
||||
#define EIOCS802DOT1XMODE (0x24C) /* Set 802.1x mode */
|
||||
#define EIOCG802DOT1XMODE (0x24D) /* Get 802.1x mode status */
|
||||
|
||||
#define WIOCGCONNECTEDBSSID _IORU('w', 0x006, DOT11_ADDR)
|
||||
#define WIOCGSECPOL _IORU('w', 0x051, UINT32)
|
||||
#define WIOCSPMK _IOWU('x', 0x03, DOT11_PMK)
|
||||
#define WIOCSAUTHCALLBACK _IOW('x', 0x02,DOT1X_PARAMS)
|
||||
#define WIOCSDRVCALLBACK _IOW('x', 0x05,DOT1X_PARAMS)
|
||||
#define WIOCSDOT1XPORTSTATUS _IOW('x', 0x01,DOT1X_PORTSTATUS)
|
||||
#define WIOCAPAIRWISEKEY _IOWU('w', 0x04f, DOT11_KEY)
|
||||
#define WIOCDPAIRWISEKEY _IOWU('w', 0x62, DOT11_ADDR)
|
||||
#define WIOCSENCRYPTTYPE _IOU('w', 0x016)
|
||||
#define WIOCDPAIRWISEKEY _IOWU('w', 0x62, DOT11_ADDR)
|
||||
#define WIOCDOT1XINT _IOWR('x', 0x04, DOT11_DOT1X_INT)
|
||||
|
||||
|
||||
#define ONEX_MODE_ENABLED (1)
|
||||
#define DOT11_40_BIT_KEY_SIZE (5) /* Num bytes in 40 bit key */
|
||||
#define DOT11_128_BIT_KEY_SIZE (13) /* Num bytes in 128 bit key */
|
||||
#define WLAN_WEP_ENABLED (TRUE) /* Use wep */
|
||||
#define WLAN_WEP_NUM_KEYS (4) /* Max number of static keys stored */
|
||||
#define WLAN_WEP_TYPE_64 (64) /* 40/64 bit encryption */
|
||||
#define WLAN_WEP_TYPE_128 (128) /* 104/128 bit encryption */
|
||||
#define DOT1X_80211_PMK_LEN (32)
|
||||
#define DOT1X_80211_ADDR_LEN (6)
|
||||
#define DOT1X_SECPOL_NONE (0)
|
||||
#define DOT1X_SECPOL_TSN (1)
|
||||
#define DOT1X_SECPOL_WPA (2)
|
||||
#define DOT1X_SECPOL_11i (4)
|
||||
|
||||
/* 802.1x user ioctls */
|
||||
typedef struct dot1x_rtp_args
|
||||
{
|
||||
void *arg0; /* The first argument is the device id */
|
||||
char arg1[256]; /* Each arg there after has 256 bytes allocated */
|
||||
char arg2[256];
|
||||
char arg3[256];
|
||||
char arg4[256];
|
||||
char arg5[256];
|
||||
char arg6[256];
|
||||
} DOT1X_RTP_ARGS;
|
||||
|
||||
/* Ioctl defines */
|
||||
|
||||
/* dot1xAuthServerLibInit() - Init authentication server */
|
||||
#define EIOCAUTHSVRLIBINIT _IORU('d', 0x00F, DOT1X_RTP_ARGS)
|
||||
|
||||
/* dot1xAuthServerLibShutDown() - Shutdown authentication server */
|
||||
#define EIOCAUTHSVRLIBSHUTDOWN _IORU('d', 0x010, DOT1X_RTP_ARGS)
|
||||
|
||||
/* dot1xAuthInit() - Shutdown authentication server */
|
||||
#define EIOCAUTHINIT _IORU('d', 0x020, DOT1X_RTP_ARGS)
|
||||
|
||||
/* dot1xAuthShutdown() - Shutdown authenticator */
|
||||
#define EIOCAUTHSHUTDOWN _IORU('d', 0x030, DOT1X_RTP_ARGS)
|
||||
|
||||
/* dot1xAuthAttach() - Attach to authenticator */
|
||||
#define EIOCAUTHATTACH _IORU('d', 0x040, DOT1X_RTP_ARGS)
|
||||
|
||||
/* dot1xAuthDetach() - Detach from authenticator */
|
||||
#define EIOCAUTHDETACH _IORU('d', 0x050, DOT1X_RTP_ARGS)
|
||||
|
||||
/* dot1xAuthWlanConfig() - Configure wlan device on authenticator */
|
||||
#define EIOCAUTHWLANCONFIG _IORU('d', 0x060, DOT1X_RTP_ARGS)
|
||||
|
||||
/* Virtual END driver init method - Base6.1 only */
|
||||
void *dot1xVirtEndDevInit(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __INCdot1xCommonIoctlsh */
|
||||
@@ -0,0 +1,69 @@
|
||||
/* dot1xDebugLibP.h - 802.1X debug header */
|
||||
|
||||
/* Copyright 2005-2006 Wind River Systems, Inc. */
|
||||
#include "copyright_wrs.h"
|
||||
|
||||
/*
|
||||
modification history
|
||||
--------------------
|
||||
01c,28sep05,eja Change enum DOT1X_ERROR_NONE to 0
|
||||
01b,23sep05,eja Add support for mschapv2, gtc, and md5 debugging areas
|
||||
01a,09sep05,eja Make debug call printf from logMsg
|
||||
*/
|
||||
|
||||
/*
|
||||
DESCRIPTION
|
||||
*/
|
||||
|
||||
#ifndef __INCdot1xDebugLibh
|
||||
#define __INCdot1xDebugLibh
|
||||
|
||||
#include <vxWorks.h>
|
||||
#include <stdio.h>
|
||||
|
||||
/* Dot1x debug levels */
|
||||
typedef enum
|
||||
{
|
||||
DOT1X_DEBUG_NONE = 0,
|
||||
DOT1X_DEBUG_FATAL,
|
||||
DOT1X_DEBUG_ERROR,
|
||||
DOT1X_DEBUG_INFO,
|
||||
DOT1X_DEBUG_FLOOD
|
||||
} DOT1X_DEBUG_LEVELS;
|
||||
|
||||
/* Dot1x debug areas */
|
||||
typedef enum
|
||||
{
|
||||
DOT1X_AREA_ALL = 0,
|
||||
DOT1X_AREA_INIT,
|
||||
DOT1X_AREA_SUPP,
|
||||
DOT1X_AREA_AUTH,
|
||||
DOT1X_AREA_LEAP,
|
||||
DOT1X_AREA_PEAP,
|
||||
DOT1X_AREA_TLS,
|
||||
DOT1X_AREA_TTLS,
|
||||
DOT1X_AREA_MSCHAPV2,
|
||||
DOT1X_AREA_MD5,
|
||||
DOT1X_AREA_GTC,
|
||||
DOT1X_AREA_EAPOL
|
||||
} DOT1X_DEBUG_AREAS;
|
||||
extern INT32 dot1xDebugArray[];
|
||||
|
||||
#define DOT1X_LOG(level, area, message) \
|
||||
if ((level) <= dot1xDebugArray[(area)]) printf message
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern STATUS dot1xDebugLevelSet
|
||||
(
|
||||
int area, /* Debug area to get level for */
|
||||
int level /* Debug level to set */
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __INCdot1xDebugLibh */
|
||||
@@ -0,0 +1,51 @@
|
||||
/* dot1xDesLib.h - IEEE 802.1X DES interface file*/
|
||||
|
||||
/* Copyright 2003 Wind River Systems, Inc. */
|
||||
#include "copyright_wrs.h"
|
||||
|
||||
/*
|
||||
modification history
|
||||
--------------------
|
||||
01a,21Apr03,ggg written
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __INCdot1xDesLibh
|
||||
#define __INCdot1xDesLibh
|
||||
|
||||
/*
|
||||
* this DES implementation derived from Phil Karn's public domain DES.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern"C" {
|
||||
#endif
|
||||
|
||||
#include "vxWorks.h"
|
||||
|
||||
typedef ULONG DES_KS[16][2]; /* Single-key DES key schedule */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int decrypt;
|
||||
DES_KS keysched;
|
||||
UCHAR iv[8];
|
||||
} DES_CTX;
|
||||
|
||||
#ifndef _EXCLUDE_PROTOTYPES_
|
||||
|
||||
void deskey (DES_KS, UCHAR *,int);
|
||||
void des (DES_KS, UCHAR *, UCHAR *);
|
||||
|
||||
#endif /* ifndef _EXCLUDE_PROTOTYPES_ */
|
||||
|
||||
IMPORT void dot1xDesKey(DES_KS , UCHAR *, int);
|
||||
IMPORT void dot1xDes(DES_KS, UCHAR *, UCHAR *);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __INCdot1xDesLibh */
|
||||
|
||||
@@ -0,0 +1,199 @@
|
||||
/* dot1xEapolLib.h - 802.1X EAPOL Definitions */
|
||||
|
||||
/* Copyright 2002-2005 Wind River Systems, Inc. */
|
||||
#include "copyright_wrs.h"
|
||||
|
||||
/*
|
||||
modification history
|
||||
--------------------
|
||||
01l,04apr10,kxr Coverity: VOID to void
|
||||
01k,09feb06,rb Added mSSID compatibility
|
||||
01j,18mar05,eja Added logging
|
||||
01i,03mar05,eja Fix prototype misspelling
|
||||
01h,01mar05,eja API change and file cleanup
|
||||
01g,04feb05,eja 80211i/WPA integration
|
||||
01f,12jan05,eja Add PAE MAC address for wireline mode
|
||||
01e,21dec04,eja Add function prototype
|
||||
01d,21apr03,ggg File name, location change
|
||||
01c,25apr02,mef to clean up the code
|
||||
01b,04mar02,mef to add EAPOL Header Len Macro
|
||||
01a,26Dec01,mef written.
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
DESCRIPTION
|
||||
|
||||
This file contains the definitions and the function prototype
|
||||
that is used by EAPOL (EAP Over LAN) protcol layer.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __INCdot1xEapolLibh
|
||||
#define __INCdot1xEapolLibh
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* vxworks types */
|
||||
#include <vxWorks.h>
|
||||
#include "dot1xMdLib.h"
|
||||
#include <end.h>
|
||||
|
||||
/* typedefs */
|
||||
|
||||
/* DOT1X EAPOL Msg Types - For detailed Information check standard
|
||||
pg.15 7.5.4 */
|
||||
typedef enum
|
||||
{
|
||||
DOT1X_EAPOL_EAP_PACKET = 0, /* EAP Packet */
|
||||
DOT1X_EAPOL_START, /* EAPOL Start */
|
||||
DOT1X_EAPOL_LOGOFF, /* EAPOL Logoff */
|
||||
DOT1X_EAPOL_KEY, /* EAPOL Key */
|
||||
DOT1X_EAPOL_ASF_ALERT /* EAPOL Encapsulated ASF Alert */
|
||||
} DOT1X_EAPOL_PACKET_TYPE;
|
||||
|
||||
/* definitions */
|
||||
#define SIOCGIFNDX _IOR('i', 130, struct ifreq) /* get ifnet index */
|
||||
#define SIOCGIFTYPE _IOR('i', 140, struct ifreq) /* get if type */
|
||||
#define SIOCGADDR EIOCGADDR /* get src MAC address */
|
||||
|
||||
/* dot1xEapol Receive Error Definitions */
|
||||
#define DOT1X_EAPOL_RCV_INVALID_FRAME_ERR ((UINT32)0)
|
||||
#define DOT1X_EAPOL_RCV_FRAME_LEN_ERR ((UINT32)1)
|
||||
|
||||
/* EAPOL Header Length */
|
||||
#define DOT1X_EAPOL_HEADER_LEN 4
|
||||
#define DOT1X_EAPOL_PROTOCOL_VERSION ((UCHAR)0x01)
|
||||
#define DOT1X_EAPOL_PAE_MAC "\x01\x80\xC2\x00\x00\x03"
|
||||
|
||||
/* EAPOL, especially key handling
|
||||
(duplicated from dot1xEapolMuxAdapter.c) */
|
||||
#define DOT1X_EAPOL_ETHERNET_HEADER_SIZE 4
|
||||
|
||||
/* Length of initialization vector for decrypting keys */
|
||||
#define DOT1X_EAPOL_KEY_IV_SIZE 16
|
||||
|
||||
/* Length of timestamp in EAPOL Key messages */
|
||||
#define DOT1X_EAPOL_KEY_REPLAY_COUNTER_SIZE 8
|
||||
|
||||
/* EAPOL Key type */
|
||||
#define EAPOL_KEY_TYPE_WB4 1
|
||||
|
||||
/* Size of an EAPOL key descriptor without the key
|
||||
1 + 2 + 8 + 16 + 1 + 16 */
|
||||
#define EAPOL_KEY_DESCRIPTOR_MIN_LENGTH 44
|
||||
|
||||
/* Biggest key to handle for 802.11 */
|
||||
#define EAPOL_KEY_MAX_SIZE DOT11_128_BIT_KEY_SIZE
|
||||
|
||||
/* Unicast keys have the high bit set in the index */
|
||||
#define EAPOL_KEY_UNICAST_BIT 0x80
|
||||
#define EAPOL_KEY_INDEX_MASK 0x7F
|
||||
|
||||
#define EAPOL_LOG_FATAL "(f) " __FILE__ " (s) FATAL (r) "
|
||||
#define EAPOL_LOG_ERROR "(f) " __FILE__ " (s) ERROR (r) "
|
||||
#define EAPOL_LOG_INFO "(f) " __FILE__ " (s) INFO (r) "
|
||||
#define EAPOL_LOG_DEBUG "(f) " __FILE__ " (s) DEBUG (r) "
|
||||
|
||||
/* EAPOL header */
|
||||
typedef struct
|
||||
{
|
||||
char version; /* EAPOL version */
|
||||
char type; /* DOT1X_EAPOL_PACKET_TYPE in dot1xEapolP.h */
|
||||
UINT16 length; /* EAPOL packet length */
|
||||
} _WRS_PACK_ALIGN(1) EAPOL_HDR;
|
||||
|
||||
/* EAPOL Key message */
|
||||
typedef struct
|
||||
{
|
||||
EAPOL_HDR eapolHeader; /* EAPOL header needed for signature */
|
||||
char type; /* Type of key: WB4 = 0x01 */
|
||||
UINT16 length; /* Key size in bytes */
|
||||
char replay[DOT1X_EAPOL_KEY_REPLAY_COUNTER_SIZE]; /* Replay */
|
||||
char iv[DOT1X_EAPOL_KEY_IV_SIZE]; /* IV for decrypt of key */
|
||||
char index; /* Key slot. Bit 8 set for unicast */
|
||||
char signature[HMAC_MD5_RESULT_LENGTH]; /* Signature HMAC-MD5 */
|
||||
char keyStart; /* Start key data. none: use session key */
|
||||
} _WRS_PACK_ALIGN(1) EAPOL_KEY_DESCRIPTOR;
|
||||
|
||||
/* Function Prototypes */
|
||||
IMPORT STATUS dot1xEapolSend
|
||||
(
|
||||
VOID *cookie,/* EAPOL cookie of device */
|
||||
char *dstMacAddress, /* destination MAC address */
|
||||
UINT16 packetType, /* EAPOL packet type */
|
||||
UINT16 packetLen, /* length of packet body */
|
||||
char* packetBody /* packet body */
|
||||
);
|
||||
IMPORT VOID *dot1xEapolFindByDevice
|
||||
(
|
||||
INT32 unit, /* unit number */
|
||||
char* name /* device name */
|
||||
);
|
||||
IMPORT STATUS dot1xEapolIoctl
|
||||
(
|
||||
VOID *cookie, /* cookie indentifying the device */
|
||||
INT32 cmd, /* command to pass to ioctl */
|
||||
caddr_t data /* data needed for command in cmd */
|
||||
);
|
||||
IMPORT STATUS dot1xEapolAuthIoctl
|
||||
(
|
||||
VOID *cookie, /* cookie indentifying the device */
|
||||
INT32 cmd, /* command to pass to ioctl */
|
||||
caddr_t data, /* data needed for command in cmd */
|
||||
UINT8 * pSuppAddr /* Address of the supplicant */
|
||||
);
|
||||
IMPORT STATUS dot1xEapolLibInit
|
||||
(
|
||||
void
|
||||
);
|
||||
IMPORT STATUS dot1xEapolInit
|
||||
(
|
||||
UINT32 eapolMaxUnits /* max bindings */
|
||||
);
|
||||
IMPORT STATUS dot1xEapolAttach
|
||||
(
|
||||
INT32 unit, /* unit number */
|
||||
char *name /* device name */
|
||||
);
|
||||
IMPORT STATUS dot1xEapolDetach
|
||||
(
|
||||
INT32 unit, /* unit number */
|
||||
char *name /* device name */
|
||||
);
|
||||
IMPORT STATUS dot1xEapolBind
|
||||
(
|
||||
INT32 unit,/* unit number of interface */
|
||||
char *name, /* device name of interface */
|
||||
VOID *cookie, /* cookie of Binding PDU */
|
||||
VOID *rcvRtn, /* function ptr to receive routine of protocol */
|
||||
VOID *rcvErrRtn /* function ptr to received packet error routine */
|
||||
);
|
||||
IMPORT STATUS dot1xEapolUnbind
|
||||
(
|
||||
INT32 unit, /* unit number */
|
||||
char *name, /* device name */
|
||||
VOID *rcvRtn /* pointer to receive routine of upper layer protocol */
|
||||
);
|
||||
IMPORT VOID *dot1xEapolIfNameGet
|
||||
(
|
||||
VOID *pObj /* Device object */
|
||||
);
|
||||
IMPORT INT32 dot1xEapolIfNumGet
|
||||
(
|
||||
VOID *pObj /* Device object */
|
||||
);
|
||||
STATUS dot1xEapolLogCallbackInstall
|
||||
(
|
||||
VOID *cookie,/* EAPOL cookie of device */
|
||||
VOID *callback /* Device object */
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __INCdot1xEapolLibh */
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
/* dot1xKeyLib.h - IEEE 802.1X Key management interface header file*/
|
||||
|
||||
/* Copyright 2002-2003 Wind River Systems, Inc. */
|
||||
#include "copyright_wrs.h"
|
||||
|
||||
/*
|
||||
modification history
|
||||
--------------------
|
||||
01c,21nov06,dwb Changes for ipnet porting
|
||||
01b,21apr03,ggg File name, location change
|
||||
01a,28Feb02,myz written
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __INCdot1xKeyLibh
|
||||
#define __INCdot1xKeyLibh
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*** defines ***/
|
||||
|
||||
/* dot1xKeyLibInit argument values */
|
||||
|
||||
#define DOT1X_KEY_TIME_ASYNC_MODE 0 /* run in asynchronise mode */
|
||||
#define DOT1X_KEY_TIME_SYNC_MODE 1 /* run in synchronise mode */
|
||||
|
||||
/*** typedefs ***/
|
||||
|
||||
typedef enum {
|
||||
DOT1X_AUTH_SNTP_COUNTER, /* Use NTP time value for the replay counter */
|
||||
DOT1X_AUTH_LOCAL_COUNTER /* Use local count value for the replay counter*/
|
||||
} DOT1X_AUTH_REPLAY_CNT_TYPE;
|
||||
|
||||
typedef struct {
|
||||
UINT8 * pKey; /* points to a key */
|
||||
int len; /* key length */
|
||||
} DOT1X_AUTH_GENERIC_KEY_DESC;
|
||||
|
||||
typedef struct {
|
||||
DOT1X_AUTH_GENERIC_KEY_DESC key; /* the key descriptor */
|
||||
UINT8 index; /* key index */
|
||||
} DOT1X_AUTH_WEP_KEY_DESC;
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
|
||||
extern STATUS dot1xAuthWepKeyGenerate (DOT1X_AUTH_GENERIC_KEY_DESC *,
|
||||
DOT1X_AUTH_GENERIC_KEY_DESC *);
|
||||
extern STATUS dot1xAuthEapolKeyPacketBuild (char *, UINT8,
|
||||
DOT1X_AUTH_GENERIC_KEY_DESC *,
|
||||
DOT1X_AUTH_WEP_KEY_DESC *);
|
||||
extern void dot1xKeyLibInit (DOT1X_AUTH_REPLAY_CNT_TYPE,int,char *, UINT16,
|
||||
FUNCPTR);
|
||||
extern void dot1xKeyNtpTimeServerSet (char *);
|
||||
extern void dot1xKeyNtpPortSet (UINT16);
|
||||
extern void dot1xKeyNtpTimeGetFuncSet (FUNCPTR);
|
||||
extern void dot1xKeyRandomKeySet (UINT8 *);
|
||||
extern void dot1xKeyRandomSeedSet (UINT8 *,int);
|
||||
extern void dot1xKeyNtpTimeGetAsync (void);
|
||||
extern void dot1xKeyNtpTimeGet (void);
|
||||
|
||||
#else
|
||||
|
||||
extern STATUS dot1xAuthWepKeyGenerate();
|
||||
extern STATUS dot1xAuthEapolKeyPacketBuild();
|
||||
extern void dot1xKeyLibInit();
|
||||
extern void dot1xKeyNtpTimeGetAsync ();
|
||||
extern void dot1xKeyNtpTimeGet ();
|
||||
extern void dot1xKeyNtpTimeServerSet();
|
||||
extern void dot1xKeyNtpPortSet();
|
||||
extern void dot1xKeyNtpTimeGetFuncSet();
|
||||
extern void dot1xKeyRandomSeedSet ();
|
||||
extern void dot1xKeyRandomKeySet ();
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* end #ifndef __INCdot1xKeyLibh */
|
||||
@@ -0,0 +1,38 @@
|
||||
/* dot1xMdLib.h - 802.1X supplicant message digest library header file */
|
||||
|
||||
/* Copyright 2003 Wind River Systems, Inc. */
|
||||
#include "copyright_wrs.h"
|
||||
|
||||
/*
|
||||
modification history
|
||||
--------------------
|
||||
01a,21apr03,ggg written.
|
||||
*/
|
||||
|
||||
#ifndef __INCdot1xMdLibh
|
||||
#define __INCdot1xMdLibh
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Algorithms: MD4 or MD5 */
|
||||
typedef enum
|
||||
{
|
||||
MD4 = 0x04,
|
||||
MD5 = 0x05
|
||||
} MD_ALGORITHM;
|
||||
|
||||
#define HMAC_MD5_RESULT_LENGTH 16 /* HMAC-MD5 result length */
|
||||
|
||||
/* Prototypes */
|
||||
extern void dot1xMd(unsigned char *, unsigned long, unsigned char *,
|
||||
MD_ALGORITHM);
|
||||
extern void dot1xHmacMd5(unsigned char *, int, unsigned char *, int,
|
||||
unsigned char *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __INCdot1xMdLibh */
|
||||
@@ -0,0 +1,56 @@
|
||||
/* dot1xMemPartLib.h - 802.1X memory partition specific library header */
|
||||
|
||||
/* Copyright 2002-2004 Wind River Systems, Inc. */
|
||||
#include "copyright_wrs.h"
|
||||
|
||||
/*
|
||||
modification history
|
||||
--------------------
|
||||
01g,26jul05,eja Add malloc macro
|
||||
01f,27jun05,eja Set released pointer to NULL.
|
||||
01e,25apr05,eja Remove setting released pointer to NULL to fix DIAB error
|
||||
01d,20apr05,eja Changes to DOT1X_FREE macro
|
||||
01c,28mar05,eja Increase minimum memory partition to 512KB
|
||||
01b,15dec04,eja Reduce the memory partition size from 1MB to 128KB
|
||||
01a,08dec04,eja Fix for Trace bug B004
|
||||
*/
|
||||
|
||||
/*
|
||||
DESCRIPTION
|
||||
*/
|
||||
|
||||
#ifndef __INCdot1xMemPartLibh
|
||||
#define __INCdot1xMemPartLibPh
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <memPartLib.h>
|
||||
|
||||
/* Macros for memory partition access */
|
||||
#define DOT1X_CALLOC(n,s) dot1xMemBlockCalloc(n,s)
|
||||
#define DOT1X_MALLOC(n,s) dot1xMemBlockMalloc(n,s)
|
||||
#define DOT1X_FREE(m) \
|
||||
{ \
|
||||
dot1xMemBlockFree((void*)m); \
|
||||
m = NULL; \
|
||||
}
|
||||
|
||||
/* Set the maximum memory size of the partition */
|
||||
#define DOT1X_MEM_PART_SZ_MAX (0x00080000) /* 512KB of memory max */
|
||||
#define DOT1X_MEM_PART_SZ_MIN (0x00010000) /* 64 KB memory min */
|
||||
#define DOT1X_MEM_PART_STATS_MODE (1) /* 1 - verbose partition stats */
|
||||
|
||||
STATUS dot1xMemPartLibInit(void);
|
||||
void * dot1xMemBlockCalloc(size_t, size_t);
|
||||
void * dot1xMemBlockMalloc(size_t, size_t);
|
||||
STATUS dot1xMemBlockFree(void *);
|
||||
STATUS dot1xMemPartShow(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __INCdot1xSuppLibPh */
|
||||
@@ -0,0 +1,365 @@
|
||||
/* dot1xMibLib.h - 802.1X MIB API to SNMP Agent header file */
|
||||
|
||||
/* Copyright 2002-2005 Wind River Systems, Inc. */
|
||||
#include "copyright_wrs.h"
|
||||
|
||||
/*
|
||||
modification history
|
||||
--------------------
|
||||
01d,22sep05,eja Add new structure to allow for IDE based module binding
|
||||
01c,05jul05,eja Add support for supplicant MIB
|
||||
01b,06jun02,myz changed name UINT64 to UINT64_S
|
||||
01a,15Jan02,myz written
|
||||
*/
|
||||
|
||||
#ifndef __INCdot1xMibLibh
|
||||
#define __INCdot1xMibLibh
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**** MIB variable IDs ****/
|
||||
|
||||
#define D1XM_VAR_PaeSystemAuth 0x10
|
||||
|
||||
/* Group IDs */
|
||||
|
||||
#define D1XM_VAR_PORT_ENTRY 0x100
|
||||
#define D1XM_VAR_AUTH_CFG_ENTRY 0x200
|
||||
#define D1XM_VAR_AUTH_STATS_ENTRY 0x300
|
||||
#define D1XM_VAR_AUTH_DIAG_ENTRY 0x400
|
||||
#define D1XM_VAR_AUTH_SESSION_ENTRY 0x500
|
||||
#define D1XM_VAR_SUPP_CFG_ENTRY 0x600
|
||||
#define D1XM_VAR_SUPP_STATS_ENTRY 0x700
|
||||
|
||||
/* PAE Port Variables */
|
||||
|
||||
#define D1XM_VAR_PaePortNumber 0x110
|
||||
#define D1XM_VAR_PaePortProtocolVersion 0x120
|
||||
#define D1XM_VAR_PaePortCapabilities 0x130
|
||||
#define D1XM_VAR_PaePortInitialize 0x140
|
||||
#define D1XM_VAR_PaePortReauthenticate 0x150
|
||||
|
||||
/* Authenticator Configuration variables */
|
||||
|
||||
#define D1XM_VAR_AuthPaeState 0x210
|
||||
#define D1XM_VAR_AuthBackendAuthState 0x220
|
||||
#define D1XM_VAR_AuthAdminControlledDirections 0x230
|
||||
#define D1XM_VAR_AuthOperControlledDirections 0x240
|
||||
#define D1XM_VAR_AuthAuthControlledPortStatus 0x250
|
||||
#define D1XM_VAR_AuthControlledPortControl 0x260
|
||||
#define D1XM_VAR_AuthQuietPeriod 0x270
|
||||
#define D1XM_VAR_AuthTxPeriod 0x280
|
||||
#define D1XM_VAR_AuthSuppTimeout 0x290
|
||||
#define D1XM_VAR_AuthServerTimeout 0x2A0
|
||||
#define D1XM_VAR_AuthMaxReq 0x2B0
|
||||
#define D1XM_VAR_AuthReauthPeriod 0x2C0
|
||||
#define D1XM_VAR_AuthReauthEnabled 0x2D0
|
||||
#define D1XM_VAR_AuthKeyTxEnabled 0x2E0
|
||||
|
||||
/* Authenticator Stats Variables */
|
||||
|
||||
#define D1XM_VAR_AuthEapolFramesRx 0x310
|
||||
#define D1XM_VAR_AuthEapolFramesTx 0x320
|
||||
#define D1XM_VAR_AuthEapolStartFramesRx 0x330
|
||||
#define D1XM_VAR_AuthEapolLogoffFramesRx 0x340
|
||||
#define D1XM_VAR_AuthEapolRespIdFramesRx 0x350
|
||||
#define D1XM_VAR_AuthEapolRespFramesRx 0x360
|
||||
#define D1XM_VAR_AuthEapolReqIdFramesTx 0x370
|
||||
#define D1XM_VAR_AuthEapolReqFramesTx 0x380
|
||||
#define D1XM_VAR_AuthInvalidEapolFramesRx 0x390
|
||||
#define D1XM_VAR_AuthEapLengthErrorFramesRx 0x3A0
|
||||
#define D1XM_VAR_AuthLastEapolFrameVersion 0x3B0
|
||||
#define D1XM_VAR_AuthLastEapolFrameSource 0x3C0
|
||||
|
||||
/* Authenticator Diagnostic Variables */
|
||||
|
||||
#define D1XM_VAR_AuthEntersConnecting 0x410
|
||||
#define D1XM_VAR_AuthEapLogoffsWhileConnecting 0x420
|
||||
#define D1XM_VAR_AuthEntersAuthenticating 0x430
|
||||
#define D1XM_VAR_AuthAuthSuccessWhileAuthenticating 0x440
|
||||
#define D1XM_VAR_AuthAuthTimeoutsWhileAuthenticating 0x450
|
||||
#define D1XM_VAR_AuthAuthFailWhileAuthenticating 0x460
|
||||
#define D1XM_VAR_AuthAuthReauthsWhileAuthenticating 0x470
|
||||
#define D1XM_VAR_AuthAuthEapStartsWhileAuthenticating 0x480
|
||||
#define D1XM_VAR_AuthAuthEapLogoffWhileAuthenticating 0x490
|
||||
#define D1XM_VAR_AuthAuthReauthsWhileAuthenticated 0x4A0
|
||||
#define D1XM_VAR_AuthAuthEapStartsWhileAuthenticated 0x4B0
|
||||
#define D1XM_VAR_AuthAuthEapLogoffWhileAuthenticated 0x4C0
|
||||
#define D1XM_VAR_AuthBackendResponses 0x4D0
|
||||
#define D1XM_VAR_AuthBackendAccessChallenges 0x4E0
|
||||
#define D1XM_VAR_AuthBackendOtherRequestsToSupplicant 0x4E2
|
||||
#define D1XM_VAR_AuthBackendNonNakResponsesFromSupplicant 0x4E4
|
||||
#define D1XM_VAR_AuthBackendAuthSuccesses 0x4E6
|
||||
#define D1XM_VAR_AuthBackendAuthFails 0x4E8
|
||||
|
||||
/* Authenticator Session Stats Variables */
|
||||
|
||||
#define D1XM_VAR_AuthSessionOctetsRx 0x510
|
||||
#define D1XM_VAR_AuthSessionOctetsTx 0x520
|
||||
#define D1XM_VAR_AuthSessionFramesRx 0x530
|
||||
#define D1XM_VAR_AuthSessionFramesTx 0x540
|
||||
#define D1XM_VAR_AuthSessionId 0x550
|
||||
#define D1XM_VAR_AuthSessionAuthenticMethod 0x560
|
||||
#define D1XM_VAR_AuthSessionTime 0x570
|
||||
#define D1XM_VAR_AuthSessionTerminateCause 0x580
|
||||
#define D1XM_VAR_AuthSessionUserName 0x590
|
||||
|
||||
/* Supplicant Configuration Varibles */
|
||||
|
||||
#define D1XM_VAR_SuppPaeState 0x610
|
||||
#define D1XM_VAR_SuppHeldPeriod 0x620
|
||||
#define D1XM_VAR_SuppAuthPeriod 0x630
|
||||
#define D1XM_VAR_SuppStartPeriod 0x640
|
||||
#define D1XM_VAR_SuppMaxStart 0x650
|
||||
|
||||
/* Supplicant Statistics Varibles */
|
||||
|
||||
#define D1XM_VAR_SuppEapolFramesRx 0x710
|
||||
#define D1XM_VAR_SuppEapolFramesTx 0x720
|
||||
#define D1XM_VAR_SuppEapolStartFramesTx 0x730
|
||||
#define D1XM_VAR_SuppEapolLogoffFramesTx 0x740
|
||||
#define D1XM_VAR_SuppEapolRespIdFramesTx 0x750
|
||||
#define D1XM_VAR_SuppEapolRespFramesTx 0x760
|
||||
#define D1XM_VAR_SuppEapolReqIdFramesRx 0x770
|
||||
#define D1XM_VAR_SuppEapolReqFramesRx 0x780
|
||||
#define D1XM_VAR_SuppInvalidEapolFramesRx 0x790
|
||||
#define D1XM_VAR_SuppEapLengthErrorFramesRx 0x7A0
|
||||
#define D1XM_VAR_SuppLastEapolFrameVersion 0x7B0
|
||||
#define D1XM_VAR_SuppLastEapolFrameSource 0x7C0
|
||||
|
||||
/* simple type used for imitating 64 bit integers */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
UINT32 high;
|
||||
UINT32 low;
|
||||
} UINT64_S;
|
||||
|
||||
/* SystemAuthControl */
|
||||
|
||||
typedef UINT32 D1XM_SYSTEM_AUTH_CONTROL;
|
||||
|
||||
/* dot1xPaePortTable 9.6.1 System Configuration */
|
||||
|
||||
typedef enum {
|
||||
D1XM_dot1xPaePortAuthCapable=0,
|
||||
D1XM_dot1xPaePortSuppCapable
|
||||
} D1XM_PORT_CAP_TYPE;
|
||||
|
||||
typedef struct {
|
||||
UINT32 paePortNumber; /* port number */
|
||||
UINT32 paePortProtocolVersion; /*Protocol version */
|
||||
UINT8 paePortCapabilities[1]; /*PAE capabilities */
|
||||
UINT8 padding[3];
|
||||
UINT32 paePortInitialize; /* Initialize Port */
|
||||
UINT32 paePortReauthenticate;
|
||||
} D1XM_PAE_PORT_ENTRY;
|
||||
|
||||
/* dot1xAuthConfigTable 9.4.1 Authenticator Configuration */
|
||||
|
||||
typedef struct {
|
||||
UINT32 paePortNumber; /* port number */
|
||||
UINT32 authPaeState; /* Authenticator PAE State */
|
||||
UINT32 authBackendAuthState; /* Backend Authentication State */
|
||||
UINT32 authAdminControlledDirections; /* AdminControlledDirections */
|
||||
UINT32 authOperControlledDirections; /* OperControlledDirections */
|
||||
UINT32 authAuthControlledPortStatus; /* AuthControlledPortStatus */
|
||||
UINT32 authAuthControlledPortControl; /* AuthControlledPortControl */
|
||||
UINT32 authQuietPeriod; /* quietPeriod */
|
||||
UINT32 authTxPeriod; /* txPeriod */
|
||||
UINT32 authSuppTimeout; /* suppTimeout */
|
||||
UINT32 authServerTimeout; /* serverTimeout */
|
||||
UINT32 authMaxReq; /* maxReq */
|
||||
UINT32 authReAuthPeriod; /* reAuthPeriod */
|
||||
UINT32 authReAuthEnabled; /* reAuthEnabled */
|
||||
UINT32 authKeyTxEnabled; /* KeyTransmissionEnabled */
|
||||
UINT32 PaePortReauthenticate; /* Reauthenticate */
|
||||
} D1XM_AUTH_CONFIG_ENTRY;
|
||||
|
||||
/* dot1xAuthStatsTable 9.4.2 Authenticator Statistics */
|
||||
|
||||
typedef struct {
|
||||
UINT32 paePortNumber; /* port number */
|
||||
UINT32 authEapolFramesRx; /* EAPOL frames received */
|
||||
UINT32 authEapolFramesTx; /* EAPOL frames transmitted */
|
||||
UINT32 authEapolStartFramesRx; /* EAPOL Start frames received */
|
||||
UINT32 authEapolLogoffFramesRx; /* EAPOL Logoff frames received */
|
||||
UINT32 authEapolRespIdFramesRx; /* EAP Resp/Id frames received */
|
||||
UINT32 authEapolRespFramesRx; /* EAP Response frames received */
|
||||
UINT32 authEapolReqIdFramesTx; /* EAP Req/Id frames transmitted */
|
||||
UINT32 authEapolReqFramesTx; /* EAP Request frames transmitted */
|
||||
UINT32 authInvalidEapolFramesRx; /* Invalid EAPOL frames received */
|
||||
UINT32 authEapLengthErrorFramesRx; /* EAP length error frames received */
|
||||
UINT32 authLastEapolFrameVersion; /* Last EAPOL frame version */
|
||||
UINT8 authLastEapolFrameSource[6]; /* Last EAPOL frame source */
|
||||
} D1XM_AUTH_STATS_ENTRY;
|
||||
|
||||
/* dot1xAuthDiagTable 9.4.3 Authenticator Diagnostics */
|
||||
|
||||
typedef struct {
|
||||
UINT32 paePortNumber; /* port number */
|
||||
UINT32 authEntersConnecting;
|
||||
UINT32 authEapLogoffsWhileConnecting;
|
||||
UINT32 authEntersAuthenticating;
|
||||
UINT32 authAuthSuccessWhileAuthenticating;
|
||||
UINT32 authAuthTimeoutsWhileAuthenticating;
|
||||
UINT32 authAuthFailWhileAuthenticating;
|
||||
UINT32 authAuthReauthsWhileAuthenticating;
|
||||
UINT32 authAuthEapStartsWhileAuthenticating;
|
||||
UINT32 authAuthEapLogoffWhileAuthenticating;
|
||||
UINT32 authAuthReauthsWhileAuthenticated;
|
||||
UINT32 authAuthEapStartsWhileAuthenticated;
|
||||
UINT32 authAuthEapLogoffWhileAuthenticated;
|
||||
UINT32 authBackendResponses;
|
||||
UINT32 authBackendAccessChallenges;
|
||||
UINT32 authBackendOtherRequestsToSupplicant;
|
||||
UINT32 authBackendNonNakResponsesFromSupplicant;
|
||||
UINT32 authBackendAuthSuccesses;
|
||||
UINT32 authBackendAuthFails;
|
||||
} D1XM_AUTH_DIAG_ENTRY;
|
||||
|
||||
/* dot1xAuthSessionStatsTable 9.4.4 Authenticator Session Statistics */
|
||||
|
||||
typedef struct {
|
||||
UINT32 paePortNumber; /* port number */
|
||||
UINT64_S authSessionOctetsRx; /* Session Octets Received */
|
||||
UINT64_S authSessionOctetsTx; /* Session Octets Transmitted */
|
||||
UINT32 authSessionFramesRx; /* Session Frames Received */
|
||||
UINT32 authSessionFramesTx; /* Session Frames Transmitted */
|
||||
char * authSessionId; /* Session Identifier */
|
||||
UINT32 authSessionAuthenticMethod; /* Session Authentication Method */
|
||||
UINT32 authSessionTime; /* Session Time */
|
||||
UINT32 authSessionTerminateCause; /* Session Terminate Cause */
|
||||
char * authSessionUserName; /* Session User Name */
|
||||
} D1XM_AUTH_SESSION_STATS_ENTRY;
|
||||
|
||||
/* dot1xSuppConfigTable 9.5.1 Supplicant Configuration */
|
||||
|
||||
typedef struct {
|
||||
UINT32 paePortNumber; /* port number */
|
||||
UINT32 suppPaeState; /* Supplicant PAE State */
|
||||
UINT32 suppHeldPeriod; /* heldPeriod */
|
||||
UINT32 suppAuthPeriod; /* authPeriod */
|
||||
UINT32 suppStartPeriod; /* startPeriod */
|
||||
UINT32 suppMaxStart; /* maxStart */
|
||||
} D1XM_SUPP_CONFIG_ENTRY;
|
||||
|
||||
/* dot1xSuppStatsTable 9.5.2 Supplicant Statistics */
|
||||
|
||||
typedef struct {
|
||||
UINT32 paePortNumber; /* port number */
|
||||
UINT32 suppEapolFramesRx; /* EAPOL frames received */
|
||||
UINT32 suppEapolFramesTx; /* EAPOL frames transmitted */
|
||||
UINT32 suppEapolStartFramesTx; /* EAPOL Start frames transmitted */
|
||||
UINT32 suppEapolLogoffFramesTx; /* EAPOL Logoff frames transmitted */
|
||||
UINT32 suppEapolRespIdFramesTx; /* EAP Resp/Id frames transmitted */
|
||||
UINT32 suppEapolRespFramesTx; /* EAP Response frames transmitted */
|
||||
UINT32 suppEapolReqIdFramesRx; /* EAP Req/Id frames received */
|
||||
UINT32 suppEapolReqFramesRx; /* EAP Request frames received */
|
||||
UINT32 suppInvalidEapolFramesRx; /* Invalid EAPOL frames received */
|
||||
UINT32 suppEapLengthErrorFramesRx; /* EAP length error frames received */
|
||||
UINT32 suppLastEapolFrameVersion; /* Last EAPOL frame version */
|
||||
UINT8 suppLastEapolFrameSource[6]; /* Last EAPOL frame source */
|
||||
} D1XM_SUPP_STATS_ENTRY;
|
||||
|
||||
/* dot1xPaeSystem group */
|
||||
|
||||
typedef struct {
|
||||
D1XM_SYSTEM_AUTH_CONTROL authControl;
|
||||
D1XM_PAE_PORT_ENTRY portTable;
|
||||
} D1XM_PAE_SYSTEM_GROUP;
|
||||
|
||||
/* dot1xPaeAuthenticator group */
|
||||
|
||||
typedef struct {
|
||||
D1XM_AUTH_CONFIG_ENTRY cfgTbl; /* configuration table */
|
||||
D1XM_AUTH_STATS_ENTRY statsTbl; /* STATS table */
|
||||
D1XM_AUTH_DIAG_ENTRY diagTbl; /* diagnostics table */
|
||||
D1XM_AUTH_SESSION_STATS_ENTRY sessionTbl; /* authenticator session stats*/
|
||||
} D1XM_PAE_AUTHENTICATOR_GROUP;
|
||||
|
||||
/* dot1xPaeSupplicant Group */
|
||||
|
||||
typedef struct {
|
||||
D1XM_SUPP_CONFIG_ENTRY cfgTbl; /* supplicant configuration table */
|
||||
D1XM_SUPP_STATS_ENTRY statsTbl; /* supplicant stats table */
|
||||
} D1XM_PAE_SUPPLICANT_GROUP;
|
||||
|
||||
typedef struct {
|
||||
D1XM_PAE_PORT_ENTRY portGrp;
|
||||
D1XM_PAE_AUTHENTICATOR_GROUP authGrp;
|
||||
D1XM_PAE_SUPPLICANT_GROUP suppGrp;
|
||||
} D1XM_PORT_ENTRY;
|
||||
|
||||
/* MIB handler type */
|
||||
typedef enum
|
||||
{
|
||||
DOT1X_AUTH_BINDING = 0, /* authenticator MIB */
|
||||
DOT1X_SUPP_BINDING /* supplicant MIB */
|
||||
} DOT1X_MIB_BIND;
|
||||
|
||||
/* MIB module attachment */
|
||||
typedef struct
|
||||
{
|
||||
STATUS (*pInstallHandler)();
|
||||
STATUS (*pRemoveHandler)();
|
||||
} DOT1X_MIB_MODULE_BINDING;
|
||||
|
||||
/* MIB handler structure */
|
||||
typedef struct
|
||||
{
|
||||
int (*get)(); /* get method */
|
||||
int (*next)(); /* next method */
|
||||
int (*set)(); /* set method */
|
||||
} DOT1X_MIB_FUNC_TABLE;
|
||||
|
||||
/* authenticator and supplicant MIB handlers */
|
||||
typedef struct
|
||||
{
|
||||
DOT1X_MIB_FUNC_TABLE *authHandler; /* authenticator table */
|
||||
DOT1X_MIB_FUNC_TABLE *suppHandler; /* supplicant table */
|
||||
} DOT1X_MIB_HANDLER;
|
||||
|
||||
|
||||
/* function declarations */
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
|
||||
STATUS dot1xMibVarGet (UINT32, int, void*, int);
|
||||
STATUS dot1xMibVarSet (UINT32, int, void*, int);
|
||||
STATUS dot1xMibNewPortAdded (UINT32,D1XM_AUTH_CONFIG_ENTRY *);
|
||||
STATUS dot1xMibPortRemoved (UINT32);
|
||||
STATUS dot1xMibSnmpEntryGet (UINT32, int, void*, int);
|
||||
STATUS dot1xMibSnmpNextEntryGet (UINT32 *, int, void*, int);
|
||||
STATUS dot1xMibSnmpVarSet (UINT32, UINT32, UINT32);
|
||||
STATUS dot1xMibNextPortVarGet (UINT32*, int, void*, int);
|
||||
STATUS dot1xMibLibInit(void);
|
||||
STATUS dot1xMibHandlerInstall(void *, int);
|
||||
STATUS dot1xMibHandlerRemove(void *, int);
|
||||
STATUS dot1xMibAdd(void);
|
||||
|
||||
#else /* __STDC__ */
|
||||
|
||||
STATUS dot1xMibVarGet ();
|
||||
STATUS dot1xMibVarSet ();
|
||||
STATUS dot1xMibNewPortAdded ();
|
||||
STATUS dot1xMibPortRemoved ();
|
||||
STATUS dot1xMibSnmpEntryGet ();
|
||||
STATUS dot1xMibSnmpNextEntryGet ();
|
||||
STATUS dot1xMibSnmpVarSet ();
|
||||
STATUS dot1xMibNextPortVarGet ();
|
||||
STATUS dot1xMibLibInit();
|
||||
STATUS dot1xMibHandlerInstall();
|
||||
STATUS dot1xMibHandlerRemove();
|
||||
STATUS dot1xMibAdd();
|
||||
#endif /* __STDC__ */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __INCdot1xMibLibh */
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/* dot1xVirtEndLib.h - Virtual End driver */
|
||||
|
||||
/* Copyright 2002-2005 Wind River Systems, Inc. */
|
||||
#include "copyright_wrs.h"
|
||||
|
||||
/*
|
||||
modification history
|
||||
--------------------
|
||||
01a,26Jul05,eja Created
|
||||
*/
|
||||
|
||||
#ifndef __INCdot1xVirtEndLibh
|
||||
#define __INCdot1xVirtEndLibh
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <vxWorks.h>
|
||||
|
||||
/* typedefs */
|
||||
typedef int (*VIRT_END_CFG_HANDLER)();
|
||||
|
||||
/* defines */
|
||||
#define DOT1X_VIRT_END_DEV_NAME "dot1x"
|
||||
#define DOT1X_VIRT_END_DEV_NAME_LEN (strlen(DOT1X_VIRT_END_DEV_NAME) + 1)
|
||||
|
||||
/* enums */
|
||||
typedef enum
|
||||
{
|
||||
DOT1X_VIRT_END_SUPP_HDLR = 0,
|
||||
DOT1X_VIRT_END_AUTH_HDLR
|
||||
} DOT1X_VIRT_END_HDLR;
|
||||
|
||||
void * dot1xVirtEndDevInit(void);
|
||||
STATUS dot1xVirtEndDevHandlerInstall(void *, int, void *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __INCdot1xVirtEndLibh */
|
||||
@@ -0,0 +1,37 @@
|
||||
/* dot1xWb4Lib.h - 802.1X supplicant stream cipher library header file */
|
||||
|
||||
/* Copyright 2003 Wind River Systems, Inc. */
|
||||
#include "copyright_wrs.h"
|
||||
|
||||
/*
|
||||
modification history
|
||||
--------------------
|
||||
01a,21apr03,ggg written.
|
||||
*/
|
||||
|
||||
#ifndef __INCdot1xWb4Libh
|
||||
#define __INCdot1xWb4Libh
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Stream cipher key format */
|
||||
typedef struct
|
||||
{
|
||||
unsigned char state[256];
|
||||
unsigned char x;
|
||||
unsigned char y;
|
||||
} DOT1X_WB4_KEY;
|
||||
|
||||
/* Prototypes */
|
||||
void dot1xWb4KeyGen(unsigned char *key_data_ptr, int key_data_len,
|
||||
DOT1X_WB4_KEY *key);
|
||||
void dot1xWb4(unsigned char *buffer_ptr, int buffer_len, DOT1X_WB4_KEY * key);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __INCdot1xWb4Libh */
|
||||
|
||||
Reference in New Issue
Block a user