Navigation


Changeset 705:f0cb8f465763 in freeDiameter for libfdcore/dict_base_proto.c


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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.