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

📄 pppradiuscomponentp.h

📁 Radius PNE 3.3 source code, running at more than vxworks6.x version.
💻 H
字号:
/* pppRadiusComponentP.h - RADIUS component private header file *//* Copyright 1999 -2006 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01g,12jan06,snd Removed declaration of IP_ADDRESS and INVALID_HANDLE, as                they are now added to radius_interface.h01f,10dec05,snd Added changes for RFC2865/2866 support01e,30aug05,snd Added changes required for IPv6 support01d,25feb05,ijm moved to radius directory; updated header files path01c,07aug03,rp  updating include path for random.h01b,26feb02,md  Bug fix - changes to radiusState to wait for outstanding                request to clear before destroying PPP stack.01a,18jul00,bsn fixes from openstack branch*/#ifndef __INCpppRadiusComponentPh#define __INCpppRadiusComponentPh#ifdef __cplusplusextern "C" {#endif#include "vxWorks.h"#include "tickLib.h"#include "logLib.h"#include "errnoLib.h"#include "stdio.h"#include "stdlib.h"#include "string.h"#include "ctype.h"#include "memLib.h"#include "netLib.h"#include "netBufLib.h"#include "inetLib.h"#include "pfw/pfw.h"#include "pfw/pfwStack.h"#include "pfw/pfwProfile.h"#include "pfw/pfwComponent.h"#include "pfw/pfwLayer.h"#include "pfw/pfwEvent.h"#include "pfw/pfwTimer.h"#include "pfw/pfwMemory.h"#include "ppp/kstart.h"#include "ppp/kppp.h"#include "private/ppp/vpppstr.h"#include "private/ppp/vlcpstr.h"#include "private/ppp/pppoptn.h"#include "private/ppp/pppstate.h"#include "ppp/magic.h"#include "ppp/interfaces/pppControlLayerInterface.h"#include "ppp/interfaces/pppControlProtocolInterface.h"#include "ppp/interfaces/pppRadiusInterface.h"#include "ppp/interfaces/pppIpInterfaces.h"#include "ppp/interfaces/adapterComponentInterfaces.h"#include "ppp/interfaces/lcpInterfaces.h"#include "ppp/pppInterfaces.h"#include "random.h"/* following are required to include radius_interface.h */typedef enum bool { true = 1, false = 0 } bool;	#include "wrn/radius/radius_interface.h"#include "wrn/radius/radius_utils.h"/* * Radius component information */typedef struct pppRadiusComponent    {    PFW_COMPONENT_OBJ                               component;    CONTROL_PROTOCOL_INTERFACE                      radiusControlInterface;    REMOTE_AUTHENTICATION_INTERFACE                 remoteAuthInterface;    REMOTE_ACCOUNTING_INTERFACE                     remoteAcctInterface;    } PPP_RADIUS_COMPONENT;/* * Radius component profile data structure */typedef struct pppRadiusProfileData    {    char * radius_serviceType;    char * radius_authenticationServer;    char * radius_accountingServer;    char * radius_nasIPaddress;#ifdef INET6    char * radius_nasIPv6address;#endif /* INET6 */    char * radius_nasIdentifier;    ULONG  radius_authenticationServer_retries;    ULONG  radius_accountingServer_retries;    } RADIUS_PROFILE_DATA;typedef struct pppRadiusStackData  RADIUS_STACK_DATA;/* * Radius attributes from RADIUS server */typedef struct pppRadiusReceivedAttributes    {    ULONG                              sessionTimeout;    ULONG                              idleTimeout;    ULONG                              ipNetMask;    ULONG                              destMask;    char                             * destination;    char                             * gateway;    char                             * class;    char                             * userName;    ULONG							   framedMTU;#ifdef INET6	    BYTE						 	   framedInterfaceId[8];    BYTE			       			   destPrefixLength;    char 						     * destinationPrefix;    char						     * gatewayIPv6;    char                             * framedIPv6Pool;#endif /* INET6 */	    } RADIUS_RECEIVED_ATTRIBUTES;/* * Radius server configuration information */typedef struct    {    char                             * IpAddress;#ifdef INET6    char			    			 * Ipv6Address;#endif /* INET6 */    UINT                               portNumber;    } RADIUS_SERVER_CONFIG;/* * List of radius servers */typedef struct pppRadiusServerConfig    {    ULONG                              serverFlag;    ULONG                              serverIndex;    ULONG                              serverCount;    char                             * serverString;    RADIUS_SERVER_CONFIG             * serverConfig;    RADIUS_SERVER_HANDLE               serverHandle;    } RADIUS_SERVER_DATA;#define RADIUS_SERVER_ANY              0x00000001#define RADIUS_SERVER_ALL              0x00000002#define RADIUS_SERVER_OTHER            0x00000004#define RADIUS_SERVER_TRYNEXT          0x00000008/* * PAP authentication related information */typedef struct papAuthenticationData    {    BYTE                               id;    enum RADIUS_CODE                   code;	enum RADIUS_CODE                   errorCallbackCode;    char                             * userName;    char                             * password;    PFW_OBJ                          * pfw;    PFW_PLUGIN_OBJ_STATE             * state;    RADIUS_STACK_DATA                * pStackData;    REMOTE_AUTHENTICATION_CALLBACKS  * radiusCallbacks;    RADIUS_ATTRIBUTE_LIST_HANDLE       attributeRequestHandle;    RADIUS_ATTRIBUTE_LIST_HANDLE       attributeResponseHandle;    } PAP_AUTHENTICATION_DATA;/* * CHAP authentication related information */typedef struct chapAuthenticationData    {    BYTE                               id;    enum RADIUS_CODE                   code;	enum RADIUS_CODE                   errorCallbackCode;    UINT                               responseLen;    UINT                               challengeLen;    char                             * userName;    char                             * response;    char                             * challenge;    PFW_OBJ                          * pfw;    PFW_PLUGIN_OBJ_STATE             * state;    RADIUS_STACK_DATA                * pStackData;    REMOTE_AUTHENTICATION_CALLBACKS  * radiusCallbacks;    RADIUS_ATTRIBUTE_LIST_HANDLE       attributeRequestHandle;    RADIUS_ATTRIBUTE_LIST_HANDLE       attributeResponseHandle;    } CHAP_AUTHENTICATION_DATA;/* * Accounting related information */typedef struct accountingData    {    enum RADIUS_CODE                   code;	enum RADIUS_CODE                   errorCallbackCode;    PFW_OBJ                          * pfw;    PFW_PLUGIN_OBJ_STATE             * state;    RADIUS_STACK_DATA                * pStackData;	RADIUS_SERVER_HANDLE			   acctServerHandle;    RADIUS_ATTRIBUTE_LIST_HANDLE       attributeRequestHandle;    RADIUS_ATTRIBUTE_LIST_HANDLE       attributeResponseHandle;    } ACCOUNTING_DATA;/* * Radius Component object information */struct pppRadiusStackData    {	ULONG							   numberOfRadiusPendingRequest;    ULONG                              radiusFlags;    ULONG                              radiusState;    ULONG                              serviceType;    ULONG                              framedProtocol;    ULONG                              acctStart;    ULONG                              acctStop;    ULONG                              nasIPaddress;    char                             * nasIdentifier;    char                               sessionId[20];    RADIUS_SERVER_DATA                 authServerData;    RADIUS_SERVER_DATA                 acctServerData;    RADIUS_REQUEST_CALLBACKS           papRequestCallbacks;    RADIUS_REQUEST_CALLBACKS           chapRequestCallbacks;    RADIUS_REQUEST_CALLBACKS           acctRequestCallbacks;    RADIUS_RECEIVED_ATTRIBUTES         rcvdAttributes;    PAP_AUTHENTICATION_DATA            papAuthData;    CHAP_AUTHENTICATION_DATA           chapAuthData;    ACCOUNTING_DATA                    acctData;    PFW_INTERFACE_STATE_PAIR           pppIpRoutesInterface;#ifdef INET6    struct in6_addr		       nasIPv6address;#endif /* INET6 */    PFW_INTERFACE_STATE_PAIR	       pppLinkStatusEntryInterface;    PFW_INTERFACE_STATE_PAIR           physicalPortInterface;    PFW_INTERFACE_STATE_PAIR           adapterStatisticsInterface;    PFW_PLUGIN_OBJ_CALLBACKS         * callbacks;	PFW_PLUGIN_OBJ_STATE			 * state;    };/* * Radius Flags definitions */#define RADIUS_ALLOW_AUTHENTICATION 0x00000001#define RADIUS_ALLOW_ACCOUNTING     0x00000002/* * Radius state definitions */#define RADIUS_PAP_AUTH_PENDING     0x00000001#define RADIUS_CHAP_AUTH_PENDING    0x00000002#define RADIUS_ACCT_STARTED         0x00010000#define RADIUS_ACCT_START_PENDING	0x00020000#define RADIUS_ACCT_STOP_PENDING	0x00040000#define RADIUS_ACCT_STOP_QUEUED		0x00080000#define RADIUS_ACCT_ERROR			0x00100000#define RADIUS_STACK_DEL_PENDING    0x80000000#ifdef __cplusplus}#endif#endif /* __INCpppRadiusComponentPh */

⌨️ 快捷键说明

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