00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #ifndef __PANA_DEFS_H__
00035 #define __PANA_DEFS_H__
00036
00037 #if _MSC_VER > 1000
00038 #pragma once
00039 #endif // _MSC_VER > 1000
00040
00049 #define PANA_VERSION 1
00050
00057 #define PANA_MAX_MESSAGE_SIZE 1024
00058
00067 #define PANA_MIN_MESSAGE_COUNT 100
00068
00074 #define PANA_LISTEN_PORT 1812
00075
00079 #define PANA_BIND_COUNT_MAX 2
00080
00084 #if !defined(WIN32)
00085 #define UCHAR unsigned char
00086 #endif
00087
00091 #define PANA_MTYPE_DISCOVER 0x01
00092 #define PANA_MTYPE_START 0x02
00093 #define PANA_MTYPE_AUTH 0x03
00094 #define PANA_MTYPE_BIND 0x04
00095 #define PANA_MTYPE_REAUTH 0x05
00096 #define PANA_MTYPE_TERM 0x06
00097 #define PANA_MTYPE_ERROR 0x07
00098
00102 #define PANA_PCAP_UNKNOWN 0
00103 #define PANA_PCAP_L2 1
00104 #define PANA_PCAP_IPSEC 2
00105
00109 #define PANA_SUCCESS 2001
00110 #define PANA_AUTHENTICATION_REJECTED 4001
00111 #define PANA_AUTHORIZATION_REJECTED 5003
00112
00116 #define PANA_MESSAGE_UNSUPPORTED 3001
00117 #define PANA_UNABLE_TO_DELIVER 3002
00118 #define PANA_INVALID_HDR_BITS 3008
00119 #define PANA_INVALID_AVP_BITS 3009
00120 #define PANA_AVP_UNSUPPORTED 5001
00121 #define PANA_UNKNOWN_SESSION_ID 5002
00122 #define PANA_INVALID_AVP_VALUE 5004
00123 #define PANA_MISSING_AVP 5005
00124 #define PANA_RESOURCES_EXCEEDED 5006
00125 #define PANA_CONTRADICTING_AVPS 5007
00126 #define PANA_AVP_NOT_ALLOWED 5008
00127 #define PANA_AVP_OCCURS_TOO_MANY_TIMES 5009
00128 #define PANA_UNSUPPORTED_VERSION 5011
00129 #define PANA_UNABLE_TO_COMPLY 5012
00130 #define PANA_INVALID_AVP_LENGTH 5014
00131 #define PANA_INVALID_MESSAGE_LENGTH 5015
00132 #define PANA_PROTECTION_CAPABILITY_UNSUPPORTED 5016
00133 #define PANA_SESSION_TIMEOUT 5017
00134 #define PANA_RETRY_TIMEOUT 5018
00135
00145 #define PANA_RCODE_RANGE(x,y,z) (((x) >= (y)) && ((x) <= (z)))
00146 #define PANA_RCODE_INFORMATIONAL(x) PANA_RCODE_RANGE(x, 1000, 1999)
00147 #define PANA_RCODE_SUCCESS(x) PANA_RCODE_RANGE(x, 2000, 2999)
00148 #define PANA_RCODE_PROTOCOL_ERROR(x) PANA_RCODE_RANGE(x, 3000, 3999)
00149 #define PANA_RCODE_TRANSIENT_FAILURE(x) PANA_RCODE_RANGE(x, 4000, 4999)
00150 #define PANA_RCODE_PERMANENT_FAILURE(x) PANA_RCODE_RANGE(x, 5000, 5999)
00151
00152 #endif