Navigation


Changeset 705:f0cb8f465763 in freeDiameter


Ignore:
Timestamp:
Jan 31, 2011 5:22:21 PM (2 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Message:

Added standard Result-Code values in header.
Added Error-Cause attribute conversion in app_radgw.

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • extensions/app_radgw/rgwx_acct.c

    r703 r705  
    4646#define ACV_ART_STOP_RECORD             4       /* STOP_RECORD */ 
    4747#define ACV_ART_AUTHORIZE_AUTHENTICATE  3       /* AUTHORIZE_AUTHENTICATE */ 
    48 #define ER_DIAMETER_LIMITED_SUCCESS     2002 
    4948 
    5049 
  • extensions/app_radgw/rgwx_auth.c

    r703 r705  
    5151#define ACV_ASS_STATE_MAINTAINED        0       /* STATE_MAINTAINED */ 
    5252#define ACV_ASS_NO_STATE_MAINTAINED     1       /* NO_STATE_MAINTAINED */ 
    53 #define ER_DIAMETER_MULTI_ROUND_AUTH    1001 
    54 #define ER_DIAMETER_LIMITED_SUCCESS     2002 
    5553 
    5654/* The state we keep for this plugin */ 
     
    10761074        uint8_t tuntag = 0; 
    10771075        unsigned char * req_auth = NULL; 
     1076        int error_cause = 0; 
    10781077         
    10791078        TRACE_ENTRY("%p %p %p %p %p", cs, session, diam_ans, rad_fw, cli); 
     
    11611160                 
    11621161                default: 
     1162                        /* Can we convert the value to a natural Error-Cause ? */ 
     1163                        switch (ahdr->avp_value->u32) { 
     1164                                case ER_DIAMETER_AVP_UNSUPPORTED: 
     1165                                        error_cause = 401; /* Unsupported Attribute */ 
     1166                                        break; 
     1167                                         
     1168                                case ER_DIAMETER_MISSING_AVP: 
     1169                                        error_cause = 402; /* Missing Attribute */ 
     1170                                        break; 
     1171                                         
     1172                                case ER_DIAMETER_UNABLE_TO_COMPLY: 
     1173                                        error_cause = 404; /* Invalid Request */ 
     1174                                        break; 
     1175                                         
     1176                                case ER_DIAMETER_APPLICATION_UNSUPPORTED: 
     1177                                        error_cause = 405; /* Unsupported Service */ 
     1178                                        break; 
     1179                                         
     1180                                case ER_DIAMETER_COMMAND_UNSUPPORTED: 
     1181                                        error_cause = 406; /* Unsupported Extension */ 
     1182                                        break; 
     1183                                         
     1184                                case ER_DIAMETER_INVALID_AVP_VALUE: 
     1185                                        error_cause = 407; /* Invalid Attribute Value */ 
     1186                                        break; 
     1187                                         
     1188                                case ER_DIAMETER_AVP_NOT_ALLOWED: 
     1189                                        error_cause = 501; /* Administratively Prohibited */ 
     1190                                        break; 
     1191                                         
     1192                                case ER_DIAMETER_REALM_NOT_SERVED: 
     1193                                case ER_DIAMETER_LOOP_DETECTED: 
     1194                                case ER_DIAMETER_UNKNOWN_PEER: 
     1195                                case ER_DIAMETER_UNABLE_TO_DELIVER: 
     1196                                        error_cause = 502; /* Request Not Routable (Proxy) */ 
     1197                                        break; 
     1198                                         
     1199                                case ER_DIAMETER_UNKNOWN_SESSION_ID: 
     1200                                        error_cause = 503; /* Session Context Not Found */ 
     1201                                        break; 
     1202                                         
     1203                                case ER_DIAMETER_TOO_BUSY: 
     1204                                case ER_DIAMETER_OUT_OF_SPACE: 
     1205                                        error_cause = 506; /* Resources Unavailable */ 
     1206                                        break; 
     1207                                         
     1208#if 0 
     1209                        /* remaining Diameter Result-Code & RADIUS Error-Cause */ 
     1210                                case ER_DIAMETER_REDIRECT_INDICATION: 
     1211                                case ER_DIAMETER_INVALID_HDR_BITS: 
     1212                                case ER_DIAMETER_INVALID_AVP_BITS: 
     1213                                case ER_DIAMETER_AUTHENTICATION_REJECTED: 
     1214                                case ER_ELECTION_LOST: 
     1215                                case ER_DIAMETER_AUTHORIZATION_REJECTED: 
     1216                                case ER_DIAMETER_RESOURCES_EXCEEDED: 
     1217                                case ER_DIAMETER_CONTRADICTING_AVPS: 
     1218                                case ER_DIAMETER_AVP_OCCURS_TOO_MANY_TIMES 
     1219                                case ER_DIAMETER_NO_COMMON_APPLICATION: 
     1220                                case ER_DIAMETER_UNSUPPORTED_VERSION: 
     1221                                case ER_DIAMETER_INVALID_BIT_IN_HEADER: 
     1222                                case ER_DIAMETER_INVALID_AVP_LENGTH: 
     1223                                case ER_DIAMETER_INVALID_MESSAGE_LENGTH: 
     1224                                case ER_DIAMETER_INVALID_AVP_BIT_COMBO: 
     1225                                case ER_DIAMETER_NO_COMMON_SECURITY: 
     1226                                        error_cause = 403; /* NAS Identification Mismatch */ 
     1227                                        error_cause = 504; /* Session Context Not Removable */ 
     1228                                        error_cause = 505; /* Other Proxy Processing Error */ 
     1229                                        error_cause = 507; /* Request Initiated */ 
     1230                                        error_cause = 508; /* Multiple Session Selection Unsupported */ 
     1231#endif /* 0 */ 
     1232                        } 
     1233                        /* In any case, the following is processed: */ 
    11631234                        (*rad_fw)->hdr->code = RADIUS_CODE_ACCESS_REJECT; 
    11641235                        fd_log_debug("[auth.rgwx] Received Diameter answer with error code '%d' from server '%.*s', session %.*s, translating into Access-Reject\n", 
     
    18251896                                        } 
    18261897                                         
    1827                                         if ( ! radius_msg_add_attr_int32(*rad_fw, RADIUS_ATTR_ERROR_CAUSE, 202) ) { 
    1828                                                 TRACE_DEBUG(INFO, "Error while adding Error-Cause attribute in RADIUS message"); 
    1829                                                 return ENOMEM; 
    1830                                         } 
     1898                                        error_cause = 202; /* Invalid EAP Packet */ 
    18311899                                        break; 
    18321900                         
     
    18521920        CHECK_FCT( fd_msg_free( aoh ) ); 
    18531921        free(req_auth); 
     1922         
     1923        if (error_cause) { 
     1924                if ( ! radius_msg_add_attr_int32(*rad_fw, RADIUS_ATTR_ERROR_CAUSE, error_cause) ) { 
     1925                        TRACE_DEBUG(INFO, "Error while adding Error-Cause attribute in RADIUS message"); 
     1926                        return ENOMEM; 
     1927                } 
     1928        }                
    18541929 
    18551930        if ((*rad_fw)->hdr->code == RADIUS_CODE_ACCESS_ACCEPT) { 
  • extensions/app_radgw/rgwx_sip.c

    r639 r705  
    5151#define ACV_ASS_STATE_MAINTAINED        0       /* STATE_MAINTAINED */ 
    5252#define ACV_ASS_NO_STATE_MAINTAINED     1       /* NO_STATE_MAINTAINED */ 
    53 #define ER_DIAMETER_MULTI_ROUND_AUTH    1001 
    54 #define ER_DIAMETER_SUCCESS             2001 
    55 #define ER_DIAMETER_LIMITED_SUCCESS     2002 
    5653#define ER_DIAMETER_SUCCESS_AUTH_SENT_SERVER_NOT_STORED 2008 
    5754#define ER_DIAMETER_SUCCESS_SERVER_NAME_NOT_STORED      2006 
  • include/freeDiameter/libfdproto.h

    r689 r705  
    15131513#define ACV_ISI_TLS                             1 
    15141514 
    1515 /* Error codes */ 
    1516 #define ER_DIAMETER_SUCCESS                     2001 
    1517 #define ER_DIAMETER_REALM_NOT_SERVED            3003 
    1518 #define ER_DIAMETER_TOO_BUSY                    3004 
    1519 #define ER_DIAMETER_REDIRECT_INDICATION         3006 
    1520 #define ER_ELECTION_LOST                        4003 
     1515/* Error codes from Base protocol 
     1516(reference: http://www.iana.org/assignments/aaa-parameters/aaa-parameters.xml#aaa-parameters-4) 
     1517Note that currently, rfc3588bis-26 has some different values for some of these  
     1518*/ 
     1519#define ER_DIAMETER_MULTI_ROUND_AUTH                    1001 
     1520 
     1521#define ER_DIAMETER_SUCCESS                             2001 
     1522#define ER_DIAMETER_LIMITED_SUCCESS                     2002 
     1523 
     1524#define ER_DIAMETER_COMMAND_UNSUPPORTED                 3001 /* 5019 ? */ 
     1525#define ER_DIAMETER_UNABLE_TO_DELIVER                   3002 
     1526#define ER_DIAMETER_REALM_NOT_SERVED                    3003 
     1527#define ER_DIAMETER_TOO_BUSY                            3004 
     1528#define ER_DIAMETER_LOOP_DETECTED                       3005 
     1529#define ER_DIAMETER_REDIRECT_INDICATION                 3006 
     1530#define ER_DIAMETER_APPLICATION_UNSUPPORTED             3007 
     1531#define ER_DIAMETER_INVALID_HDR_BITS                    3008 /* 5020 ? */ 
     1532#define ER_DIAMETER_INVALID_AVP_BITS                    3009 /* 5021 ? */ 
     1533#define ER_DIAMETER_UNKNOWN_PEER                        3010 /* 5018 ? */ 
     1534 
     1535#define ER_DIAMETER_AUTHENTICATION_REJECTED             4001 
     1536#define ER_DIAMETER_OUT_OF_SPACE                        4002 
     1537#define ER_ELECTION_LOST                                4003 
     1538 
     1539#define ER_DIAMETER_AVP_UNSUPPORTED                     5001 
     1540#define ER_DIAMETER_UNKNOWN_SESSION_ID                  5002 
     1541#define ER_DIAMETER_AUTHORIZATION_REJECTED              5003 
     1542#define ER_DIAMETER_INVALID_AVP_VALUE                   5004 
     1543#define ER_DIAMETER_MISSING_AVP                         5005 
     1544#define ER_DIAMETER_RESOURCES_EXCEEDED                  5006 
     1545#define ER_DIAMETER_CONTRADICTING_AVPS                  5007 
     1546#define ER_DIAMETER_AVP_NOT_ALLOWED                     5008 
     1547#define ER_DIAMETER_AVP_OCCURS_TOO_MANY_TIMES           5009 
     1548#define ER_DIAMETER_NO_COMMON_APPLICATION               5010 
     1549#define ER_DIAMETER_UNSUPPORTED_VERSION                 5011 
     1550#define ER_DIAMETER_UNABLE_TO_COMPLY                    5012 
     1551#define ER_DIAMETER_INVALID_BIT_IN_HEADER               5013 /* 3011 ? */ 
     1552#define ER_DIAMETER_INVALID_AVP_LENGTH                  5014 
     1553#define ER_DIAMETER_INVALID_MESSAGE_LENGTH              5015 /* 3012 ? */ 
     1554#define ER_DIAMETER_INVALID_AVP_BIT_COMBO               5016 /* deprecated? */ 
     1555#define ER_DIAMETER_NO_COMMON_SECURITY                  5017 
    15211556 
    15221557 
  • libfdcore/dict_base_proto.c

    r687 r705  
    12881288                                                to be issued in order for access to be granted. 
    12891289                                        */ 
    1290                                         struct dict_enumval_data        error_code = { "DIAMETER_MULTI_ROUND_AUTH",     { .u32 = 1001 }}; 
     1290                                        struct dict_enumval_data        error_code = { "DIAMETER_MULTI_ROUND_AUTH",     { .u32 = ER_DIAMETER_MULTI_ROUND_AUTH }}; 
    12911291                                        CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); 
    12921292                                } 
     
    12991299                                                The Request was successfully completed. 
    13001300                                        */ 
    1301                                         struct dict_enumval_data        error_code = { "DIAMETER_SUCCESS",              { .u32 = 2001 }}; 
     1301                                        struct dict_enumval_data        error_code = { "DIAMETER_SUCCESS",              { .u32 = ER_DIAMETER_SUCCESS }}; 
    13021302                                        #if ER_DIAMETER_SUCCESS != 2001 
    13031303                                        #error "ER_DIAMETER_SUCCESS definition mismatch" 
     
    13121312                                                provide service to the user. 
    13131313                                        */ 
    1314                                         struct dict_enumval_data        error_code = { "DIAMETER_LIMITED_SUCCESS",      { .u32 = 2002 }}; 
     1314                                        struct dict_enumval_data        error_code = { "DIAMETER_LIMITED_SUCCESS",      { .u32 = ER_DIAMETER_LIMITED_SUCCESS }}; 
    13151315                                        CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); 
    13161316                                } 
     
    13181318                        /* Protocol Errors */ 
    13191319                        { 
    1320                                 /* 3001 */ 
     1320                                /* 3001 -- might be changed to 5xxx soon */ 
    13211321                                { 
    13221322                                        /* 
     
    13251325                                                receives an experimental command that it does not understand. 
    13261326                                        */ 
    1327                                         /* (old): it has been changed to 5019 in 3588bis */ 
    1328                                         struct dict_enumval_data        error_code = { "DIAMETER_COMMAND_UNSUPPORTED(old)",     { .u32 = 3001 }}; 
     1327                                        struct dict_enumval_data        error_code = { "DIAMETER_COMMAND_UNSUPPORTED",  { .u32 = ER_DIAMETER_COMMAND_UNSUPPORTED }}; 
    13291328                                        CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); 
    13301329                                } 
     
    13381337                                                associated Destination-Realm AVP. 
    13391338                                        */ 
    1340                                         struct dict_enumval_data        error_code = { "DIAMETER_UNABLE_TO_DELIVER",    { .u32 = 3002 }}; 
     1339                                        struct dict_enumval_data        error_code = { "DIAMETER_UNABLE_TO_DELIVER",    { .u32 = ER_DIAMETER_UNABLE_TO_DELIVER }}; 
    13411340                                        CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); 
    13421341                                } 
     
    13461345                                                The intended realm of the request is not recognized. 
    13471346                                        */ 
    1348                                         struct dict_enumval_data        error_code = { "DIAMETER_REALM_NOT_SERVED",     { .u32 = 3003 }}; 
    1349                                         #if ER_DIAMETER_REALM_NOT_SERVED != 3003 
    1350                                         #error "ER_DIAMETER_REALM_NOT_SERVED definition mismatch" 
    1351                                         #endif 
     1347                                        struct dict_enumval_data        error_code = { "DIAMETER_REALM_NOT_SERVED",     { .u32 = ER_DIAMETER_REALM_NOT_SERVED }}; 
    13521348                                        CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); 
    13531349                                } 
     
    13601356                                                service. 
    13611357                                        */ 
    1362                                         struct dict_enumval_data        error_code = { "DIAMETER_TOO_BUSY",             { .u32 = 3004 }}; 
    1363                                         #if ER_DIAMETER_TOO_BUSY != 3004 
    1364                                         #error "ER_DIAMETER_TOO_BUSY definition mismatch" 
    1365                                         #endif 
     1358                                        struct dict_enumval_data        error_code = { "DIAMETER_TOO_BUSY",             { .u32 = ER_DIAMETER_TOO_BUSY }}; 
    13661359                                        CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); 
    13671360                                } 
     
    13741367                                                identified a configuration problem. 
    13751368                                        */ 
    1376                                         struct dict_enumval_data        error_code = { "DIAMETER_LOOP_DETECTED",        { .u32 = 3005 }}; 
     1369                                        struct dict_enumval_data        error_code = { "DIAMETER_LOOP_DETECTED",        { .u32 = ER_DIAMETER_LOOP_DETECTED }}; 
    13771370                                        CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); 
    13781371                                } 
     
    13861379                                                be present. 
    13871380                                        */ 
    1388                                         struct dict_enumval_data        error_code = { "DIAMETER_REDIRECT_INDICATION",  { .u32 = 3006 }}; 
    1389                                         #if ER_DIAMETER_REDIRECT_INDICATION != 3006 
    1390                                         #error "ER_DIAMETER_REDIRECT_INDICATION definition mismatch" 
    1391                                         #endif 
     1381                                        struct dict_enumval_data        error_code = { "DIAMETER_REDIRECT_INDICATION",  { .u32 = ER_DIAMETER_REDIRECT_INDICATION }}; 
    13921382                                        CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); 
    13931383                                } 
     
    13971387                                                A request was sent for an application that is not supported. 
    13981388                                        */ 
    1399                                         struct dict_enumval_data        error_code = { "DIAMETER_APPLICATION_UNSUPPORTED",      { .u32 = 3007 }}; 
     1389                                        struct dict_enumval_data        error_code = { "DIAMETER_APPLICATION_UNSUPPORTED",      { .u32 = ER_DIAMETER_APPLICATION_UNSUPPORTED }}; 
    14001390                                        CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); 
    14011391                                } 
    1402                                 /* 3008 */ 
     1392                                /* 3008 -- will change to 5xxx soon */ 
    14031393                                { 
    14041394                                        /* 
     
    14071397                                                inconsistent with the command code's definition. 
    14081398                                        */ 
    1409                                         /* (old): it has been changed in 3588bis */ 
    1410                                         struct dict_enumval_data        error_code = { "DIAMETER_INVALID_HDR_BITS(old)",        { .u32 = 3008 }}; 
     1399                                        struct dict_enumval_data        error_code = { "DIAMETER_INVALID_HDR_BITS",     { .u32 = ER_DIAMETER_INVALID_HDR_BITS }}; 
    14111400                                        CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); 
    14121401                                } 
    1413                                 /* 3009 */ 
     1402                                /* 3009 -- will change to 5xxx soon */ 
    14141403                                { 
    14151404                                        /* 
     
    14181407                                                AVP's definition. 
    14191408                                        */ 
    1420                                         /* (old): it has been changed in 3588bis */ 
    1421                                         struct dict_enumval_data        error_code = { "DIAMETER_INVALID_AVP_BITS(old)",        { .u32 = 3009 }}; 
     1409                                        struct dict_enumval_data        error_code = { "DIAMETER_INVALID_AVP_BITS",     { .u32 = ER_DIAMETER_INVALID_AVP_BITS }}; 
    14221410                                        CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); 
    14231411                                } 
    1424                                 /* 3010 */ 
     1412                                /* 3010  -- will change to 5xxx soon */ 
    14251413                                { 
    14261414                                        /* 
    14271415                                                 A CER was received from an unknown peer. 
    14281416                                        */ 
    1429                                         /* (old): it has been changed in 3588bis */ 
    1430                                         struct dict_enumval_data        error_code = { "DIAMETER_UNKNOWN_PEER(old)",    { .u32 = 3010 }}; 
    1431                                         CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); 
    1432                                 } 
    1433                                 /* 3011 */ 
    1434                                 { 
    1435                                         /* 
    1436                                                 This error is returned when a reserved bit in the Diameter header 
    1437                                                 is set to one (1) or the bits in the Diameter header defined in 
    1438                                                 Sec 3 are set incorrectly. 
    1439                                         */ 
    1440                                         struct dict_enumval_data        error_code = { "DIAMETER_INVALID_BIT_IN_HEADER",        { .u32 = 3011 }}; 
    1441                                         CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); 
    1442                                 } 
    1443                                 /* 3012 */ 
    1444                                 { 
    1445                                         /* 
    1446                                                 This error is returned when a request is received with an invalid 
    1447                                                 message length. 
    1448                                         */ 
    1449                                         struct dict_enumval_data        error_code = { "DIAMETER_INVALID_MESSAGE_LENGTH",       { .u32 = 3012 }}; 
     1417                                        struct dict_enumval_data        error_code = { "DIAMETER_UNKNOWN_PEER",         { .u32 = ER_DIAMETER_UNKNOWN_PEER }}; 
    14501418                                        CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); 
    14511419                                } 
     
    14601428                                                be tried after prompting the user for a new password. 
    14611429                                        */ 
    1462                                         struct dict_enumval_data        error_code = { "DIAMETER_AUTHENTICATION_REJECTED",      { .u32 = 4001 }}; 
     1430                                        struct dict_enumval_data        error_code = { "DIAMETER_AUTHENTICATION_REJECTED",      { .u32 = ER_DIAMETER_AUTHENTICATION_REJECTED }}; 
    14631431                                        CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); 
    14641432                                } 
     
    14691437                                                commit it to stable storage due to a temporary lack of space. 
    14701438                                        */ 
    1471                                         struct dict_enumval_data        error_code = { "DIAMETER_OUT_OF_SPACE",                 { .u32 = 4002 }}; 
     1439                                        struct dict_enumval_data        error_code = { "DIAMETER_OUT_OF_SPACE",                 { .u32 = ER_DIAMETER_OUT_OF_SPACE }}; 
    14721440                                        CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); 
    14731441                                } 
     
    14781446                                                has therefore disconnected the transport connection. 
    14791447                                        */ 
    1480                                         struct dict_enumval_data        error_code = { "ELECTION_LOST",                         { .u32 = 4003 }}; 
     1448                                        struct dict_enumval_data        error_code = { "ELECTION_LOST",                         { .u32 = ER_ELECTION_LOST }}; 
    14811449                                        CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); 
    14821450                                } 
     
    14921460                                                AVP AVP containing the AVPs that caused the failure. 
    14931461                                        */ 
    1494                                         struct dict_enumval_data        error_code = { "DIAMETER_AVP_UNSUPPORTED",      { .u32 = 5001 }}; 
     1462                                        struct dict_enumval_data        error_code = { "DIAMETER_AVP_UNSUPPORTED",      { .u32 = ER_DIAMETER_AVP_UNSUPPORTED }}; 
    14951463                                        CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); 
    14961464                                } 
     
    15001468                                                The request contained an unknown Session-Id. 
    15011469                                        */ 
    1502                                         struct dict_enumval_data        error_code = { "DIAMETER_UNKNOWN_SESSION_ID",   { .u32 = 5002 }}; 
     1470                                        struct dict_enumval_data        error_code = { "DIAMETER_UNKNOWN_SESSION_ID",   { .u32 = ER_DIAMETER_UNKNOWN_SESSION_ID }}; 
    15031471                                        CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); 
    15041472                                } 
     
    15101478                                                to the user. 
    15111479                                        */ 
    1512                                         struct dict_enumval_data        error_code = { "DIAMETER_AUTHORIZATION_REJECTED",{ .u32 = 5003 }}; 
     1480                                        struct dict_enumval_data        error_code = { "DIAMETER_AUTHORIZATION_REJECTED",{ .u32 = ER_DIAMETER_AUTHORIZATION_REJECTED }}; 
    15131481                                        CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); 
    15141482                                } 
     
    15201488                                                the offending AVPs within a Failed-AVP AVP. 
    15211489                                        */ 
    1522                                         struct dict_enumval_data        error_code = { "DIAMETER_INVALID_AVP_VALUE",    { .u32 = 5004 }}; 
     1490                                        struct dict_enumval_data        error_code = { "DIAMETER_INVALID_AVP_VALUE",    { .u32 = ER_DIAMETER_INVALID_AVP_VALUE }}; 
    15231491                                        CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); 
    15241492                                } 
     
    15331501                                                should be of correct minimum length and contain zeroes. 
    15341502                                        */ 
    1535                                         struct dict_enumval_data        error_code = { "DIAMETER_MISSING_AVP",          { .u32 = 5005 }}; 
     1503                                        struct dict_enumval_data        error_code = { "DIAMETER_MISSING_AVP",          { .u32 = ER_DIAMETER_MISSING_AVP }}; 
    15361504                                        CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); 
    15371505                                } 
     
    15441512                                                attempts to establish a second PPP connection. 
    15451513                                        */ 
    1546                                         struct dict_enumval_data        error_code = { "DIAMETER_RESOURCES_EXCEEDED",   { .u32 = 5006 }}; 
     1514                                        struct dict_enumval_data        error_code = { "DIAMETER_RESOURCES_EXCEEDED",   { .u32 = ER_DIAMETER_RESOURCES_EXCEEDED }}; 
    15471515                                        CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); 
    15481516                                } 
     
    15551523                                                AVPs that contradicted each other. 
    15561524                                        */ 
    1557                                         struct dict_enumval_data        error_code = { "DIAMETER_CONTRADICTING_AVPS",   { .u32 = 5007 }}; 
     1525                                        struct dict_enumval_data        error_code = { "DIAMETER_CONTRADICTING_AVPS",   { .u32 = ER_DIAMETER_CONTRADICTING_AVPS }}; 
    15581526                                        CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); 
    15591527                                } 
     
    15651533                                                offending AVP. 
    15661534                                        */ 
    1567                                         struct dict_enumval_data        error_code = { "DIAMETER_AVP_NOT_ALLOWED",      { .u32 = 5008 }}; 
     1535                                        struct dict_enumval_data        error_code = { "DIAMETER_AVP_NOT_ALLOWED",      { .u32 = ER_DIAMETER_AVP_NOT_ALLOWED }}; 
    15681536                                        CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); 
    15691537                                } 
     
    15761544                                                the offending AVP that exceeded the maximum number of occurrences 
    15771545                                        */ 
    1578                                         struct dict_enumval_data        error_code = { "DIAMETER_AVP_OCCURS_TOO_MANY_TIMES",{ .u32 = 5009 }}; 
     1546                                        struct dict_enumval_data        error_code = { "DIAMETER_AVP_OCCURS_TOO_MANY_TIMES",{ .u32 = ER_DIAMETER_AVP_OCCURS_TOO_MANY_TIMES }}; 
    15791547                                        CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); 
    15801548                                } 
     
    15861554                                                applications that it does not support. 
    15871555                                        */ 
    1588                                         struct dict_enumval_data        error_code = { "DIAMETER_NO_COMMON_APPLICATION",{ .u32 = 5010 }}; 
     1556                                        struct dict_enumval_data        error_code = { "DIAMETER_NO_COMMON_APPLICATION",{ .u32 = ER_DIAMETER_NO_COMMON_APPLICATION }}; 
    15891557                                        CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); 
    15901558                                } 
     
    15951563                                                number is unsupported. 
    15961564                                        */ 
    1597                                         struct dict_enumval_data        error_code = { "DIAMETER_UNSUPPORTED_VERSION",  { .u32 = 5011 }}; 
     1565                                        struct dict_enumval_data        error_code = { "DIAMETER_UNSUPPORTED_VERSION",  { .u32 = ER_DIAMETER_UNSUPPORTED_VERSION }}; 
    15981566                                        CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); 
    15991567                                } 
     
    16041572                                                reasons. 
    16051573                                        */ 
    1606                                         struct dict_enumval_data        error_code = { "DIAMETER_UNABLE_TO_COMPLY",     { .u32 = 5012 }}; 
     1574                                        struct dict_enumval_data        error_code = { "DIAMETER_UNABLE_TO_COMPLY",     { .u32 = ER_DIAMETER_UNABLE_TO_COMPLY }}; 
    16071575                                        CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); 
    16081576                                } 
    1609                                 /* 5013 */ 
     1577                                /* 5013 -- will change to 3xxx */ 
    16101578                                { 
    16111579                                        /* 
     
    16131581                                                header is set to one (1). 
    16141582                                        */ 
    1615                                         /* (old): it has been changed in 3588bis */ 
    1616                                         struct dict_enumval_data        error_code = { "DIAMETER_INVALID_BIT_IN_HEADER(old)",   { .u32 = 5013 }}; 
     1583                                        struct dict_enumval_data        error_code = { "DIAMETER_INVALID_BIT_IN_HEADER",        { .u32 = ER_DIAMETER_INVALID_BIT_IN_HEADER }}; 
    16171584                                        CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); 
    16181585                                } 
     
    16341601                                                AVP header with zero up to the minimum AVP header length. 
    16351602                                        */ 
    1636                                         struct dict_enumval_data        error_code = { "DIAMETER_INVALID_AVP_LENGTH",   { .u32 = 5014 }}; 
     1603                                        struct dict_enumval_data        error_code = { "DIAMETER_INVALID_AVP_LENGTH",   { .u32 = ER_DIAMETER_INVALID_AVP_LENGTH }}; 
    16371604                                        CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); 
    16381605                                } 
    1639                                 /* 5015 */ 
     1606                                /* 5015 -- will change to 3xxx */ 
    16401607                                { 
    16411608                                        /* 
     
    16431610                                                message length. 
    16441611                                        */ 
    1645                                         /* (old): it has been changed in 3588bis */ 
    1646                                         struct dict_enumval_data        error_code = { "DIAMETER_INVALID_MESSAGE_LENGTH(old)",  { .u32 = 5015 }}; 
     1612                                        struct dict_enumval_data        error_code = { "DIAMETER_INVALID_MESSAGE_LENGTH",       { .u32 = ER_DIAMETER_INVALID_MESSAGE_LENGTH }}; 
    16471613                                        CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); 
    16481614                                } 
     
    16551621                                                AVP. 
    16561622                                        */ 
    1657                                         /* (old): it has been changed in 3588bis */ 
    1658                                         struct dict_enumval_data        error_code = { "DIAMETER_INVALID_AVP_BIT_COMBO(old)",   { .u32 = 5016 }}; 
     1623                                        struct dict_enumval_data        error_code = { "DIAMETER_INVALID_AVP_BIT_COMBO",        { .u32 = ER_DIAMETER_INVALID_AVP_BIT_COMBO }}; 
    16591624                                        CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); 
    16601625                                } 
     
    16671632                                                Result-Code AVP set to DIAMETER_NO_COMMON_SECURITY. 
    16681633                                        */ 
    1669                                         struct dict_enumval_data        error_code = { "DIAMETER_NO_COMMON_SECURITY",   { .u32 = 5017 }}; 
    1670                                         CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); 
    1671                                 } 
    1672                                 /* 5018 */ 
    1673                                 { 
    1674                                         /* 
    1675                                                 A CER was received from an unknown peer. 
    1676                                         */ 
    1677                                         struct dict_enumval_data        error_code = { "DIAMETER_UNKNOWN_PEER",         { .u32 = 5018 }}; 
    1678                                         CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); 
    1679                                 } 
    1680                                 /* 5019 */ 
    1681                                 { 
    1682                                         /* 
    1683                                                 The Request contained a Command-Code that the receiver did not 
    1684                                                 recognize or support.  This MUST be used when a Diameter node 
    1685                                                 receives an experimental command that it does not understand. 
    1686                                         */ 
    1687                                         struct dict_enumval_data        error_code = { "DIAMETER_COMMAND_UNSUPPORTED",  { .u32 = 5019 }}; 
    1688                                         CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); 
    1689                                 } 
    1690                                 /* 5020 */ 
    1691                                 { 
    1692                                         /* 
    1693                                                 A request was received whose bits in the Diameter header were 
    1694                                                 either set to an invalid combination, or to a value that is 
    1695                                                 inconsistent with the command code's definition. 
    1696                                         */ 
    1697                                         struct dict_enumval_data        error_code = { "DIAMETER_INVALID_HDR_BITS",     { .u32 = 5020 }}; 
    1698                                         CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); 
    1699                                 } 
    1700                                 /* 5021 */ 
    1701                                 { 
    1702                                         /* 
    1703                                                 A request was received that included an AVP whose flag bits are 
    1704                                                 set to an unrecognized value, or that is inconsistent with the 
    1705                                                 AVP's definition. 
    1706                                         */ 
    1707                                         struct dict_enumval_data        error_code = { "DIAMETER_INVALID_AVP_BITS",     { .u32 = 5021 }}; 
     1634                                        struct dict_enumval_data        error_code = { "DIAMETER_NO_COMMON_SECURITY",   { .u32 = ER_DIAMETER_NO_COMMON_SECURITY }}; 
    17081635                                        CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); 
    17091636                                } 
Note: See TracChangeset for help on using the changeset viewer.