Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

pana_defs.h

00001 /* BEGIN_COPYRIGHT                                                        */
00002 /*                                                                        */
00003 /* Open Diameter: Open-source software for the Diameter and               */
00004 /*                Diameter related protocols                              */
00005 /*                                                                        */
00006 /* Copyright (C) 2002-2004 Open Diameter Project                          */
00007 /*                                                                        */
00008 /* This library is free software; you can redistribute it and/or modify   */
00009 /* it under the terms of the GNU Lesser General Public License as         */
00010 /* published by the Free Software Foundation; either version 2.1 of the   */
00011 /* License, or (at your option) any later version.                        */
00012 /*                                                                        */
00013 /* This library is distributed in the hope that it will be useful,        */
00014 /* but WITHOUT ANY WARRANTY; without even the implied warranty of         */
00015 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU      */
00016 /* Lesser General Public License for more details.                        */
00017 /*                                                                        */
00018 /* You should have received a copy of the GNU Lesser General Public       */
00019 /* License along with this library; if not, write to the Free Software    */
00020 /* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307    */
00021 /* USA.                                                                   */
00022 /*                                                                        */
00023 /* In addition, when you copy and redistribute some or the entire part of */
00024 /* the source code of this software with or without modification, you     */
00025 /* MUST include this copyright notice in each copy.                       */
00026 /*                                                                        */
00027 /* If you make any changes that are appeared to be useful, please send    */
00028 /* sources that include the changed part to                               */
00029 /* diameter-developers@lists.sourceforge.net so that we can reflect your  */
00030 /* changes to one unified version of this software.                       */
00031 /*                                                                        */
00032 /* END_COPYRIGHT                                                          */
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 /* __PANA_CORE_H__ */

Generated on Fri Jun 25 19:18:29 2004 for PANA by doxygen 1.3.5