original files of m241

This commit is contained in:
neelimap
2026-07-30 11:19:44 +05:30
parent 170c2b3f3a
commit afc7070c1f
12254 changed files with 7655111 additions and 0 deletions
@@ -0,0 +1,315 @@
/* ip8021x_supp_legacy_api.h - 802.1X Supplicant Legacy API Support */
/*
******************************************************************************
* INTERPEAK API HEADER FILE
*
* Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: ip8021x_supp_legacy_api.h,v $ $Revision: 1.3 $
* $Source: /home/interpeak/CVSRoot/ip8021x/include/ip8021x_supp_legacy_api.h,v $
* $Author: myakan $ $Date: 2008-10-24 16:34:51 $
* $State: Exp $ $Locker: $
*
* Copyright 2008 Wind River Systems, Inc.
* Design and implementation by Medhat Yakan
******************************************************************************
*/
#ifndef IP8021X_SUPP_LEGACY_SPI_H
#define IP8021X_SUPP_LEGACY_SPI_H
/*
****************************************************************************
* 1 DESCRIPTION
****************************************************************************
*/
/*
DESCRIPTION
This library contains the legacy API support for the ip8021x supplicant.
*/
/*
****************************************************************************
* 2 CONFIGURATION
****************************************************************************
*/
/*
****************************************************************************
* 3 INCLUDE FILES
****************************************************************************
*/
#include <ipcom_type.h>
#include <ipcom_cstyle.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
****************************************************************************
* 4 DEFINES
****************************************************************************
*/
#define DOT1X_MODE_TYPE(mode) ((mode) & 0xff)
#define DOT1X_MODE_ENCRTYPE(mode) ((mode) & 0xff00)
#define DOT1X_MODE_AUTHTYPE(mode) ((mode) & 0xff0000)
#ifndef STATUS
#define STATUS int
#endif
#ifndef OK
#define OK (0)
#endif
#ifndef ERROR
#define ERROR (-1)
#endif
#ifndef BOOL
#define BOOL Ip_bool
#endif
/*
****************************************************************************
* 5 TYPES
****************************************************************************
*/
typedef enum {
DOT1X_MODE_WIRELINE = (0 << 0), /* Defines mode for wireline operation */
DOT1X_MODE_WIRELESS = (1 << 0), /* Defines mode for wireless operation */
DOT1X_MODE_ENCRTYPE_TKIP = (1 << 8), /* Defines mode for TKIP encr type, valid only with DOT1X_MODE_WIRELESS */
DOT1X_MODE_ENCRTYPE_CCMP = (2 << 8), /* Defines mode for CCMP encr type, valid only with DOT1X_MODE_WIRELESS */
DOT1X_MODE_AUTHTYPE_WPA = (1 << 16), /* Defines mode for WPA auth type, valid only with DOT1X_MODE_WIRELESS */
DOT1X_MODE_AUTHTYPE_WPA_PSK = (2 << 16), /* Defines mode for WPA-PSK auth type, valid only with DOT1X_MODE_WIRELESS */
DOT1X_MODE_AUTHTYPE_WPA2 = (4 << 16), /* Defines mode for WPA2 auth type, valid only with DOT1X_MODE_WIRELESS */
DOT1X_MODE_AUTHTYPE_WPA2_PSK = (8 << 16) /* Defines mode for WPA2-PSK auth type, valid only with DOT1X_MODE_WIRELESS */
} DOT1X_SUPP_MODE;
/*
****************************************************************************
* 6 FUNCTIONS
****************************************************************************
*/
/*******************************************************************************
*
* dot1xSuppIdGet - Retrieve supplicant ID
*
* This routine returns the supplicant ID corresponding to the specified interface.
*
* PARAMETERS:
* \is
* \i <name>
* device interface name, e.g. "wls"
*
* \i <unit>
* instance of the device
* \ie
*
* RETURNS:
* Supplicant ID or -1 on error
*
*/
IP_PUBLIC int dot1xSuppIdGet
(
char *name,
int unit
);
/*******************************************************************************
*
* dot1xSuppCreate - Create a new supplicant
*
* This routine allocates, configures and initializes a supplicant instance.
*
* PARAMETERS:
* \is
* \i <unit>
* instance of the device
*
* \i <pDevName>
* device interface name, e.g. "wls"
*
* \i <mode>
* Supplicant Mode, a combination of one or more of the following values:
* DOT1X_MODE_WIRELINE (backwards compatible value)
* DOT1X_MODE_WIRELESS (backwards compatible value)
* DOT1X_MODE_ENCRTYPE_TKIP
* DOT1X_MODE_ENCRTYPE_CCMP
* DOT1X_MODE_AUTHTYPE_WPA
* DOT1X_MODE_AUTHTYPE_WPA_PSK
* DOT1X_MODE_AUTHTYPE_WPA2
* DOT1X_MODE_AUTHTYPE_WPA2_PSK
*
* The following combinations are allowed to be passed as mode:
*
* DOT1X_MODE_WIRELINE (encr and auth types are irrelevant)
* DOT1X_MODE_WIRELESS (Uses current "ip8021x.encr_type" and "ip8021x.auth_type" values for encr and auth types)
*
* DOT1X_MODE_WIRELESS | DOT1X_MODE_AUTHTYPE_WPA (Uses "ip8021x.encr_type" values for encr type)
* DOT1X_MODE_WIRELESS | DOT1X_MODE_AUTHTYPE_WPA_PSK (Uses "ip8021x.encr_type" values for encr type
* DOT1X_MODE_WIRELESS | DOT1X_MODE_AUTHTYPE_WPA2 (Uses "ip8021x.encr_type" values for encr type)
* DOT1X_MODE_WIRELESS | DOT1X_MODE_AUTHTYPE_WPA2_PSK (Uses "ip8021x.encr_type" values for encr type)
*
* DOT1X_MODE_WIRELESS | DOT1X_MODE_ENCRTYPE_TKIP (Uses "ip8021x.auth_type" values for auth type)
* DOT1X_MODE_WIRELESS | DOT1X_MODE_ENCRTYPE_TKIP | DOT1X_MODE_AUTHTYPE_WPA
* DOT1X_MODE_WIRELESS | DOT1X_MODE_ENCRTYPE_TKIP | DOT1X_MODE_AUTHTYPE_WPA_PSK
* DOT1X_MODE_WIRELESS | DOT1X_MODE_ENCRTYPE_TKIP | DOT1X_MODE_AUTHTYPE_WPA2
* DOT1X_MODE_WIRELESS | DOT1X_MODE_ENCRTYPE_TKIP | DOT1X_MODE_AUTHTYPE_WPA2_PSK
*
* DOT1X_MODE_WIRELESS | DOT1X_MODE_ENCRTYPE_CCMP (Uses "ip8021x.auth_type" values for auth type)
* DOT1X_MODE_WIRELESS | DOT1X_MODE_ENCRTYPE_CCMP | DOT1X_MODE_AUTHTYPE_WPA
* DOT1X_MODE_WIRELESS | DOT1X_MODE_ENCRTYPE_CCMP | DOT1X_MODE_AUTHTYPE_WPA_PSK
* DOT1X_MODE_WIRELESS | DOT1X_MODE_ENCRTYPE_CCMP | DOT1X_MODE_AUTHTYPE_WPA2
* DOT1X_MODE_WIRELESS | DOT1X_MODE_ENCRTYPE_CCMP | DOT1X_MODE_AUTHTYPE_WPA2_PSK
*
* Any other value of mode passed other than the above combinations will be rejected.
*
* \ie
*
* WARNING:
* The values of the "ip8021x.if_name", "ip8021x.encr_type" and "ip8021x.auth_type" sysvars
* may be modified by this call.
* This function cannot be called concurrently from two different contexts or
* undesired results may occur. It is the caller's responsibility to ensure that no
* 2 istances of this function are running concurrently.
*
* RETURNS:
* Supplicant ID of the newly created supplicant or -1 on error.
*/
IP_PUBLIC int dot1xSuppCreate
(
int unit,
char * pDevName,
int mode
);
/*******************************************************************************
*
* dot1xSuppDelete - Delete a supplicant
*
* This routine destroys an existing supplicant instance and its corresponding
* configuration structure.
*
* PARAMETERS:
* \is
* \i <suppId>
* ID of supplicant to delete
* \ie
*
* RETURNS:
* OK or ERROR
*/
IP_PUBLIC STATUS dot1xSuppDelete
(
int suppId
);
/*******************************************************************************
*
* dot1xSuppConnect - Connect a supplicant
*
* This routine causes the supplicant to enter the CONNECTING state and
* send an EAPOL start to the authenticator to trigger an EAP exchange
* with the authentication server.
*
* PARAMETERS:
* \is
* \i <suppId>
* ID of supplicant to connect
* \ie
*
* RETURNS:
* OK or ERROR
*/
IP_PUBLIC STATUS dot1xSuppConnect(
int suppId
);
/*******************************************************************************
*
* dot1xSuppShutdownAll - Shutdown all supplicants
*
* This routine stops all supplicants and cleans up the ip8021x task.
*
* PARAMETERS:
* None.
*
* RETURNS:
* OK or ERROR
*/
IP_PUBLIC STATUS dot1xSuppShutdownAll(void);
/*******************************************************************************
*
* dot1xSuppShow - Display supplicant info
*
* This routine displays information on initialized supplicants.
*
* PARAMETERS:
* \is
* \i <verbose>
* verbosity level:
* 0: List supplicant configuration only.
* 1: Display status of each initialized supplicant.
* \ie
*
* RETURNS:
* OK or ERROR
*/
IP_PUBLIC STATUS dot1xSuppShow
(
BOOL verbose
);
/*******************************************************************************
*
* dot1xSuppGtcUserInput - Provide EAP-GTC Challenge response
*
* This routine is used to provide the supplicant with the EAP Challenge response
* when prompted for one during EAP-GTC authentication.
*
* PARAMETERS:
* \is
* \i <suppId>
* ID of supplicant to handle the challenge response
*
* \i <pUserInput>
* Pointer to a string containing the challenge response
*
* \ie
*
*
* RETURNS:
* OK or ERROR
*/
IP_PUBLIC STATUS dot1xSuppGtcUserInput
(
int suppId,
char *pUserInput
);
/*******************************************************************************
*
* dot1xLegacyApiList - List supplicant legacy APIs
*
* This routine displays a list of the supported 802.1x supplicant legacy APIs.
*
* PARAMETERS:
* None
* RETURNS:
* OK or ERROR
*/
IP_PUBLIC STATUS dot1xLegacyApiList(void);
#ifdef __cplusplus
}
#endif
#endif /* IP8021X_SUPP_LEGACY_SPI_H */