#include "extension.h" #include "sh_app.h" /* The content of this file follows the same structure as dict_base_proto.c */ #define CHECK_dict_new( _type, _data, _parent, _ref ) \ CHECK_FCT( fd_dict_new( fd_g_config->cnf_dict, (_type), (_data), (_parent), (_ref)) ); #define CHECK_dict_search( _type, _criteria, _what, _result ) \ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, (_type), (_criteria), (_what), (_result), ENOENT) ); struct local_rules_definition { char *avp_name; vendor_id_t avp_vendor; enum rule_position position; int min; int max; }; #define RULE_ORDER( _position ) ((((_position) == RULE_FIXED_HEAD) || ((_position) == RULE_FIXED_TAIL)) ? 1 : 0 ) #if 0 #define PARSE_loc_rules( _rulearray, _parent) { \ int __ar; \ for (__ar=0; __ar < sizeof(_rulearray) / sizeof((_rulearray)[0]); __ar++) { \ struct dict_rule_data __data = { NULL, \ (_rulearray)[__ar].position, \ 0, \ (_rulearray)[__ar].min, \ (_rulearray)[__ar].max}; \ __data.rule_order = RULE_ORDER(__data.rule_position); \ CHECK_FCT( fd_dict_search( \ fd_g_config->cnf_dict, \ DICT_AVP, \ AVP_BY_NAME, \ (_rulearray)[__ar].avp_name, \ &__data.rule_avp, 0 ) ); \ if ( !__data.rule_avp ) { \ TRACE_DEBUG(INFO, "Fun:%s Line:%d AVP Not found: '%s'", __FUNCTION__, __LINE__, (_rulearray)[__ar].avp_name ); \ return ENOENT; \ } \ CHECK_FCT_DO( fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &__data, _parent, NULL), \ { \ TRACE_DEBUG(INFO, "Error on rule with AVP '%s'", \ (_rulearray)[__ar].avp_name ); \ return EINVAL; \ } ); \ } \ } #endif int PARSE_loc_rules_(struct local_rules_definition _rulearray[], int len, struct dict_object *_parent) { // LOG_E("PARSE_loc_rules_ enter. len:%d\n", len); int __ar; int ret = 0; for (__ar=0; __ar < len /* sizeof(_rulearray) / sizeof((_rulearray)[0])*/ ; __ar++) { struct dict_avp_request __avp; struct dict_rule_data __data = { NULL, (_rulearray)[__ar].position, 0, (_rulearray)[__ar].min, (_rulearray)[__ar].max}; __data.rule_order = RULE_ORDER(__data.rule_position); __avp.avp_vendor = (_rulearray)[__ar].avp_vendor; __avp.avp_code = 0; __avp.avp_name = (_rulearray)[__ar].avp_name; ret = fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME_AND_VENDOR, &__avp, &__data.rule_avp, 0); if(ret != 0) { LOG_N("ret err\n"); } if ( !__data.rule_avp ) { LOG_N("AVP Not found: '%s'", (_rulearray)[__ar].avp_name ); ret = ENOENT; goto END; } CHECK_FCT_DO( fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &__data, _parent, NULL), { LOG_N("Error on rule with AVP '%s'", (_rulearray)[__ar].avp_name ); ret = EINVAL; goto END; } ); } END: LOG_N("PARSE_loc_rules_ out.len:%d i:%d", len, __ar); return ret; } struct dict_object * udr_cmd = NULL; struct dict_object * uda_cmd = NULL; struct dict_object * pur_cmd = NULL; struct dict_object * pua_cmd = NULL; struct dict_object * sh_appli; struct dict_object * sh_vendor; struct dict_object * hw_vendor; struct dict_object *uname_vendor_5535; struct dict_object *uname_vendor_12645; struct dict_object *uname_vendor_3199; struct dict_object *uname_vendor_35; struct dict_object *uname_vendor_11; struct dict_object * ven1_vendor; #define SH_DEF_AVP(avp_code, vendor, name, flxed_flags, fixed_flags_val, base_type, ex_type) \ { \ struct dict_avp_data data = { \ avp_code, /* Code */ \ vendor, /* Vendor */ \ name, /* Name */ \ flxed_flags, /* Fixed flags */ \ fixed_flags_val, /* Fixed flag values */ \ base_type /* base type of data */ \ }; \ CHECK_dict_new( DICT_AVP, &data , ex_type, NULL); \ } #define SH_DEF_AVP_EM(avp_code, vendor, name, flxed_flags, fixed_flags_val, ex_name, arr) \ { \ int i; \ struct dict_avp_data data = { \ avp_code, /* Code */ \ vendor, /* Vendor */ \ name, /* Name */ \ flxed_flags, /* Fixed flags */ \ fixed_flags_val, /* Fixed flag values */ \ fixed_flags_val /* base type of data */ \ }; \ struct dict_object *type; \ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, ex_name, NULL, NULL, NULL }; \ CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); \ for(i = 0; i < sizeof(arr)/sizeof(arr[0]); ++i) \ { \ CHECK_dict_new( DICT_ENUMVAL, &arr[i] , type, NULL); \ } \ CHECK_dict_new(DICT_AVP, &data, type, NULL); \ } struct dict_object * UTF8String_type; struct dict_object * DiameterIdentity_type; struct dict_object * DiameterURI_type; struct dict_object * Time_type; int sh_dict_def_avp_base() { CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "UTF8String", &UTF8String_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "DiameterIdentity", &DiameterIdentity_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "DiameterURI", &DiameterURI_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Time", &Time_type); return 0; } int sh_dict_def_avp() { SH_DEF_AVP(1, 0, "User-Name", AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, AVP_FLAG_MANDATORY, AVP_TYPE_OCTETSTRING, UTF8String_type) #if 0 SH_DEF_AVP(263, SH_VND_ID, "Session-Id", AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, AVP_FLAG_MANDATORY, AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(264, SH_VND_ID, "Origin-Host", AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, AVP_FLAG_MANDATORY, AVP_TYPE_OCTETSTRING, DiameterIdentity_type) SH_DEF_AVP(296, SH_VND_ID, "Origin-Realm", AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, AVP_FLAG_MANDATORY, AVP_TYPE_OCTETSTRING, DiameterIdentity_type) SH_DEF_AVP(293, SH_VND_ID, "Destination-Host", AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, AVP_FLAG_MANDATORY, AVP_TYPE_OCTETSTRING, DiameterIdentity_type) SH_DEF_AVP(283, SH_VND_ID, "Destination-Realm", AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, AVP_FLAG_MANDATORY, AVP_TYPE_OCTETSTRING, DiameterIdentity_type) SH_DEF_AVP(266, SH_VND_ID, "Vendor-Id", AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, AVP_FLAG_MANDATORY, AVP_TYPE_UNSIGNED32, NULL) #endif SH_DEF_AVP(601, SH_VND_ID, "Public-Identity",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR, AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(602,SH_VND_ID,"Server-Name",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_OCTETSTRING, UTF8String_type) #if 0 SH_DEF_AVP(258, SH_VND_ID, "Auth-Application-Id", AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, AVP_FLAG_MANDATORY, AVP_TYPE_UNSIGNED32, NULL) SH_DEF_AVP(259, SH_VND_ID, "Acct-Application-Id", AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, AVP_FLAG_MANDATORY, AVP_TYPE_UNSIGNED32, NULL) #endif SH_DEF_AVP(622, SH_VND_ID, "OC-Feature-Vector",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR, AVP_TYPE_UNSIGNED64, NULL) SH_DEF_AVP(624, SH_VND_ID, "OC-Sequence-Number", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR, AVP_TYPE_UNSIGNED64, NULL) SH_DEF_AVP(627, SH_VND_ID, "OC-Reduction-Percentage", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR, AVP_TYPE_UNSIGNED32, NULL) SH_DEF_AVP(629, SH_VND_ID, "Feature-List-ID", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR, AVP_TYPE_UNSIGNED32, NULL) SH_DEF_AVP(630,SH_VND_ID, "Feature-List", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR, AVP_TYPE_UNSIGNED32, NULL) SH_DEF_AVP(634, SH_VND_ID, "Wildcarded-Public-Identity", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR, AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(636, SH_VND_ID,"Wildcarded-IMPU", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR, AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(701, SH_VND_ID, "MSISDN", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(702, SH_VND_ID, "User-Data", AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(704, SH_VND_ID,"Service-Indication", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, AVP_TYPE_OCTETSTRING, NULL) #if 0 SH_DEF_AVP(709, SH_VND_ID, "Expiry-Time", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR, AVP_TYPE_OCTETSTRING, Time_type) #endif SH_DEF_AVP(711, SH_VND_ID, "DSAI-Tag", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(713, SH_VND_ID, "Requested-Nodes", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR, AVP_TYPE_UNSIGNED32, NULL) SH_DEF_AVP(716, SH_VND_ID, "Sequence-Number", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR, AVP_TYPE_UNSIGNED32, NULL) SH_DEF_AVP(719, SH_VND_ID, "UDR-Flags", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR, AVP_TYPE_UNSIGNED32, NULL) SH_DEF_AVP(721, SH_VND_ID,"Call-Reference-Number", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR, AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(722, SH_VND_ID, "AS-Number", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR, AVP_TYPE_OCTETSTRING, UTF8String_type) #if 0 SH_DEF_AVP(723, SH_VND_ID, "DRMP", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_UNSIGNED32, NULL) #endif return 0; } int sh_dict_def_avp_group_268() { struct dict_enumval_data arr[] = { { "DIAMETER_MULTI_ROUND_AUTH", { .u32 = ER_DIAMETER_MULTI_ROUND_AUTH }} ,{ "DIAMETER_SUCCESS", { .u32 = ER_DIAMETER_SUCCESS }} ,{ "DIAMETER_LIMITED_SUCCESS", { .u32 = ER_DIAMETER_LIMITED_SUCCESS }} ,{ "DIAMETER_COMMAND_UNSUPPORTED", { .u32 = ER_DIAMETER_COMMAND_UNSUPPORTED }} ,{ "DIAMETER_UNABLE_TO_DELIVER", { .u32 = ER_DIAMETER_UNABLE_TO_DELIVER }} ,{ "DIAMETER_REALM_NOT_SERVED", { .u32 = ER_DIAMETER_REALM_NOT_SERVED }} ,{ "DIAMETER_TOO_BUSY", { .u32 = ER_DIAMETER_TOO_BUSY }} ,{ "DIAMETER_LOOP_DETECTED", { .u32 = ER_DIAMETER_LOOP_DETECTED }} ,{ "DIAMETER_REDIRECT_INDICATION", { .u32 = ER_DIAMETER_REDIRECT_INDICATION }} ,{ "DIAMETER_APPLICATION_UNSUPPORTED", { .u32 = ER_DIAMETER_APPLICATION_UNSUPPORTED }} ,{ "DIAMETER_INVALID_HDR_BITS", { .u32 = ER_DIAMETER_INVALID_HDR_BITS }} ,{ "DIAMETER_INVALID_AVP_BITS", { .u32 = ER_DIAMETER_INVALID_AVP_BITS }} ,{ "DIAMETER_UNKNOWN_PEER", { .u32 = ER_DIAMETER_UNKNOWN_PEER }} ,{ "DIAMETER_AUTHENTICATION_REJECTED", { .u32 = ER_DIAMETER_AUTHENTICATION_REJECTED }} ,{ "DIAMETER_OUT_OF_SPACE", { .u32 = ER_DIAMETER_OUT_OF_SPACE }} ,{ "ELECTION_LOST", { .u32 = ER_ELECTION_LOST }} ,{ "DIAMETER_AVP_UNSUPPORTED", { .u32 = ER_DIAMETER_AVP_UNSUPPORTED }} ,{ "DIAMETER_UNKNOWN_SESSION_ID", { .u32 = ER_DIAMETER_UNKNOWN_SESSION_ID }} ,{ "DIAMETER_AUTHORIZATION_REJECTED",{ .u32 = ER_DIAMETER_AUTHORIZATION_REJECTED }} ,{ "DIAMETER_INVALID_AVP_VALUE", { .u32 = ER_DIAMETER_INVALID_AVP_VALUE }} ,{ "DIAMETER_MISSING_AVP", { .u32 = ER_DIAMETER_MISSING_AVP }} ,{ "DIAMETER_RESOURCES_EXCEEDED", { .u32 = ER_DIAMETER_RESOURCES_EXCEEDED }} ,{ "DIAMETER_CONTRADICTING_AVPS", { .u32 = ER_DIAMETER_CONTRADICTING_AVPS }} ,{ "DIAMETER_AVP_NOT_ALLOWED", { .u32 = ER_DIAMETER_AVP_NOT_ALLOWED }} ,{ "DIAMETER_AVP_OCCURS_TOO_MANY_TIMES",{ .u32 = ER_DIAMETER_AVP_OCCURS_TOO_MANY_TIMES }} ,{ "DIAMETER_NO_COMMON_APPLICATION",{ .u32 = ER_DIAMETER_NO_COMMON_APPLICATION }} ,{ "DIAMETER_AVP_OCCURS_TOO_MANY_TIMES",{ .u32 = ER_DIAMETER_AVP_OCCURS_TOO_MANY_TIMES }} ,{ "DIAMETER_NO_COMMON_APPLICATION",{ .u32 = ER_DIAMETER_NO_COMMON_APPLICATION }} ,{ "DIAMETER_UNSUPPORTED_VERSION", { .u32 = ER_DIAMETER_UNSUPPORTED_VERSION }} ,{ "DIAMETER_UNABLE_TO_COMPLY", { .u32 = ER_DIAMETER_UNABLE_TO_COMPLY }} ,{ "DIAMETER_INVALID_BIT_IN_HEADER", { .u32 = ER_DIAMETER_INVALID_BIT_IN_HEADER }} ,{ "DIAMETER_INVALID_AVP_LENGTH", { .u32 = ER_DIAMETER_INVALID_AVP_LENGTH }} ,{ "DIAMETER_INVALID_MESSAGE_LENGTH", { .u32 = ER_DIAMETER_INVALID_MESSAGE_LENGTH }} ,{ "DIAMETER_INVALID_AVP_BIT_COMBO", { .u32 = ER_DIAMETER_INVALID_AVP_BIT_COMBO }} ,{ "DIAMETER_NO_COMMON_SECURITY", { .u32 = ER_DIAMETER_NO_COMMON_SECURITY }} //,{ "DIAMETER_USER_UNKNOWN", { .u32 = ER_DIAMETER_USER_UNKNOWN }} }; SH_DEF_AVP_EM(268, 0, "Result-Code", AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, AVP_FLAG_MANDATORY, "Enumerated*(Result-Code)", arr) return 0; } int sh_dict_def_avp_group_298() { /* Experimental-Result-Code */ { struct dict_object * type; struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated*(Experimental-Result-Code)" , NULL, NULL, NULL }; struct dict_avp_data data = { 298, /* Code */ SH_VND_ID, /* Vendor */ "Experimental-Result-Code", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_AVP, &data , type, NULL); } return 0; } int sh_dict_def_avp_group_297() { /* Experimental-Result */ /* The Experimental-Result AVP (AVP Code 297) is of type Grouped, and indicates whether a particular vendor-specific request was completed successfully or whether an error occurred. Its Data field has the following ABNF grammar: AVP Format Experimental-Result ::= < AVP Header: 297 > { Vendor-Id } { Experimental-Result-Code } The Vendor-Id AVP (see Section 5.3.3) in this grouped AVP identifies the vendor responsible for the assignment of the result code which follows. All Diameter answer messages defined in vendor-specific applications MUST include either one Result-Code AVP or one Experimental-Result AVP. */ struct dict_object * avp; struct dict_avp_data data = { 297, /* Code */ SH_VND_ID, /* Vendor */ "Experimental-Result", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { #ifndef WORKAROUND_ACCEPT_INVALID_VSAI /* ABNF from RFC6733 */ { "Vendor-Id", SH_VND_ID, RULE_REQUIRED, -1, 1 } #else /* WORKAROUND_ACCEPT_INVALID_VSAI */ /* ABNF from RFC3588 (including erratum, because original text is nonsense) */ { "Vendor-Id", SH_VND_ID, RULE_REQUIRED, -1, -1} #endif /* WORKAROUND_ACCEPT_INVALID_VSAI */ ,{ "Experimental-Result-Code", SH_VND_ID, RULE_REQUIRED, -1, 1 } }; /* Create the grouped AVP */ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); return 0; } int sh_dict_def_avp_group_260() { /* Vendor-Specific-Application-Id */ /* ::= < AVP Header: 260 > { Vendor-Id } [ Auth-Application-Id ] [ Acct-Application-Id ] A Vendor-Specific-Application-Id AVP MUST contain exactly one of either Auth-Application-Id or Acct-Application-Id. If a Vendor- Specific-Application-Id is received without any of these two AVPs, then the recipient SHOULD issue an answer with a Result-Code set to DIAMETER_MISSING_AVP. The answer SHOULD also include a Failed-AVP which MUST contain an example of an Auth-Application-Id AVP and an Acct-Application-Id AVP. If a Vendor-Specific-Application-Id is received that contains both Auth-Application-Id and Acct-Application-Id, then the recipient SHOULD issue an answer with Result-Code set to DIAMETER_AVP_OCCURS_TOO_MANY_TIMES. The answer SHOULD also include a Failed-AVP which MUST contain the received Auth-Application-Id AVP and Acct-Application-Id AVP. */ struct dict_object * avp; struct dict_avp_data data = { 260, /* Code */ #if AC_VENDOR_SPECIFIC_APPLICATION_ID != 260 #error "AC_VENDOR_SPECIFIC_APPLICATION_ID definition mismatch" #endif SH_VND_ID, /* Vendor */ "Vendor-Specific-Application-Id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { #ifndef WORKAROUND_ACCEPT_INVALID_VSAI /* ABNF from RFC6733 */ { "Vendor-Id", SH_VND_ID, RULE_REQUIRED, -1, 1 } #else /* WORKAROUND_ACCEPT_INVALID_VSAI */ /* ABNF from RFC3588 (including erratum, because original text is nonsense) */ { "Vendor-Id", SH_VND_ID, RULE_REQUIRED, -1, -1} #endif /* WORKAROUND_ACCEPT_INVALID_VSAI */ ,{ "Auth-Application-Id", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Acct-Application-Id", SH_VND_ID, RULE_OPTIONAL, -1, 1 } }; /* Create the grouped AVP */ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); return 0; } int sh_dict_def_avp_group_631() { /* Supported-Applications */ struct dict_avp_data data = { 631, /* Code */ SH_VND_ID, /* Vendor */ "Supported-Applications", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); return 0; } int sh_dict_def_avp_group_628() { /* Supported-Features */ /* Supported-Features ::= < AVP header: 628 10415 > { Vendor-Id } { Feature-List-ID } { Feature-List } *[AVP] */ struct dict_object * avp; struct dict_avp_data data = { 628, /* Code */ SH_VND_ID, /* Vendor */ "Supported-Features", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Vendor-Id", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "Feature-List-ID", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "Feature-List", SH_VND_ID, RULE_REQUIRED, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); return 0; } int sh_dict_def_avp_group_650() { /* Session-Priority */ struct dict_avp_data data = { 650, /* Code */ SH_VND_ID, /* Vendor */ "Session-Priority", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Session-Priority)", NULL, NULL, NULL }; struct dict_enumval_data t_0 = { "PRIORITY-0", { .u32 = 0 }}; struct dict_enumval_data t_1 = { "PRIORITY-1", { .u32 = 1 }}; struct dict_enumval_data t_2 = { "PRIORITY-2", { .u32 = 2 }}; struct dict_enumval_data t_3 = { "PRIORITY-3", { .u32 = 3 }}; struct dict_enumval_data t_4 = { "PRIORITY-4", { .u32 = 4 }}; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_3 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_4 , type, NULL); CHECK_dict_new(DICT_AVP, &data, type, NULL); return 0; } int sh_dict_def_avp_group_623_() { #if 0 SH_DEF_AVP( 623, /* Code */ 0, /* Vendor */ /* confi with 29.329 */ "User-Authorization-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ ) struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "User-Authorization-Type", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); struct dict_enumval_data t_0 = { "REGISTRATION", { .u32 = 0 }}; struct dict_enumval_data t_1 = { "DE_REGISTRATION", { .u32 = 1 }}; CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new(DICT_AVP, &data, type, NULL); #endif return 0; } int sh_dict_def_avp_group_703() { /* Data-Reference */ struct dict_avp_data data = { 703, /* Code */ SH_VND_ID, /* Vendor */ "Data-Reference", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Data-Reference)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); struct dict_enumval_data t_0 = { "RepositoryData", { .u32 = 0 }}; struct dict_enumval_data t_10 = { "IMSPublicIdentity", { .u32 = 10 }}; struct dict_enumval_data t_11 = { "IMSUserState", { .u32 = 11 }}; struct dict_enumval_data t_12 = { "S-CSCFName", { .u32 = 12 }}; struct dict_enumval_data t_13 = { "InitialFilterCriteria", { .u32 = 13 }}; struct dict_enumval_data t_14 = { "LocationInformation", { .u32 = 14 }}; struct dict_enumval_data t_15 = { "UserState", { .u32 = 15 }}; struct dict_enumval_data t_16 = { "ChargingInformation", { .u32 = 16 }}; struct dict_enumval_data t_17 = { "MSISDN", { .u32 = 17 }}; struct dict_enumval_data t_18 = { "PSIActivation", { .u32 = 18 }}; struct dict_enumval_data t_19 = { "DSAI", { .u32 = 19 }}; struct dict_enumval_data t_21 = { "ServiceLevelTraceInfo", { .u32 = 21 }}; struct dict_enumval_data t_22 = { "IPAddressSecureBindingInformation", { .u32 = 22 }}; struct dict_enumval_data t_23 = { "ServicePriorityLevel", { .u32 = 23 }}; struct dict_enumval_data t_24 = { "SMSRegistrationInfo", { .u32 = 24 }}; struct dict_enumval_data t_25 = { "UEReachabilityForIP", { .u32 = 25 }}; struct dict_enumval_data t_26 = { "TADSinformation", { .u32 = 26 }}; struct dict_enumval_data t_27 = { "STN-SR", { .u32 = 27 }}; struct dict_enumval_data t_28 = { "UE-SRVCC-Capability", { .u32 = 28 }}; struct dict_enumval_data t_29 = { "ExtendedPriority", { .u32 = 29 }}; struct dict_enumval_data t_30 = { "CSRN", { .u32 = 30 }}; struct dict_enumval_data t_31 = { "ReferenceLocationInformation", { .u32 = 31 }}; struct dict_enumval_data t_32 = { "IMSI", { .u32 = 32 }}; struct dict_enumval_data t_33 = { "IMSPrivateUserIdentity", { .u32 = 33 }}; CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_10 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_11 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_12 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_13 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_14 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_15 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_16 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_17 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_18 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_19 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_21 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_22 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_23 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_24 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_25 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_26 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_27 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_28 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_29 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_30 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_31 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_32 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_33 , type, NULL); CHECK_dict_new(DICT_AVP, &data, type, NULL); return 0; } int sh_dict_def_avp_group_705() { /* Subs-Req-Type AVP */ struct dict_avp_data data = { 705, /* Code */ SH_VND_ID, /* Vendor */ "Subs-Req-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Subs-Req-Type AVP", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); struct dict_enumval_data t_0 = { "Subscribe", { .u32 = 0 }}; struct dict_enumval_data t_1 = { "Unsubscribe", { .u32 = 1 }}; CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new(DICT_AVP, &data, type, NULL); return 0; } int sh_dict_def_avp_group_706() { /* Requested-Domain AVP */ struct dict_avp_data data = { 706, /* Code */ SH_VND_ID, /* Vendor */ "Requested-Domain", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Requested-Domain", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); struct dict_enumval_data t_0 = { "CS-Domain", { .u32 = 0 }}; struct dict_enumval_data t_1 = { "PS-Domain", { .u32 = 1 }}; CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new(DICT_AVP, &data, type, NULL); return 0; } int sh_dict_def_avp_group_707() { /* Current-Location AVP */ struct dict_avp_data data = { 707, /* Code */ SH_VND_ID, /* Vendor */ "Current-Location", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Current-Location", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); struct dict_enumval_data t_0 = { "DoNotNeedInitiateActiveLocationRetrieval", { .u32 = 0 }}; struct dict_enumval_data t_1 = { "InitiateActiveLocationRetrieval", { .u32 = 1 }}; CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new(DICT_AVP, &data, type, NULL); return 0; } int sh_dict_def_avp_group_708() { /* Identity-Set AVP */ struct dict_avp_data data = { 708, /* Code */ SH_VND_ID, /* Vendor */ "Identity-Set", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Identity-Set", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); struct dict_enumval_data t_0 = { "ALL_IDENTITIES", { .u32 = 0 }}; struct dict_enumval_data t_1 = { "REGISTERED_IDENTITIES", { .u32 = 1 }}; struct dict_enumval_data t_2 = { "IMPLICIT_IDENTITIES", { .u32 = 2 }}; struct dict_enumval_data t_3 = { "ALIAS_IDENTITIES", { .u32 = 3 }}; CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_3 , type, NULL); CHECK_dict_new(DICT_AVP, &data, type, NULL); return 0; } int sh_dict_def_avp_group_701() { /* Send-Data-Indication AVP*/ struct dict_avp_data data = { 710, /* Code */ SH_VND_ID, /* Vendor */ "Send-Data-Indication", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Send-Data-Indication)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); struct dict_enumval_data t_0 = { "USER_DATA_NOT_REQUESTED", { .u32 = 0 }}; struct dict_enumval_data t_1 = { "USER_DATA_REQUESTED", { .u32 = 1 }}; CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new(DICT_AVP, &data, type, NULL); return 0; } int sh_dict_def_avp_group_712() { /* One-Time-Notification AVP*/ struct dict_avp_data data = { 712, /* Code */ SH_VND_ID, /* Vendor */ "One-Time-Notification", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(One-Time-Notification)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); struct dict_enumval_data t_0 = { "ONE_TIME_NOTIFICATION_REQUESTED", { .u32 = 0 }}; CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new(DICT_AVP, &data, type, NULL); return 0; } int sh_dict_def_avp_group_714() { /* Serving-Node-Indication AVP*/ struct dict_avp_data data = { 714, /* Code */ SH_VND_ID, /* Vendor */ "Serving-Node-Indication", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Serving-Node-Indication)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); struct dict_enumval_data t_0 = { "ONLY_SERVING_NODES_REQUIRED", { .u32 = 0 }}; CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new(DICT_AVP, &data, type, NULL); return 0; } int sh_dict_def_avp_group_715() { /* Repository-Data-ID AVP */ /* The Repository-Data-ID AVP is of type Grouped. This AVP shall contain a Service-Indication AVP and a Sequence- Number AVP. AVP format Repository-Data-ID ::= {Service-Indication} {Sequence-Number} *[AVP] */ struct dict_object * avp; struct dict_avp_data data = { 715, /* Code */ SH_VND_ID, /* Vendor */ "Repository-Data-ID", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Service-Indication", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "Sequence-Numbe", SH_VND_ID, RULE_REQUIRED, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); return 0; } int sh_dict_def_avp_group_717() { /* Pre-paging-Supported AVP */ struct dict_avp_data data = { 717, /* Code */ SH_VND_ID, /* Vendor */ "Pre-paging-Supported", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Pre-paging-Supported)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); struct dict_enumval_data t_0 = { "PREPAGING_NOT_SUPPORTED", { .u32 = 0 }}; struct dict_enumval_data t_1 = { "PREPAGING_SUPPORTED", { .u32 = 1 }}; CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new(DICT_AVP, &data, type, NULL); return 0; } int sh_dict_def_avp_group_718() { /* Local-Time-Zone-Indication AVP */ struct dict_avp_data data = { 718, /* Code */ SH_VND_ID, /* Vendor */ "Local-Time-Zone-Indication", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Local-Time-Zone-Indication)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); struct dict_enumval_data t_0 = { "ONLY_LOCAL_TIME_ZONE_REQUESTED", { .u32 = 0 }}; struct dict_enumval_data t_1 = { "LOCAL_TIME_ZONE_WITH_LOCATION_INFO_REQUESTED", { .u32 = 1 }}; CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new(DICT_AVP, &data, type, NULL); return 0; } int sh_dict_def_avp_group_720() { /* Call-Reference-Info AVP */ /* The Call-Reference-Info AVP is of type Grouped. This AVP shall contain a Call-Reference-Number AVP and an ASNumber AVP. AVP format Call-Reference-Info ::= {Call-Reference-Number} {AS-Number} *[AVP] */ struct dict_object * avp; struct dict_avp_data data = { 720, /* Code */ SH_VND_ID, /* Vendor */ "Call-Reference-Info", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Call-Reference-Number", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "AS-Number}", SH_VND_ID, RULE_REQUIRED, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); return 0; } int sh_dict_def_avp_group_621() { /* OC-Supported-Features AVP */ /* The OC-Supported-Features AVP (AVP Code 621) is of type Grouped and serves two purposes. First, it announces a node's support for the DOIC solution in general. Second, it contains the description of the supported DOIC features of the sending node. The OC-Supported- Features AVP MUST be included in every Diameter request message a DOIC supporting node sends. OC-Supported-Features ::= < AVP Header: 621 > [ OC-Feature-Vector ] * [ AVP ] */ struct dict_object * avp; struct dict_avp_data data = { 621, /* Code */ SH_VND_ID, /* Vendor */ "OC-Supported-Features", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "OC-Feature-Vector", SH_VND_ID, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); return 0; } int sh_dict_def_avp_group_626() { /* OC-Report-Type AVP */ struct dict_avp_data data = { 626, /* Code */ SH_VND_ID, /* Vendor */ "OC-Report-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "OC-Report-Type", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); struct dict_enumval_data t_0 = { "HOST_REPORT", { .u32 = 0 }}; struct dict_enumval_data t_1 = { "REALM_REPORT", { .u32 = 1 }}; CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new(DICT_AVP, &data, type, NULL); return 0; } int sh_dict_def_avp_group_627() { /* OC-Reduction-Percentage AVP */ struct dict_avp_data data = { 627, /* Code */ SH_VND_ID, /* Vendor */ "OC-Reduction-Percentage", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "OC-Reduction-Percentage", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); return 0; } int sh_dict_def_avp_group_623() { /* OC-OLR AVP */ /* OC-OLR ::= < AVP Header: 623 > < OC-Sequence-Number > < OC-Report-Type > [ OC-Reduction-Percentage ] [ OC-Validity-Duration ] * [ AVP ] */ struct dict_object * avp; struct dict_avp_data data = { 623, /* Code */ SH_VND_ID, /* Vendor */ "OC-OLR", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "OC-Sequence-Number", SH_VND_ID, RULE_FIXED_HEAD, -1, 1 } /* flag to be make sure */ ,{ "OC-Report-Type", SH_VND_ID, RULE_FIXED_HEAD, -1, 1 } /* flag to be make sure */ ,{ "OC-Reduction-Percentage", SH_VND_ID, RULE_OPTIONAL, -1, 1 } /* flag to be make sure */ ,{ "OC-Validity-Duration", SH_VND_ID, RULE_OPTIONAL, -1, 1 } /* flag to be make sure */ }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); return 0; } int sh_dict_def_avp_group_625() { /* OC-Validity-Duration AVP */ struct dict_avp_data data = { 625, /* Code */ SH_VND_ID, /* Vendor */ "OC-Validity-Duration", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "OC-Validity-Duration", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); return 0; } int sh_dict_def_avp_group_700() { /* User-Identity ::= [Public-Identity] [MSISDN] *[AVP] */ /* User-Identity group */ struct dict_object * avp = NULL; struct dict_avp_data data = { 700, /* Code */ SH_VND_ID, /* Vendor */ "User-Identity", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Public-Identity", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "MSISDN", SH_VND_ID, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); return 0; } int sh_dict_def_avp_group_723() { /* OC-Validity-Duration AVP */ struct dict_avp_data data = { 723, /* Code */ SH_VND_ID, /* Vendor */ "DRMP", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "DRMP", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); struct dict_enumval_data t_15 = { "PRIORITY_15", { .u32 = 15 }}; struct dict_enumval_data t_14 = { "PRIORITY_14", { .u32 = 14 }}; struct dict_enumval_data t_13 = { "PRIORITY_13", { .u32 = 13 }}; struct dict_enumval_data t_12 = { "PRIORITY_12", { .u32 = 12 }}; struct dict_enumval_data t_11 = { "PRIORITY_11", { .u32 = 11 }}; struct dict_enumval_data t_10 = { "PRIORITY_10", { .u32 = 10 }}; struct dict_enumval_data t_9 = { "PRIORITY_9", { .u32 = 9 }}; struct dict_enumval_data t_8 = { "PRIORITY_8", { .u32 = 8 }}; struct dict_enumval_data t_7 = { "PRIORITY_7", { .u32 = 7 }}; struct dict_enumval_data t_6 = { "PRIORITY_6", { .u32 = 6 }}; struct dict_enumval_data t_5 = { "PRIORITY_5", { .u32 = 5 }}; struct dict_enumval_data t_4 = { "PRIORITY_4", { .u32 = 4 }}; struct dict_enumval_data t_3 = { "PRIORITY_3", { .u32 = 3 }}; struct dict_enumval_data t_2 = { "PRIORITY_2", { .u32 = 2 }}; struct dict_enumval_data t_1 = { "PRIORITY_1", { .u32 = 1 }}; struct dict_enumval_data t_0 = { "PRIORITY_0", { .u32 = 0 }}; CHECK_dict_new( DICT_ENUMVAL, &t_15 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_14 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_13 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_12 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_11 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_10 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_9 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_8 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_7 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_6 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_5 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_4 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_3 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new(DICT_AVP, &data, type, NULL); return 0; } int sh_dict_def_cmd_udr() { /* User-Data-Request (UDR) Command */ /* The User-Data-Request (UDR) command, indicated by the Com mand-Code field set to 306 and the 然?bit set in the Command Flags field, is sent by a Diameter client to a Diameter server in order to request user data. Message Format: < User-Data -Request> ::= < Diameter Header: 306, REQ, PXY, 16777217 > < Session-Id > [ DRMP ] { Vendor-Specific-Application-Id } { Auth-Session-State } { Origin-Host } { Origin-Realm } [ Destination-Host ] { Destination-Realm } *[ Supported-Features ] { User-Identity } [ Wildcarded-Public-Identity ] [ Wildcarded-IMPU ] [ Server-Name ] *[ Service-Indication ] *{ Data-Reference } *[ Identity-Set ] [ Requested-Domain ] [ Current-Location ] *[ DSAI-Tag ] [ Session-Priority ] [ User-Name ] [ Requested-Nodes ] [ Serving-Node-Indication ] [ Pre-paging-Supported ] [ Local-Time-Zone-Indication ] [ UDR-Flags ] [ Call-Reference-Info ] [ OC-Supported-Features ] *[ AVP ] *[ Proxy-Info ] *[ Route-Record ] */ // struct dict_object * udr_cmd; // cmd; struct dict_cmd_data data = { 306, /* Code */ "User-Data-Request", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", 0, RULE_FIXED_HEAD, -1, 1 } ,{ "DRMP", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Vendor-Specific-Application-Id", 0, RULE_REQUIRED, -1, 1 } ,{ "Auth-Session-State", 0, RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", 0, RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", 0, RULE_REQUIRED, -1, 1 } ,{ "Destination-Host", 0, RULE_OPTIONAL, -1, 1 } ,{ "Destination-Realm", 0, RULE_REQUIRED, -1, 1 } ,{ "Supported-Features", SH_VND_ID, RULE_OPTIONAL, -1, -1 } ,{ "User-Identity", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "Wildcarded-Public-Identity", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Wildcarded-IMPU", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Server-Name", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Service-Indication", SH_VND_ID, RULE_OPTIONAL, -1, -1 } ,{ "Data-Reference", SH_VND_ID, RULE_REQUIRED, -1, -1 } ,{ "Identity-Set", SH_VND_ID, RULE_OPTIONAL, -1, -1 } ,{ "Requested-Domain", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Current-Location", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "DSAI-Tag", SH_VND_ID, RULE_OPTIONAL, -1, -1 } ,{ "Session-Priority", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "User-Name", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Requested-Nodes", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Serving-Node-Indication", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Pre-paging-Supported", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Local-Time-Zone-Indication", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "UDR-Flags", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Call-Reference-Info", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "OC-Supported-Features", SH_VND_ID, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_COMMAND, &data , NULL/*sh_appli*/, &udr_cmd); // &cmd); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), udr_cmd); // cmd ); return 0; } int sh_dict_def_cmd_uda() { /* User-Data-Answer (UDA) Command */ /* The User-Data-Answer (UDA) command, indicated by the Command-Code field set to 306 and the 然?bit cleared in the Command Flags field, is sent by a server in response to the User-Data-Request command. The Experimental-Result AVP may contain one of the values defined in section 6.2 or in 3GPP TS 29.229 [6]. Message Format: < User-Data-Answer > ::= < Diameter Header: 306, PXY, 16777217 > < Session-Id > [ DRMP ] { Vendor-Specific-Application-Id } [ Result-Code ] [ Experimental-Result ] { Auth-Session-State } { Origin-Host } { Origin-Realm } *[ Supported-Features ] [ Wildcarded-Public-Identity ] [ Wildcarded-IMPU ] [ User-Data ] [ OC-Supported-Features ] [ OC-OLR ] *[ AVP ] *[ Failed-AVP ] *[ Proxy-Info ] *[ Route-Record ] */ // struct dict_object *uda_cmd; // cmd; struct dict_cmd_data data = { 306, /* Code */ "User-Data-Answer", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", 0, RULE_FIXED_HEAD, -1, 1 } ,{ "DRMP", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Vendor-Specific-Application-Id", 0, RULE_REQUIRED, -1, 1 } ,{ "Result-Code", 0, RULE_OPTIONAL, -1, 1 } ,{ "Experimental-Result", 0, RULE_OPTIONAL, -1, 1 } ,{ "Auth-Session-State", 0, RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", 0, RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", 0, RULE_REQUIRED, -1, 1 } ,{ "Supported-Features", SH_VND_ID, RULE_OPTIONAL, -1, -1 } ,{ "Wildcarded-Public-Identity", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Wildcarded-IMPU", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "User-Data", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "OC-Supported-Features", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "OC-OLR", SH_VND_ID, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_COMMAND, &data , NULL/*sh_appli*/, &uda_cmd); // &cmd); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), uda_cmd/*cmd*/); return 0; } int sh_dict_def_cmd_pur() { /* Profile-Update-Request (PUR) Command */ /* The Profile-Update-Request (PUR) command, indicated by the Command-Code field set to 307 and the 然?bit set in the Command Flags field, is sent by a Diameter client to a Diameter server in order to update user data in the server. Message Format: < Profile-Update-Request > ::= < Diameter Header: 307, REQ, PXY, 16777217 > < Session-Id > [ DRMP ] { Vendor-Specific-Application-Id } { Auth-Session-State } { Origin-Host } { Origin-Realm } [ Destination-Host ] { Destination-Realm } *[ Supported-Features ] { User-Identity } [ Wildcarded-Public-Identity ] [ Wildcarded-IMPU ] [ User-Name ] *{ Data-Reference } { User-Data } [ OC-Supported-Features ] *[ AVP ] *[ Proxy-Info ] *[ Route-Record ] */ // struct dict_object * pur_cmd; // cmd; struct dict_cmd_data data = { 307, /* Code */ "Profile-Update-Request", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", 0, RULE_FIXED_HEAD, -1, 1 } ,{ "DRMP", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Vendor-Specific-Application-Id", 0, RULE_REQUIRED, -1, 1 } ,{ "Auth-Session-State", 0, RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", 0, RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", 0, RULE_REQUIRED, -1, 1 } ,{ "Destination-Host", 0, RULE_OPTIONAL, -1, 1 } ,{ "Destination-Realm", 0, RULE_REQUIRED, -1, 1 } ,{ "Supported-Features", SH_VND_ID, RULE_OPTIONAL, -1, -1 } ,{ "User-Identity", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "Wildcarded-Public-Identity", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Wildcarded-IMPU", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "User-Name", 0, RULE_OPTIONAL, -1, 1 } ,{ "Data-Reference", SH_VND_ID, RULE_REQUIRED, -1, -1 } ,{ "User-Data", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "OC-Supported-Features", SH_VND_ID, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_COMMAND, &data , NULL/*sh_appli*/, &pur_cmd); // &cmd); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), pur_cmd); // cmd ); return 0; } int sh_dict_def_cmd_pua() { /* Profile-Update-Answer (PUA) Command */ /* The Profile-Update-Answer (PUA) command, indicated by the Command-Code field set to 307 and the 然?bit cleared in the Command Flags field, is sent by a server in response to the Profile-Update-Request command. The Experimental- Result AVP may contain one of the values defined in section 6.2 or in 3GPP TS 29.229 [6]. Message Format: < Profile-Update-Answer > ::=< Diameter Header: 307, PXY, 16777217 > < Session-Id > [ DRMP ] { Vendor-Specific-Application-Id } [ Result-Code ] [ Experimental-Result ] { Auth-Session-State } { Origin-Host } { Origin-Realm } [ Wildcarded-Public-Identity ] [ Wildcarded-IMPU ] [ Repository-Data-ID ] [ Data-Reference ] *[ Supported-Features ] [ OC-Supported-Features ] [ OC-OLR ] *[ AVP ] *[ Failed-AVP ] *[ Proxy-Info ] *[ Route-Record ] */ // struct dict_object * pur_cmd;// cmd; struct dict_cmd_data data = { 307, /* Code */ "Profile-Update-Answer", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", 0, RULE_FIXED_HEAD, -1, 1 } ,{ "DRMP", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Vendor-Specific-Application-Id", 0, RULE_REQUIRED, -1, 1 } ,{ "Result-Code", 0, RULE_OPTIONAL, -1, 1 } ,{ "Experimental-Result", 0, RULE_OPTIONAL, -1, 1 } ,{ "Auth-Session-State", 0, RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", 0, RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", 0, RULE_REQUIRED, -1, 1 } ,{ "Wildcarded-Public-Identity", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Wildcarded-IMPU", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Repository-Data-ID", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Data-Reference", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Supported-Features", SH_VND_ID, RULE_OPTIONAL, -1, -1 } ,{ "OC-Supported-Features", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "OC-OLR", SH_VND_ID, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_COMMAND, &data , NULL/*sh_appli*/, &pua_cmd); // &cmd); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), pua_cmd); // cmd ); return 0; } int sh_dict_def_avp_3x() { SH_DEF_AVP(30,0,"Called-Station-Id",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_MANDATORY,AVP_TYPE_OCTETSTRING, UTF8String_type) return 0; } int sh_dict_def_avp_3xx() { SH_DEF_AVP(363,0,"Accounting-Input-Octets",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_MANDATORY,AVP_TYPE_UNSIGNED64, NULL) SH_DEF_AVP(364,0,"Accounting-Output-Octets",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_MANDATORY,AVP_TYPE_UNSIGNED64, NULL) SH_DEF_AVP(365,0,"Accounting-Input-Packets",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_MANDATORY,AVP_TYPE_UNSIGNED64, NULL) SH_DEF_AVP(366,0,"Accounting-Output-Packets",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_MANDATORY,AVP_TYPE_UNSIGNED64, NULL) return 0; } int sh_dict_def_avp_8xx() { SH_DEF_AVP(824,SH_VND_ID,"SIP-Method",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(825,SH_VND_ID,"Event",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(826,SH_VND_ID,"Content-Type",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(827,SH_VND_ID,"Content-Length",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_UNSIGNED32, NULL) SH_DEF_AVP(828,SH_VND_ID,"Content-Disposition",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(829,SH_VND_ID,"Role-of-Node",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_INTEGER32, NULL) SH_DEF_AVP(830,SH_VND_ID,"User-Session-Id",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(831,SH_VND_ID,"Calling-Party-Address",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(832,SH_VND_ID,"Called-Party-Address",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(834, SH_VND_ID, "SIP-Request-Timestamp", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR, AVP_TYPE_OCTETSTRING, Time_type) SH_DEF_AVP(835, SH_VND_ID, "SIP-Response-Timestamp", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR, AVP_TYPE_OCTETSTRING, Time_type) SH_DEF_AVP(839,SH_VND_ID,"Originating-IOI",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(840,SH_VND_ID,"Terminating-IOI",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(841,SH_VND_ID,"IMS-Charging-Identifier",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(842,SH_VND_ID,"SDP-Session-Description",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(844,SH_VND_ID,"SDP-Media-Name",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(845,SH_VND_ID,"SDP-Media-Description",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(846, SH_VND_ID, "CG-Address", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR, AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(847, SH_VND_ID, "GGSN-Address", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR, AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(849,SH_VND_ID,"Authorized-QoS",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(852,SH_VND_ID,"Incoming-Trunk-Group-ID",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(853,SH_VND_ID,"Outgoing-Trunk-Group-Id",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(854,SH_VND_ID,"Bearer-Service",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(862,SH_VND_ID,"Node-Functionality",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_INTEGER32, NULL) /* fj added 2021.2.24 for OCS CCR witch avp Service-Specific-Info */ SH_DEF_AVP(863, SH_VND_ID, "Service-Specific-Data", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(866,SH_VND_ID,"PS-Free-Format-Data",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(867,SH_VND_ID,"PS-Append-Free-Format-Data",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_INTEGER32, NULL) SH_DEF_AVP(872,SH_VND_ID,"Reporting-Reason",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_INTEGER32, NULL) SH_DEF_AVP(881,SH_VND_ID,"Quota-Consumption-Time",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_UNSIGNED32, NULL) SH_DEF_AVP(882,SH_VND_ID,"Media-Initiator-Flag",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_INTEGER32, NULL) SH_DEF_AVP(888, SH_VND_ID, "Expires", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR, AVP_TYPE_UNSIGNED32, NULL) /* fj added 20161221 for OCS SMS start */ SH_DEF_AVP(897,SH_VND_ID,"Address-Data",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_OCTETSTRING, UTF8String_type) /* fj added 20161221 for OCS SMS end */ return 0; } int sh_dict_def_avp_1xxx() { SH_DEF_AVP(1004, SH_VND_ID, "Charging-Rule-Base-Name", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR, AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(1020,SH_VND_ID,"Bearer-Identifier",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(1025,SH_VND_ID,"Guaranteed-Bitrate-DL",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_UNSIGNED32, NULL) SH_DEF_AVP(1026,SH_VND_ID,"Guaranteed-Bitrate-UL",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_UNSIGNED32, NULL) SH_DEF_AVP(1027,SH_VND_ID,"IP-CAN-Type",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_INTEGER32, NULL) SH_DEF_AVP(1028,SH_VND_ID,"QoS-Class-Identifier",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_INTEGER32, NULL) SH_DEF_AVP(1032,SH_VND_ID,"RAT-Type",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_INTEGER32, NULL) SH_DEF_AVP(1040,SH_VND_ID,"APN-Aggregate-Max-Bitrate-DL",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_INTEGER32, NULL) SH_DEF_AVP(1041,SH_VND_ID,"APN-Aggregate-Max-Bitrate-UL",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_INTEGER32, NULL) SH_DEF_AVP(1046,SH_VND_ID,"Priority-Level",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_UNSIGNED32, NULL) SH_DEF_AVP(1047,SH_VND_ID,"Pre-emption-Capability",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_INTEGER32, NULL) SH_DEF_AVP(1048,SH_VND_ID,"Pre-emption-Vulnerability",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_INTEGER32, NULL) /* fj added 20161221 for OCS SMS start */ SH_DEF_AVP(1200,SH_VND_ID,"Domain-Name",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_OCTETSTRING, UTF8String_type) /* fj added 20161221 for OCS SMS end */ SH_DEF_AVP(1228, SH_VND_ID, "SGSN-Address", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR, AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(1251,SH_VND_ID,"Requested-Party-Address",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_OCTETSTRING, UTF8String_type) /* fj added 2021.2.24 for OCS CCR witch avp Service-Specific-Info */ SH_DEF_AVP(1257, SH_VND_ID, "Service-Specific-Type", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_TYPE_UNSIGNED32, NULL) SH_DEF_AVP(1263,SH_VND_ID,"Access-Network-Information",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(1265,SH_VND_ID,"Base-Time-Interval",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_UNSIGNED32, NULL) SH_DEF_AVP(1268,SH_VND_ID,"Envelope-Reporting",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_INTEGER32, NULL) SH_DEF_AVP(1271,SH_VND_ID,"Time-Quota-Type",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_INTEGER32, NULL) SH_DEF_AVP(1288,SH_VND_ID,"Media-Initiator-Party",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(1437,SH_VND_ID,"CSG-Id",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_UNSIGNED32, NULL) return 0; } int sh_dict_def_avp_2xxx() { /* fj added 20161221 for OCS SMS start */ SH_DEF_AVP(2001,SH_VND_ID,"Data-Coding-Scheme",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_INTEGER32, NULL) SH_DEF_AVP(2003,SH_VND_ID,"Interface-Id",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(2004,SH_VND_ID,"Interface-Port",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(2005,SH_VND_ID,"Interface-Text",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(2008, SH_VND_ID, "Originator-SCCP-Address", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR, AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(2010, SH_VND_ID, "Recipient-SCCP-Address", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR, AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(2012, SH_VND_ID, "SM-Discharge-Time", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR, AVP_TYPE_OCTETSTRING, Time_type) SH_DEF_AVP(2013,SH_VND_ID,"SM-Protocol-ID",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(2014,SH_VND_ID,"SM-Status",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(2015,SH_VND_ID,"SM-User-Data-Header",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(2017, SH_VND_ID, "SMSC-Address", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR, AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(2018, SH_VND_ID, "Client-Address", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR, AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(2019,SH_VND_ID,"Number-Of-Messages-Sent",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_UNSIGNED32, NULL) SH_DEF_AVP(2029,SH_VND_ID,"SM-Service-Type",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_INTEGER32, NULL) /* fj added 20161221 for OCS SMS end */ SH_DEF_AVP(2036,SH_VND_ID,"SDP-Type",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_INTEGER32, NULL) SH_DEF_AVP(2037,SH_VND_ID,"Change-Condition",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_INTEGER32, NULL) SH_DEF_AVP(2038, SH_VND_ID, "Change-Time", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR, AVP_TYPE_OCTETSTRING, Time_type) SH_DEF_AVP(2039,SH_VND_ID,"Diagnostics",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_INTEGER32, NULL) SH_DEF_AVP(2041,SH_VND_ID,"Start-Time",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(2042,SH_VND_ID,"Stop-Time",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(2047, SH_VND_ID, "Serving-Node-Type", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR, AVP_TYPE_UNSIGNED32, NULL) SH_DEF_AVP(2050, SH_VND_ID, "PDN-Connection-ID", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR, AVP_TYPE_UNSIGNED32, NULL) SH_DEF_AVP(2051, SH_VND_ID, "Dynamic-Address-Flag", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR, AVP_TYPE_UNSIGNED32, NULL) SH_DEF_AVP(2064, SH_VND_ID, "Node-Id", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR, AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(2065, SH_VND_ID, "SGW-Change", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR, AVP_TYPE_UNSIGNED32, NULL) SH_DEF_AVP(2066,SH_VND_ID,"Charging-Characteristics-Selection-Mode",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_INTEGER32, NULL) SH_DEF_AVP(2067, SH_VND_ID, "SGW-Address", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR, AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(2301, SH_VND_ID, "SIP-Request-Timestamp-Fraction", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR, AVP_TYPE_UNSIGNED32, NULL) SH_DEF_AVP(2302, SH_VND_ID, "SIP-Response-Timestamp-Fraction", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR, AVP_TYPE_UNSIGNED32, NULL) SH_DEF_AVP(2308, SH_VND_ID, "IMSI-Unauthenticated-Flag", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR, AVP_TYPE_UNSIGNED32, NULL) SH_DEF_AVP(2317,SH_VND_ID,"CSG-Access-Mode",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_INTEGER32, NULL) SH_DEF_AVP(2318,SH_VND_ID,"CSG-Membership-Indication",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY,AVP_TYPE_INTEGER32, NULL) return 0; } int sh_dict_def_avp_3xxx() { SH_DEF_AVP(3413, SH_VND_ID, "Teleservice", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(3417, SH_VND_ID, "MSC-Address", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, AVP_TYPE_OCTETSTRING, UTF8String_type) SH_DEF_AVP(3420, SH_VND_ID, "VLR-Number", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, AVP_TYPE_OCTETSTRING, UTF8String_type) return 0; } int sh_dict_def_avp_9xxx() { SH_DEF_AVP(9010, 5535, "3GPP2-BSID", AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR, AVP_TYPE_OCTETSTRING, UTF8String_type) return 0; } int sh_dict_def_avp_2xxxx() { SH_DEF_AVP(20820,2011,"huawei_avp_20820",AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR,AVP_TYPE_INTEGER32, NULL) return 0; } int sh_dict_def_avp_group_823() { /* Event-Type AVP */ /* :: = [ SIP-Method ] [ Event ] [ Expires ] */ struct dict_object * avp; struct dict_avp_data data = { 823, /* Code */ SH_VND_ID, /* Vendor */ "Event-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "SIP-Method", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Event", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Expires", SH_VND_ID, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); return 0; } int sh_dict_def_avp_group_833() { /* Event-Type AVP */ /* Time-Stamps ::= < AVP Header: 833 > [ SIP-Request-Timestamp ] [ SIP-Response-Timestamp ] [ SIP-Request-Timestamp-Fraction ] [ SIP-Response-Timestamp-Fraction ] */ struct dict_object * avp; struct dict_avp_data data = { 833, /* Code */ SH_VND_ID, /* Vendor */ "Time-Stamps", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "SIP-Request-Timestamp", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "SIP-Response-Timestamp", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "SIP-Request-Timestamp-Fraction", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "SIP-Response-Timestamp-Fraction", SH_VND_ID, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); return 0; } int sh_dict_def_avp_group_838() { /* Inter-Operator-Identifier AVP */ /* [ Originating-IOI ] [ Terminating-IOI ] */ struct dict_object * avp; struct dict_avp_data data = { 838, /* Code */ SH_VND_ID, /* Vendor */ "Inter-Operator-Identifier", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Originating-IOI", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Terminating-IOI", SH_VND_ID, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); return 0; } int sh_dict_def_avp_group_843() { /* SDP-Media-Component AVP */ /* [ SDP-Media-Name ] * [ SDP-Media-Description ] [ Media-Initiator-Flag ] [ Media-Initiator-Party ] [ Authorized-QoS ] [ 3GPP-Charging-Id ] [ Access-Network-Charging-Identifier-Value ] [ SDP-Type ] */ struct dict_object * avp; struct dict_avp_data data = { 843, /* Code */ SH_VND_ID, /* Vendor */ "SDP-Media-Component", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "SDP-Media-Name", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "SDP-Media-Description", SH_VND_ID, RULE_REQUIRED, -1, -1 } ,{ "Media-Initiator-Flag", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Media-Initiator-Party", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Authorized-QoS", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "3GPP-Charging-Id", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Access-Network-Charging-Identifier-Value", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "SDP-Type", SH_VND_ID, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); return 0; } int sh_dict_def_avp_group_851() { /* PS-Furnish-Charging-Information AVP */ /* Trunk-Group-ID :: = [ Incoming-Trunk-Group-ID ] [ Outgoing-Trunk-Group-ID ] */ struct dict_object * avp; struct dict_avp_data data = { 851, /* Code */ SH_VND_ID, /* Vendor */ "Trunk-Group-ID", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Incoming-Trunk-Group-ID", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "Outgoing-Trunk-Group-ID", SH_VND_ID, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); return 0; } int sh_dict_def_avp_group_865() { /* PS-Furnish-Charging-Information AVP */ /* ::= < AVP Header: 865 > { PS-Free-Format-Data } 866/10415 OctetString 3H [ PS-Append-Free-Format-Data ] 867/10415 Enumerated SH */ struct dict_object * avp; struct dict_avp_data data = { 865, /* Code */ SH_VND_ID, /* Vendor */ "PS-Furnish-Charging-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "PS-Free-Format-Data", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "PS-Append-Free-Format-Data", SH_VND_ID, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); return 0; } int sh_dict_def_avp_group_889() { /* Message-Body AVP */ /* ::= < AVP Header: 889 > { Content-Type } { Content-Length } [ Content-Disposition */ struct dict_object * avp; struct dict_avp_data data = { 889, /* Code */ SH_VND_ID, /* Vendor */ "Message-Body", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Content-Type", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "Content-Length", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "Content-Disposition", SH_VND_ID, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); return 0; } int sh_dict_def_avp_group_898() { /* Address-Domain AVP */ /* Address-Domain :: = < AVP Header: 898 > [ Domain-Name ] [ 3GPP-IMSI-MCC-MNC ] */ struct dict_object * avp; struct dict_avp_data data = { 898, /* Code */ SH_VND_ID, /* Vendor */ "Address-Domain", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Domain-Name", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "3GPP-IMSI-MCC-MNC", SH_VND_ID, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); return 0; } int sh_dict_def_avp_group_899() { /* Address-Type AVP */ struct dict_avp_data data = { 899, /* Code */ SH_VND_ID, /* Vendor */ "Address-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Address-Type", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); struct dict_enumval_data t_0 = { "e-mail address", { .u32 = 0 }}; struct dict_enumval_data t_1 = { "MSISDN", { .u32 = 1 }}; struct dict_enumval_data t_2 = { "IPv4 Address", { .u32 = 2 }}; struct dict_enumval_data t_3 = { "IPv6 Address", { .u32 = 3 }}; struct dict_enumval_data t_4 = { "Numeric Shortcode", { .u32 = 4 }}; struct dict_enumval_data t_5 = { "Alphanumeric Shortcode", { .u32 = 5 }}; struct dict_enumval_data t_6 = { "Other", { .u32 = 6 }}; struct dict_enumval_data t_7 = { "IMSI", { .u32 = 7 }}; CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_3 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_4 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_5 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_6 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_7 , type, NULL); CHECK_dict_new(DICT_AVP, &data, type, NULL); return 0; } int sh_dict_def_avp_group_1034() { /* Allocation-Retention-Priority AVP */ /* ::= < AVP Header: 1034 > { Priority-Level } 1046/10415 Unsigned32 SH [ Pre-emption-Capability ] 1047/10415 Enumerated SH [ Pre-emption-Vulnerability ] 1048/10415 Enumerated SH */ struct dict_object * avp; struct dict_avp_data data = { 1034, /* Code */ SH_VND_ID, /* Vendor */ "Allocation-Retention-Priority", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Priority-Level", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "Pre-emption-Capability", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Pre-emption-Vulnerability", SH_VND_ID, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); return 0; } int sh_dict_def_avp_group_1201() { /* Recipient-Address AVP */ /* Recipient-Address :: = < AVP Header: 1201 > [ Address-Type ] [ Address-Data ] [ Address-Domain ] [ Addressee-Type ] */ struct dict_object * avp; struct dict_avp_data data = { 1201, /* Code */ SH_VND_ID, /* Vendor */ "Recipient-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Address-Type", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Address-Data", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "RAddress-Domain", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Addressee-Type", SH_VND_ID, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); return 0; } int sh_dict_def_avp_group_1208() { /* Addressee-Type AVP */ struct dict_avp_data data = { 1208, /* Code */ SH_VND_ID, /* Vendor */ "Addressee-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Addressee-Type", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); struct dict_enumval_data t_0 = { "UTO", { .u32 = 0 }}; struct dict_enumval_data t_1 = { "CC", { .u32 = 1 }}; struct dict_enumval_data t_2 = { "BCC", { .u32 = 2 }}; CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new(DICT_AVP, &data, type, NULL); return 0; } int sh_dict_def_avp_group_1249(void) { /* Service-Specific-Info AVP */ /* Service-Specific-Info ::= < AVP Header: 1249 > [ Service-Specific-Data ] [ Service-Specific-Type ] */ struct dict_object * avp; struct dict_avp_data data = { 1249, /* Code */ SH_VND_ID, /* Vendor */ "Service-Specific-Info", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Service-Specific-Data", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Service-Specific-Type", SH_VND_ID, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); return 0; } int sh_dict_def_avp_group_1270() { /* Time-Quota-Mechanism AVP */ /* ::= < AVP Header: 1270 > { Time-Quota-Type } 1271/10415 Enumerated SH { Base-Time-Interval } 1265/10415 Unsigned32 SH */ struct dict_object * avp; struct dict_avp_data data = { 1270, /* Code */ SH_VND_ID, /* Vendor */ "Time-Quota-Mechanism", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Time-Quota-Type", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "Base-Time-Interval", SH_VND_ID, RULE_REQUIRED, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); return 0; } int sh_dict_def_avp_group_1278() { /* Offline-Charging AVP */ /* ::= < AVP Header: 1278 > [ Quota-Consumption-Time ] 881/10415 Unsigned32 SH [ Time-Quota-Mechanism ] 1270/10415 { Time-Quota-Type } 1271/10415 Enumerated SH { Base-Time-Interval } 1265/10415 Unsigned32 SH [ Envelope-Reporting ] 1268/10415 Enumerated SH * [ Multiple-Services-Credit-Control ] [ Granted-Service-Unit ]XXXXXXXXXXXXXXXXXXXXXXXXXXXX [ Requested-Service-Unit ]XXXXXXXXXXXXXXXXXXXXXXXXXX * [ Used-Service-Unit ] [ Tariff-Change-Usage ]XXXXXXXXXXXXXXXXXXXXXXXXXXXXX * [ Service-Identifier ] [ Rating-Group ] * [ G-S-U-Pool-Reference ] [ Validity-Time ] [ Result-Code ] [ Final-Unit-Indication ] [ Time-Quota-Threshold ] [ Volume-Quota-Threshold ] [ Unit-Quota-Threshold ] [ Quota-Holding-Time ] [ Quota-Consumption-Time ] * [ Reporting-Reason ] [ Trigger ] [ PS-Furnish-Charging-Information ] [ Refund-Information ] * [ AVP ]XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */ struct dict_object * avp; struct dict_avp_data data = { 1278, /* Code */ SH_VND_ID, /* Vendor */ "Offline-Charging", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Quota-Consumption-Time", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Time-Quota-Mechanism", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Envelope-Reporting", SH_VND_ID, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); return 0; } int sh_dict_def_avp_group_2000() { /* SMS-Information AVP */ /* SMS-Information :: = < AVP Header: 2000> [ SMS-Node ] [ Client-Address ] [ Originator-SCCP-Address ] [ SMSC-Address ] [ Data-Coding-Scheme ] [ SM-Discharge-Time ] [ SM-Message-Type ] [ Originator-Interface ] [ SM-Protocol-ID ] [ Reply-Path-Requested ] [ SM-Status ] [ SM-User-Data-Header ] [ Number-Of-Messages-Sent ] * [ Recipient-Info ] [ Originator-Received-Address ] [ SM-Service-Type ] */ struct dict_object * avp; struct dict_avp_data data = { 2000, /* Code */ SH_VND_ID, /* Vendor */ "SMS-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "SMS-Node", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Client-Address", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Originator-SCCP-Address", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "SMSC-Address", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Data-Coding-Scheme", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "SM-Discharge-Time", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "SM-Message-Type", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Originator-Interface", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "SM-Protocol-ID", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Reply-Path-Requested", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "SM-Status", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "SM-User-Data-Header", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Number-Of-Messages-Sent", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Recipient-Info", SH_VND_ID, RULE_OPTIONAL, -1, -1 } ,{ "Originator-Received-Address", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "SM-Service-Type", SH_VND_ID, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); return 0; } int sh_dict_def_avp_group_2002() { /* Destination-Interface AVP */ /* Destination-Interface ::= < AVP Header: 2002 > [ Interface-Id ] [ Interface-Text ] [ Interface-Port ] [ Interface-Type ] */ struct dict_object * avp; struct dict_avp_data data = { 2002, /* Code */ SH_VND_ID, /* Vendor */ "Destination-Interface", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Interface-Id", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Interface-Text", SH_VND_ID, RULE_OPTIONAL, -1, -1 } ,{ "Interface-Port", SH_VND_ID, RULE_OPTIONAL, -1, -1 } ,{ "Interface-Type", SH_VND_ID, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); return 0; } int sh_dict_def_avp_group_2006() { /* Interface-Type AVP */ struct dict_avp_data data = { 2012, /* Code */ SH_VND_ID, /* Vendor */ "Interface-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Interface-Type", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); struct dict_enumval_data t_0 = { "Unknown", { .u32 = 0 }}; struct dict_enumval_data t_1 = { "MOBILE_ORIGINATING", { .u32 = 1 }}; struct dict_enumval_data t_2 = { "MOBILE_TERMINATING", { .u32 = 2 }}; struct dict_enumval_data t_3 = { "APPLICATION_ORIGINATING", { .u32 = 3 }}; struct dict_enumval_data t_4 = { "MAPPLICATION_TERMINATION", { .u32 = 4 }}; CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_3 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_4 , type, NULL); CHECK_dict_new(DICT_AVP, &data, type, NULL); return 0; } int sh_dict_def_avp_group_2009() { /* Originator-Interface AVP */ /* Originator-Interface ::= < AVP Header: 2009 > [ Interface-Id ] [ Interface-Text ] [ Interface-Port ] [ Interface-Type ] */ struct dict_object * avp; struct dict_avp_data data = { 2009, /* Code */ SH_VND_ID, /* Vendor */ "Originator-Interface", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Interface-Id", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Interface-Text", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Interface-Port", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Interface-Type", SH_VND_ID, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); return 0; } int sh_dict_def_avp_group_2011() { /* Reply-Path-Requested AVP */ struct dict_avp_data data = { 2011, /* Code */ SH_VND_ID, /* Vendor */ "Reply-Path-Requested", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Reply-Path-Requested", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); struct dict_enumval_data t_0 = { "No Reply Path Set", { .u32 = 0 }}; struct dict_enumval_data t_1 = { "Reply path Set", { .u32 = 1 }}; CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new(DICT_AVP, &data, type, NULL); return 0; } int sh_dict_def_avp_group_2026() { /* ORecipient-Info AVP */ /* Recipient-Info :: = < AVP Header: 2026 > [ Destination-Interface ] * [ Recipient-Address ] * [ Recipient-Received-Address ] [ Recipient-SCCP-Address ] [ SM-Protocol-ID ] */ struct dict_object * avp; struct dict_avp_data data = { 2026, /* Code */ SH_VND_ID, /* Vendor */ "Recipient-Info", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Destination-Interface", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Recipient-Address", SH_VND_ID, RULE_OPTIONAL, -1, -1 } ,{ "Recipient-Received-Address", SH_VND_ID, RULE_OPTIONAL, -1, -1 } ,{ "Recipient-SCCP-Address", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "SM-Protocol-ID", SH_VND_ID, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); return 0; } int sh_dict_def_avp_group_2027() { /* Originator-Received-Address AVP */ /* Originator-Received-Address :: = < AVP Header: 2027> [ Address-Type ] [ Address-Data ] [ Address-Domain ] */ struct dict_object * avp; struct dict_avp_data data = { 2027, /* Code */ SH_VND_ID, /* Vendor */ "Originator-Received-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Address-Type", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Address-Data", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Address-Domain", SH_VND_ID, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); return 0; } int sh_dict_def_avp_group_2028() { /* Recipient-Received-Address AVP */ /* Recipient-Received-Address :: = < AVP Header: 2028> [ Address-Type ] [ Address-Data ] [ Address-Domain ] */ struct dict_object * avp; struct dict_avp_data data = { 2028, /* Code */ SH_VND_ID, /* Vendor */ "Recipient-Received-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Address-Type", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Address-Data", SH_VND_ID, RULE_OPTIONAL, -1, -1 } ,{ "Address-Domain", SH_VND_ID, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); return 0; } int sh_dict_def_avp_group_2046() { /* Traffic-Data-Volumes AVP */ /* [ QoS-Information ] 1016/10415 [ QoS-Class-Identifier ] 1028/10415 Enumerated SH [ Max-Requested-Bandwidth-UL ] 516/10415 Unsigned32 SH [ Max-Requested-Bandwidth-DL ] 515/10415 Unsigned32 SH [ Guaranteed-Bitrate-UL ] 1026/10415 Unsigned32 SH [ Guaranteed-Bitrate-DL ] 1025/10415 Unsigned32 SH [ Bearer-Identifier ] 1020/10415 OctetString SH [ Allocation-Retention-Priority ] 1034/10415 { Priority-Level } 1046/10415 Unsigned32 SH [ Pre-emption-Capability ] 1047/10415 Enumerated SH [ Pre-emption-Vulnerability ] 1048/10415 Enumerated SH [ APN-Aggregate-Max-Bitrate-UL ] 1041/10415 Enumerated SH [ APN-Aggregate-Max-Bitrate-DL ] 1040/10415 Enumerated SH *[ Conditional-APN-Aggregate-Max-Bitrate ] 2818/10415 [ APN-Aggregate-Max-Bitrate-UL ] 1041/10415 Unsigned32 SH [ APN-Aggregate-Max-Bitrate-DL ] 1040/10415 Unsigned32 SH *[ IP-CAN-Type ] 1027/10415 Enumerated SH *[ RAT-Type ] 1032/10415 Enumerated SH *[ AVP ] *[ AVP ] [ Accounting-Input-Octets ] 363/ Unsigned64 [ Accounting-Input-Packets ] 365/ Unsigned64 [ Accounting-Output-Octets ] 364/ Unsigned64 [ Accounting-Output-Packets ] 366/ Unsigned64 [ Change-condition ] 2037/10415 Signed32 SH [ Change-Time ] 2038/10415 Time SH [ 3GPP-User-Location-Info ] 22/ OctetString */ struct dict_object * avp; struct dict_avp_data data = { 2046, /* Code */ SH_VND_ID, /* Vendor */ "Traffic-Data-Volumes", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "QoS-Information", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Accounting-Input-Octets", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Accounting-Input-Packets", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Accounting-Output-Octets", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Accounting-Output-Packets", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Change-Condition", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Change-Time", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "3GPP-User-Location-Info", SH_VND_ID, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); return 0; } int sh_dict_def_avp_group_2012() { /* SM-Message-Type AVP */ struct dict_avp_data data = { 2012, /* Code */ SH_VND_ID, /* Vendor */ "SM-Message-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "SM-Message-Type", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); struct dict_enumval_data t_0 = { "SUBMISSION", { .u32 = 0 }}; struct dict_enumval_data t_1 = { "DELIVERY_REPORT", { .u32 = 1 }}; struct dict_enumval_data t_2 = { "SM Service Request", { .u32 = 2 }}; CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new(DICT_AVP, &data, type, NULL); return 0; } int sh_dict_def_avp_group_2139() { /* User-CSG-Information AVP */ /* ::= < AVP Header: 2139 > { CSG-Id } 1437/10415 Unsigned32 SH { CSG-Access-Mode } 2317/10415 Enumerated SH [ CSG-Membership-Indication ] 2318/10415 Enumerated SH */ struct dict_object * avp; struct dict_avp_data data = { 2319, /* Code */ SH_VND_ID, /* Vendor */ "User-CSG-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "CSG-Id", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "CSG-Access-Mode", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "CSG-Membership-Indication", SH_VND_ID, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); return 0; } int sh_dict_def_avp_group_2016() { /* SMS-Node AVP */ struct dict_avp_data data = { 2016, /* Code */ SH_VND_ID, /* Vendor */ "SMS-Node", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "SMS-Node", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); struct dict_enumval_data t_0 = { "SMS Router", { .u32 = 0 }}; struct dict_enumval_data t_1 = { "IP-SM-GW", { .u32 = 1 }}; struct dict_enumval_data t_2 = { "SMS Router and IP-SM-GW", { .u32 = 2 }}; struct dict_enumval_data t_3 = { "SMS-SC", { .u32 = 3 }}; CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_3 , type, NULL); CHECK_dict_new(DICT_AVP, &data, type, NULL); return 0; } int sh_dict_def_avp_group_2818() { /* Conditional-APN-Aggregate-Max-Bitrate AVP */ /* ::= < AVP Header: 2818 > [ APN-Aggregate-Max-Bitrate-UL ] 1041/10415 Unsigned32 SH [ APN-Aggregate-Max-Bitrate-DL ] 1040/10415 Unsigned32 SH *[ IP-CAN-Type ] 1027/10415 Enumerated SH *[ RAT-Type ] 1032/10415 Enumerated SH *[ AVP ] */ struct dict_object * avp; struct dict_avp_data data = { 2818, /* Code */ SH_VND_ID, /* Vendor */ "Conditional-APN-Aggregate-Max-Bitrate", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "APN-Aggregate-Max-Bitrate-UL", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "APN-Aggregate-Max-Bitrate-DL", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "IP-CAN-Type", SH_VND_ID, RULE_OPTIONAL, -1, -1 } ,{ "RAT-Type", SH_VND_ID, RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); return 0; } int sh_dict_def_avp_group_3410() { /* VCS-Information AVP */ /* VCS-Information :: = < AVP Header: 3410> [ Bearer-Capability ] [ Network-Call-Reference-Number ] [ MSC-Address ] [ Basic-Service-Code ] [ ISUP-Location-Number ] [ VLR-Number ] [ Forwarding-Pending ] [ ISUP-Release-Cause ] [ Start-Time ] [ Start-of-Charging ] [ Stop-Time ] [ PS-Free-Format-Data ] */ struct dict_object * avp; struct dict_avp_data data = { 3410, /* Code */ SH_VND_ID, /* Vendor */ "VCS-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "MSC-Address", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Basic-Service-Code", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "VLR-Number", SH_VND_ID, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); return 0; } int sh_dict_def_avp_group_3411() { /* Basic-Service-Code AVP */ /* Basic-Service-Code:: = < AVP Header: 3411 > [ Bearer-Service ] [ Teleservice ] */ struct dict_object * avp; struct dict_avp_data data = { 3411, /* Code */ SH_VND_ID, /* Vendor */ "Basic-Service-Code", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Bearer-Service", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Teleservice", SH_VND_ID, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); return 0; } int sh_dict_init(char * conffile) { /* Applications section */ /* Create the vendors */ { struct dict_vendor_data vendor_data = { SH_VND_ID, "sh_vnd_id" }; CHECK_FCT(fd_dict_new(fd_g_config->cnf_dict, DICT_VENDOR, &vendor_data, NULL, &sh_vendor)); } { struct dict_vendor_data vendor_data = { HW_VND_ID, "hw_vnd_id" }; CHECK_FCT(fd_dict_new(fd_g_config->cnf_dict, DICT_VENDOR, &vendor_data, NULL, &hw_vendor)); } { struct dict_vendor_data vendor_data = { 5535, "5535" }; CHECK_FCT(fd_dict_new(fd_g_config->cnf_dict, DICT_VENDOR, &vendor_data, NULL, &uname_vendor_5535)); } { struct dict_vendor_data vendor_data = { 12645, "12645" }; CHECK_FCT(fd_dict_new(fd_g_config->cnf_dict, DICT_VENDOR, &vendor_data, NULL, &uname_vendor_12645)); } { struct dict_vendor_data vendor_data = { 3199, "3199" }; CHECK_FCT(fd_dict_new(fd_g_config->cnf_dict, DICT_VENDOR, &vendor_data, NULL, &uname_vendor_3199)); } { struct dict_vendor_data vendor_data = { 35, "35" }; CHECK_FCT(fd_dict_new(fd_g_config->cnf_dict, DICT_VENDOR, &vendor_data, NULL, &uname_vendor_35)); } { struct dict_vendor_data vendor_data = { 11, "11" }; CHECK_FCT(fd_dict_new(fd_g_config->cnf_dict, DICT_VENDOR, &vendor_data, NULL, &uname_vendor_11)); } /* { struct dict_vendor_data vendor_data = { 0, "Vendor0" }; CHECK_FCT(fd_dict_new(fd_g_config->cnf_dict, DICT_VENDOR, &vendor_data, NULL, &ven1_vendor)); } */ /* Create the application */ { struct dict_application_data data = { SH_APP_ID_OLD, "Gy/Ro Application" }; CHECK_dict_new( DICT_APPLICATION, &data , NULL/*sh_vendor*/, &sh_appli); } assert( 0 == sh_dict_def_avp() ); sh_dict_def_avp_group_628(); sh_dict_def_avp_group_700(); sh_dict_def_avp_group_703(); sh_dict_def_avp_group_708(); sh_dict_def_avp_group_706(); sh_dict_def_avp_group_707(); sh_dict_def_avp_group_650(); sh_dict_def_avp_group_714(); sh_dict_def_avp_group_717(); sh_dict_def_avp_group_718(); sh_dict_def_avp_group_720(); sh_dict_def_avp_group_621(); sh_dict_def_avp_group_623();sh_dict_def_avp_group_626();sh_dict_def_avp_group_625(); sh_dict_def_avp_group_723(); sh_dict_def_avp_group_715(); assert( 0 == sh_dict_def_cmd_udr() ); assert( 0 == sh_dict_def_cmd_uda() ); assert( 0 == sh_dict_def_cmd_pur() ); assert( 0 == sh_dict_def_cmd_pua() ); /* fj added 20160803 for CCR&CCA */ assert( 0 == sh_dict_def_avp_3x() ); assert( 0 == sh_dict_def_avp_3xx() ); assert( 0 == sh_dict_def_avp_8xx() ); assert( 0 == sh_dict_def_avp_1xxx() ); assert( 0 == sh_dict_def_avp_2xxx() ); assert( 0 == sh_dict_def_avp_9xxx() ); assert( 0 == sh_dict_def_avp_2xxxx() ); sh_dict_def_avp_group_823(); sh_dict_def_avp_group_833(); sh_dict_def_avp_group_838(); sh_dict_def_avp_group_843(); sh_dict_def_avp_group_851(); sh_dict_def_avp_group_865(); sh_dict_def_avp_group_889(); sh_dict_def_avp_group_1034(); sh_dict_def_avp_group_1270(); sh_dict_def_avp_group_1278(); /* fj added 20161221 for OCS SMS start */ sh_dict_def_avp_group_2028(); sh_dict_def_avp_group_1208(); sh_dict_def_avp_group_898(); sh_dict_def_avp_group_899(); sh_dict_def_avp_group_2027(); sh_dict_def_avp_group_1201(); sh_dict_def_avp_group_2006(); sh_dict_def_avp_group_2002(); sh_dict_def_avp_group_2026(); sh_dict_def_avp_group_2011(); sh_dict_def_avp_group_2009(); sh_dict_def_avp_group_2012(); sh_dict_def_avp_group_2016(); sh_dict_def_avp_group_2000(); /* fj added 20161221 for OCS SMS end */ sh_dict_def_avp_group_2046(); sh_dict_def_avp_group_2818(); sh_dict_def_avp_group_2139(); /* fj added 2021.2.24 for OCS CCR witch avp Service-Specific-Info */ sh_dict_def_avp_group_1249(); sh_dict_def_avp_group_1270(); sh_dict_def_avp_group_1278(); /* fj added 20170218 for RRC.VCS-Information */ sh_dict_def_avp_3xxx(); sh_dict_def_avp_group_3411(); sh_dict_def_avp_group_3410(); LOG_D( "Extension 'Dictionary definitions for 3GPP29.229&...' initialized"); return 0; } #if 0 int sh_dict_init_bak(char * conffile) { /* Applications section */ /* Create the vendors */ { struct dict_vendor_data vendor_data = { SH_VND_ID, "sh_vnd_id" }; CHECK_FCT(fd_dict_new(fd_g_config->cnf_dict, DICT_VENDOR, &vendor_data, NULL, &sh_vendor)); } #if 1 /* Create the application */ { struct dict_application_data data = { SH_APP_ID, "Sh Interface between AS and HSS Application" }; CHECK_dict_new( DICT_APPLICATION, &data , NULL/*sh_vendor*/, &sh_appli); } #endif /* AVP section */ { struct dict_object * UTF8String_type; struct dict_object * DiameterIdentity_type; struct dict_object * DiameterURI_type; struct dict_object * Time_type; CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "UTF8String", &UTF8String_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "DiameterIdentity", &DiameterIdentity_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "DiameterURI", &DiameterURI_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Time", &Time_type); /* base diameter avp. redefine of different vendor id */ { /* User-Name */ { /* The User-Name AVP (AVP Code 1) [RFC2865] is of type UTF8String, which contains the User-Name, in a format consistent with the NAI specification [RFC4282]. */ struct dict_avp_data data = { 1, /* Code */ SH_VND_ID, /* Vendor */ "User-Name", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } { struct dict_avp_data data = { 263, /* Code */ #if AC_SESSION_ID != 263 #error "AC_SESSION_ID definition mismatch" #endif SH_VND_ID, /* Vendor */ "Session-Id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Origin-Host */ { /* The Origin-Host AVP (AVP Code 264) is of type DiameterIdentity, and MUST be present in all Diameter messages. This AVP identifies the endpoint that originated the Diameter message. Relay agents MUST NOT modify this AVP. The value of the Origin-Host AVP is guaranteed to be unique within a single host. Note that the Origin-Host AVP may resolve to more than one address as the Diameter peer may support more than one address. This AVP SHOULD be placed as close to the Diameter header as possible. */ struct dict_avp_data data = { 264, /* Code */ #if AC_ORIGIN_HOST != 264 #error "AC_ORIGIN_HOST definition mismatch" #endif SH_VND_ID, /* Vendor */ "Origin-Host", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , DiameterIdentity_type, NULL); } /* Origin-Realm */ { /* The Origin-Realm AVP (AVP Code 296) is of type DiameterIdentity. This AVP contains the Realm of the originator of any Diameter message and MUST be present in all messages. This AVP SHOULD be placed as close to the Diameter header as possible. */ struct dict_avp_data data = { 296, /* Code */ #if AC_ORIGIN_REALM != 296 #error "AC_ORIGIN_REALM definition mismatch" #endif SH_VND_ID, /* Vendor */ "Origin-Realm", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , DiameterIdentity_type, NULL); } /* Destination-Host */ { /* The Destination-Host AVP (AVP Code 293) is of type DiameterIdentity. This AVP MUST be present in all unsolicited agent initiated messages, MAY be present in request messages, and MUST NOT be present in Answer messages. The absence of the Destination-Host AVP will cause a message to be sent to any Diameter server supporting the application within the realm specified in Destination-Realm AVP. This AVP SHOULD be placed as close to the Diameter header as possible. */ struct dict_avp_data data = { 293, /* Code */ #if AC_DESTINATION_HOST != 293 #error "AC_DESTINATION_HOST definition mismatch" #endif SH_VND_ID, /* Vendor */ "Destination-Host", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , DiameterIdentity_type, NULL); } /* Destination-Realm */ { /* The Destination-Realm AVP (AVP Code 283) is of type DiameterIdentity, and contains the realm the message is to be routed to. The Destination-Realm AVP MUST NOT be present in Answer messages. Diameter Clients insert the realm portion of the User-Name AVP. Diameter servers initiating a request message use the value of the Origin-Realm AVP from a previous message received from the intended target host (unless it is known a priori). When present, the Destination-Realm AVP is used to perform message routing decisions. Request messages whose ABNF does not list the Destination-Realm AVP as a mandatory AVP are inherently non-routable messages. This AVP SHOULD be placed as close to the Diameter header as possible. */ struct dict_avp_data data = { 283, /* Code */ #if AC_DESTINATION_REALM != 283 #error "AC_DESTINATION_REALM definition mismatch" #endif SH_VND_ID, /* Vendor */ "Destination-Realm", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , DiameterIdentity_type, NULL); } } /* Result-Code */ { /* The Result-Code AVP (AVP Code 268) is of type Unsigned32 and indicates whether a particular request was completed successfully or whether an error occurred. All Diameter answer messages defined in IETF applications MUST include one Result-Code AVP. A non-successful Result-Code AVP (one containing a non 2xxx value other than DIAMETER_REDIRECT_INDICATION) MUST include the Error-Reporting-Host AVP if the host setting the Result-Code AVP is different from the identity encoded in the Origin-Host AVP. The Result-Code data field contains an IANA-managed 32-bit address space representing errors (see Section 11.4). Diameter provides the following classes of errors, all identified by the thousands digit in the decimal notation: o 1xxx (Informational) o 2xxx (Success) o 3xxx (Protocol Errors) o 4xxx (Transient Failures) o 5xxx (Permanent Failure) A non-recognized class (one whose first digit is not defined in this section) MUST be handled as a permanent failure. */ /* Although the RFC does not specify an "Enumerated" type here, we go forward and create one. * This is the reason for the "*" in the type name */ struct dict_object * type; struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated*(Result-Code)" , NULL, NULL, NULL }; struct dict_avp_data data = { 268, /* Code */ #if AC_RESULT_CODE != 268 #error "AC_RESULT_CODE definition mismatch" #endif SH_VND_ID, /* Vendor */ "Result-Code", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_AVP, &data , type, NULL); /* Informational */ { /* 1001 */ { /* This informational error is returned by a Diameter server to inform the access device that the authentication mechanism being used requires multiple round trips, and a subsequent request needs to be issued in order for access to be granted. */ struct dict_enumval_data error_code = { "DIAMETER_MULTI_ROUND_AUTH", { .u32 = ER_DIAMETER_MULTI_ROUND_AUTH }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } } /* Success */ { /* 2001 */ { /* The Request was successfully completed. */ struct dict_enumval_data error_code = { "DIAMETER_SUCCESS", { .u32 = ER_DIAMETER_SUCCESS }}; #if ER_DIAMETER_SUCCESS != 2001 #error "ER_DIAMETER_SUCCESS definition mismatch" #endif CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 2002 */ { /* When returned, the request was successfully completed, but additional processing is required by the application in order to provide service to the user. */ struct dict_enumval_data error_code = { "DIAMETER_LIMITED_SUCCESS", { .u32 = ER_DIAMETER_LIMITED_SUCCESS }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } } /* Protocol Errors */ { /* 3001 -- might be changed to 5xxx soon */ { /* The Request contained a Command-Code that the receiver did not recognize or support. This MUST be used when a Diameter node receives an experimental command that it does not understand. */ struct dict_enumval_data error_code = { "DIAMETER_COMMAND_UNSUPPORTED", { .u32 = ER_DIAMETER_COMMAND_UNSUPPORTED }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 3002 */ { /* This error is given when Diameter can not deliver the message to the destination, either because no host within the realm supporting the required application was available to process the request, or because Destination-Host AVP was given without the associated Destination-Realm AVP. */ struct dict_enumval_data error_code = { "DIAMETER_UNABLE_TO_DELIVER", { .u32 = ER_DIAMETER_UNABLE_TO_DELIVER }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 3003 */ { /* The intended realm of the request is not recognized. */ struct dict_enumval_data error_code = { "DIAMETER_REALM_NOT_SERVED", { .u32 = ER_DIAMETER_REALM_NOT_SERVED }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 3004 */ { /* When returned, a Diameter node SHOULD attempt to send the message to an alternate peer. This error MUST only be used when a specific server is requested, and it cannot provide the requested service. */ struct dict_enumval_data error_code = { "DIAMETER_TOO_BUSY", { .u32 = ER_DIAMETER_TOO_BUSY }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 3005 */ { /* An agent detected a loop while trying to get the message to the intended recipient. The message MAY be sent to an alternate peer, if one is available, but the peer reporting the error has identified a configuration problem. */ struct dict_enumval_data error_code = { "DIAMETER_LOOP_DETECTED", { .u32 = ER_DIAMETER_LOOP_DETECTED }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 3006 */ { /* A redirect agent has determined that the request could not be satisfied locally and the initiator of the request should direct the request directly to the server, whose contact information has been added to the response. When set, the Redirect-Host AVP MUST be present. */ struct dict_enumval_data error_code = { "DIAMETER_REDIRECT_INDICATION", { .u32 = ER_DIAMETER_REDIRECT_INDICATION }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 3007 */ { /* A request was sent for an application that is not supported. */ struct dict_enumval_data error_code = { "DIAMETER_APPLICATION_UNSUPPORTED", { .u32 = ER_DIAMETER_APPLICATION_UNSUPPORTED }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 3008 -- will change to 5xxx soon */ { /* A request was received whose bits in the Diameter header were either set to an invalid combination, or to a value that is inconsistent with the command code's definition. */ struct dict_enumval_data error_code = { "DIAMETER_INVALID_HDR_BITS", { .u32 = ER_DIAMETER_INVALID_HDR_BITS }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 3009 -- will change to 5xxx soon */ { /* A request was received that included an AVP whose flag bits are set to an unrecognized value, or that is inconsistent with the AVP's definition. */ struct dict_enumval_data error_code = { "DIAMETER_INVALID_AVP_BITS", { .u32 = ER_DIAMETER_INVALID_AVP_BITS }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 3010 -- will change to 5xxx soon */ { /* A CER was received from an unknown peer. */ struct dict_enumval_data error_code = { "DIAMETER_UNKNOWN_PEER", { .u32 = ER_DIAMETER_UNKNOWN_PEER }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } } /* Transient Failures */ { /* 4001 */ { /* The authentication process for the user failed, most likely due to an invalid password used by the user. Further attempts MUST only be tried after prompting the user for a new password. */ struct dict_enumval_data error_code = { "DIAMETER_AUTHENTICATION_REJECTED", { .u32 = ER_DIAMETER_AUTHENTICATION_REJECTED }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 4002 */ { /* A Diameter node received the accounting request but was unable to commit it to stable storage due to a temporary lack of space. */ struct dict_enumval_data error_code = { "DIAMETER_OUT_OF_SPACE", { .u32 = ER_DIAMETER_OUT_OF_SPACE }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 4003 */ { /* The peer has determined that it has lost the election process and has therefore disconnected the transport connection. */ struct dict_enumval_data error_code = { "ELECTION_LOST", { .u32 = ER_ELECTION_LOST }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } } /* Permanent Failures */ { /* 5001 */ { /* The peer received a message that contained an AVP that is not recognized or supported and was marked with the Mandatory bit. A Diameter message with this error MUST contain one or more Failed- AVP AVP containing the AVPs that caused the failure. */ struct dict_enumval_data error_code = { "DIAMETER_AVP_UNSUPPORTED", { .u32 = ER_DIAMETER_AVP_UNSUPPORTED }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 5002 */ { /* The request contained an unknown Session-Id. */ struct dict_enumval_data error_code = { "DIAMETER_UNKNOWN_SESSION_ID", { .u32 = ER_DIAMETER_UNKNOWN_SESSION_ID }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 5003 */ { /* A request was received for which the user could not be authorized. This error could occur if the service requested is not permitted to the user. */ struct dict_enumval_data error_code = { "DIAMETER_AUTHORIZATION_REJECTED",{ .u32 = ER_DIAMETER_AUTHORIZATION_REJECTED }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 5004 */ { /* The request contained an AVP with an invalid value in its data portion. A Diameter message indicating this error MUST include the offending AVPs within a Failed-AVP AVP. */ struct dict_enumval_data error_code = { "DIAMETER_INVALID_AVP_VALUE", { .u32 = ER_DIAMETER_INVALID_AVP_VALUE }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 5005 */ { /* The request did not contain an AVP that is required by the Command Code definition. If this value is sent in the Result-Code AVP, a Failed-AVP AVP SHOULD be included in the message. The Failed-AVP AVP MUST contain an example of the missing AVP complete with the Vendor-Id if applicable. The value field of the missing AVP should be of correct minimum length and contain zeroes. */ struct dict_enumval_data error_code = { "DIAMETER_MISSING_AVP", { .u32 = ER_DIAMETER_MISSING_AVP }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 5006 */ { /* A request was received that cannot be authorized because the user has already expended allowed resources. An example of this error condition is a user that is restricted to one dial-up PPP port, attempts to establish a second PPP connection. */ struct dict_enumval_data error_code = { "DIAMETER_RESOURCES_EXCEEDED", { .u32 = ER_DIAMETER_RESOURCES_EXCEEDED }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 5007 */ { /* The Home Diameter server has detected AVPs in the request that contradicted each other, and is not willing to provide service to the user. The Failed-AVP AVPs MUST be present which contains the AVPs that contradicted each other. */ struct dict_enumval_data error_code = { "DIAMETER_CONTRADICTING_AVPS", { .u32 = ER_DIAMETER_CONTRADICTING_AVPS }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 5008 */ { /* A message was received with an AVP that MUST NOT be present. The Failed-AVP AVP MUST be included and contain a copy of the offending AVP. */ struct dict_enumval_data error_code = { "DIAMETER_AVP_NOT_ALLOWED", { .u32 = ER_DIAMETER_AVP_NOT_ALLOWED }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 5009 */ { /* A message was received that included an AVP that appeared more often than permitted in the message definition. The Failed-AVP AVP MUST be included and contain a copy of the first instance of the offending AVP that exceeded the maximum number of occurrences */ struct dict_enumval_data error_code = { "DIAMETER_AVP_OCCURS_TOO_MANY_TIMES",{ .u32 = ER_DIAMETER_AVP_OCCURS_TOO_MANY_TIMES }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 5010 */ { /* This error is returned by a Diameter node that is not acting as a relay when it receives a CER which advertises a set of applications that it does not support. */ struct dict_enumval_data error_code = { "DIAMETER_NO_COMMON_APPLICATION",{ .u32 = ER_DIAMETER_NO_COMMON_APPLICATION }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 5011 */ { /* This error is returned when a request was received, whose version number is unsupported. */ struct dict_enumval_data error_code = { "DIAMETER_UNSUPPORTED_VERSION", { .u32 = ER_DIAMETER_UNSUPPORTED_VERSION }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 5012 */ { /* This error is returned when a request is rejected for unspecified reasons. */ struct dict_enumval_data error_code = { "DIAMETER_UNABLE_TO_COMPLY", { .u32 = ER_DIAMETER_UNABLE_TO_COMPLY }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 5013 -- will change to 3xxx */ { /* This error is returned when an unrecognized bit in the Diameter header is set to one (1). */ struct dict_enumval_data error_code = { "DIAMETER_INVALID_BIT_IN_HEADER", { .u32 = ER_DIAMETER_INVALID_BIT_IN_HEADER }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 5014 */ { /* The request contained an AVP with an invalid length. A Diameter message indicating this error MUST include the offending AVPs within a Failed-AVP AVP. In cases where the erroneous avp length value exceeds the message length or is less than the minimum AVP header length, it is sufficient to include the offending AVP header and a zero filled payload of the minimum required length for the payloads data type. If the AVP is a grouped AVP, the grouped AVP header with an empty payload would be sufficient to indicate the offending AVP. In the case where the offending AVP header cannot be fully decoded when avp length is less than the minimum AVP header length, it is sufficient to include an offending AVP header that is formulated by padding the incomplete AVP header with zero up to the minimum AVP header length. */ struct dict_enumval_data error_code = { "DIAMETER_INVALID_AVP_LENGTH", { .u32 = ER_DIAMETER_INVALID_AVP_LENGTH }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 5015 -- will change to 3xxx */ { /* This error is returned when a request is received with an invalid message length. */ struct dict_enumval_data error_code = { "DIAMETER_INVALID_MESSAGE_LENGTH", { .u32 = ER_DIAMETER_INVALID_MESSAGE_LENGTH }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 5016 */ { /* The request contained an AVP with which is not allowed to have the given value in the AVP Flags field. A Diameter message indicating this error MUST include the offending AVPs within a Failed-AVP AVP. */ struct dict_enumval_data error_code = { "DIAMETER_INVALID_AVP_BIT_COMBO", { .u32 = ER_DIAMETER_INVALID_AVP_BIT_COMBO }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 5017 */ { /* This error is returned when a CER message is received, and there are no common security mechanisms supported between the peers. A Capabilities-Exchange-Answer (CEA) MUST be returned with the Result-Code AVP set to DIAMETER_NO_COMMON_SECURITY. */ struct dict_enumval_data error_code = { "DIAMETER_NO_COMMON_SECURITY", { .u32 = ER_DIAMETER_NO_COMMON_SECURITY }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } } } /* Vendor-Id */ { /* The Vendor-Id AVP (AVP Code 266) is of type Unsigned32 and contains the IANA "SMI Network Management Private Enterprise Codes" [RFC3232] value assigned to the vendor of the Diameter device. It is envisioned that the combination of the Vendor-Id, Product-Name (Section 5.3.7) and the Firmware-Revision (Section 5.3.4) AVPs may provide useful debugging information. A Vendor-Id value of zero in the CER or CEA messages is reserved and indicates that this field is ignored. */ struct dict_avp_data data = { 266, /* Code */ #if AC_VENDOR_ID != 266 #error "AC_VENDOR_ID definition mismatch" #endif SH_VND_ID, /* Vendor */ "Vendor-Id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data, NULL, NULL); } /* Experimental-Result-Code */ { /* The Experimental-Result-Code AVP (AVP Code 298) is of type Unsigned32 and contains a vendor-assigned value representing the result of processing the request. It is recommended that vendor-specific result codes follow the same conventions given for the Result-Code AVP regarding the different types of result codes and the handling of errors (for non 2xxx values). */ /* Although the RFC does not specify an "Enumerated" type here, we go forward and create one. * This is the reason for the "*" in the type name. Vendors will have to define their values. */ struct dict_object * type; struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated*(Experimental-Result-Code)" , NULL, NULL, NULL }; struct dict_avp_data data = { 298, /* Code */ SH_VND_ID, /* Vendor */ "Experimental-Result-Code", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Experimental-Result */ { /* The Experimental-Result AVP (AVP Code 297) is of type Grouped, and indicates whether a particular vendor-specific request was completed successfully or whether an error occurred. Its Data field has the following ABNF grammar: AVP Format Experimental-Result ::= < AVP Header: 297 > { Vendor-Id } { Experimental-Result-Code } The Vendor-Id AVP (see Section 5.3.3) in this grouped AVP identifies the vendor responsible for the assignment of the result code which follows. All Diameter answer messages defined in vendor-specific applications MUST include either one Result-Code AVP or one Experimental-Result AVP. */ struct dict_object * avp; struct dict_avp_data data = { 297, /* Code */ SH_VND_ID, /* Vendor */ "Experimental-Result", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { #ifndef WORKAROUND_ACCEPT_INVALID_VSAI /* ABNF from RFC6733 */ { "Vendor-Id", SH_VND_ID, RULE_REQUIRED, -1, 1 } #else /* WORKAROUND_ACCEPT_INVALID_VSAI */ /* ABNF from RFC3588 (including erratum, because original text is nonsense) */ { "Vendor-Id", SH_VND_ID, RULE_REQUIRED, -1, -1} #endif /* WORKAROUND_ACCEPT_INVALID_VSAI */ ,{ "Experimental-Result-Code", SH_VND_ID, RULE_REQUIRED, -1, 1 } }; /* Create the grouped AVP */ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); } #if 0 /* Auth-Session-State */ { /* The Auth-Session-State AVP (AVP Code 277) is of type Enumerated and specifies whether state is maintained for a particular session. The client MAY include this AVP in requests as a hint to the server, but the value in the server's answer message is binding. The following values are supported: STATE_MAINTAINED 0 This value is used to specify that session state is being maintained, and the access device MUST issue a session termination message when service to the user is terminated. This is the default value. NO_STATE_MAINTAINED 1 This value is used to specify that no session termination messages will be sent by the access device upon expiration of the Authorization-Lifetime. */ struct dict_object * type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Auth-Session-State)" , NULL, NULL, NULL }; struct dict_enumval_data t_0 = { "STATE_MAINTAINED", { .i32 = 0 }}; struct dict_enumval_data t_1 = { "NO_STATE_MAINTAINED", { .i32 = 1 }}; struct dict_avp_data data = { 277, /* Code */ SH_VND_ID, /* Vendor */ "Auth-Session-State", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } #endif /* * from 3GPP Dict */ /* Server-Name */ { struct dict_avp_data data = { 602, /* Code */ SH_VND_ID, /* Vendor */ "Server-Name", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; #if 1 /* Auth-Application-Id */ { /* The Auth-Application-Id AVP (AVP Code 258) is of type Unsigned32 and is used in order to advertise support of the Authentication and Authorization portion of an application (see Section 2.4). If present in a message other than CER and CEA, the value of the Auth- Application-Id AVP MUST match the Application Id present in the Diameter message header. */ struct dict_avp_data data = { 258, /* Code */ #if AC_AUTH_APPLICATION_ID != 258 #error "AC_AUTH_APPLICATION_ID definition mismatch" #endif SH_VND_ID, /* Vendor */ "Auth-Application-Id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Acct-Application-Id */ { /* The Acct-Application-Id AVP (AVP Code 259) is of type Unsigned32 and is used in order to advertise support of the Accounting portion of an application (see Section 2.4). If present in a message other than CER and CEA, the value of the Acct-Application-Id AVP MUST match the Application Id present in the Diameter message header. */ struct dict_avp_data data = { 259, /* Code */ #if AC_ACCT_APPLICATION_ID != 259 #error "AC_ACCT_APPLICATION_ID definition mismatch" #endif SH_VND_ID, /* Vendor */ "Acct-Application-Id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Vendor-Specific-Application-Id */ { /* The Vendor-Specific-Application-Id AVP (AVP Code 260) is of type Grouped and is used to advertise support of a vendor-specific Diameter Application. Exactly one instance of either Auth- Application-Id or Acct-Application-Id AVP MUST be present. The Application Id carried by either Auth-Application-Id or Acct- Application-Id AVP MUST comply with vendor specific Application Id assignment described in Sec 11.3. It MUST also match the Application Id present in the diameter header except when used in a CER or CEA messages. The Vendor-Id AVP is an informational AVP pertaining to the vendor who may have authorship of the vendor-specific Diameter application. It MUST NOT be used as a means of defining a completely separate vendor-specific Application Id space. This AVP MUST also be present as the first AVP in all experimental commands defined in the vendor-specific application. This AVP SHOULD be placed as close to the Diameter header as possible. AVP Format ::= < AVP Header: 260 > { Vendor-Id } [ Auth-Application-Id ] [ Acct-Application-Id ] A Vendor-Specific-Application-Id AVP MUST contain exactly one of either Auth-Application-Id or Acct-Application-Id. If a Vendor- Specific-Application-Id is received without any of these two AVPs, then the recipient SHOULD issue an answer with a Result-Code set to DIAMETER_MISSING_AVP. The answer SHOULD also include a Failed-AVP which MUST contain an example of an Auth-Application-Id AVP and an Acct-Application-Id AVP. If a Vendor-Specific-Application-Id is received that contains both Auth-Application-Id and Acct-Application-Id, then the recipient SHOULD issue an answer with Result-Code set to DIAMETER_AVP_OCCURS_TOO_MANY_TIMES. The answer SHOULD also include a Failed-AVP which MUST contain the received Auth-Application-Id AVP and Acct-Application-Id AVP. */ struct dict_object * avp; struct dict_avp_data data = { 260, /* Code */ #if AC_VENDOR_SPECIFIC_APPLICATION_ID != 260 #error "AC_VENDOR_SPECIFIC_APPLICATION_ID definition mismatch" #endif SH_VND_ID, /* Vendor */ "Vendor-Specific-Application-Id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { #ifndef WORKAROUND_ACCEPT_INVALID_VSAI /* ABNF from RFC6733 */ { "Vendor-Id", SH_VND_ID, RULE_REQUIRED, -1, 1 } #else /* WORKAROUND_ACCEPT_INVALID_VSAI */ /* ABNF from RFC3588 (including erratum, because original text is nonsense) */ { "Vendor-Id", SH_VND_ID, RULE_REQUIRED, -1, -1} #endif /* WORKAROUND_ACCEPT_INVALID_VSAI */ ,{ "Auth-Application-Id", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Acct-Application-Id", SH_VND_ID, RULE_OPTIONAL, -1, 1 } }; /* Create the grouped AVP */ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); } #endif /* Feature-List-ID */ { struct dict_avp_data data = { 629, /* Code */ SH_VND_ID, /* Vendor */ "Feature-List-ID", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Feature-List */ { struct dict_avp_data data = { 630, /* Code */ SH_VND_ID, /* Vendor */ "Feature-List", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Supported-Features */ { /* Supported-Features ::= < AVP header: 628 10415 > { Vendor-Id } { Feature-List-ID } { Feature-List } *[AVP] */ struct dict_object * avp; struct dict_avp_data data = { 628, /* Code */ SH_VND_ID, /* Vendor */ "Supported-Features", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Vendor-Id", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "Feature-List-ID", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "Feature-List", SH_VND_ID, RULE_REQUIRED, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); }; /* Supported-Applications */ { struct dict_avp_data data = { 631, /* Code */ SH_VND_ID, /* Vendor */ "Supported-Applications", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Public-Identity */ { struct dict_avp_data data = { 601, /* Code */ SH_VND_ID, /* Vendor */ "Public-Identity", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Wildcarded-Public-Identity */ { struct dict_avp_data data = { 634, /* Code */ SH_VND_ID, /* Vendor */ "Wildcarded-Public-Identity", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* in 29.229 */ /* Wildcarded-Public-Identity */ /* Wildcarded-IMPU */ { struct dict_avp_data data = { 636, /* Code */ SH_VND_ID, /* Vendor */ "Wildcarded-IMPU", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Session-Priority */ { struct dict_avp_data data = { 650, /* Code */ SH_VND_ID, /* Vendor */ "Session-Priority", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Session-Priority)", NULL, NULL, NULL }; struct dict_enumval_data t_0 = { "PRIORITY-0", { .u32 = 0 }}; struct dict_enumval_data t_1 = { "PRIORITY-1", { .u32 = 1 }}; struct dict_enumval_data t_2 = { "PRIORITY-2", { .u32 = 2 }}; struct dict_enumval_data t_3 = { "PRIORITY-3", { .u32 = 3 }}; struct dict_enumval_data t_4 = { "PRIORITY-4", { .u32 = 4 }}; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_3 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_4 , type, NULL); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; #if 0 /* Primary-Charging-Collection-Function-Name */ { struct dict_avp_data data = { 621, /* Code */ SH_VND_ID, /* Vendor */ "Primary-Charging-Collection-Function-Name", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; #endif /* User-Authorization-Type */ { struct dict_avp_data data = { 623, /* Code */ 0, /* Vendor */ /* confi with 29.329 */ "User-Authorization-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "User-Authorization-Type", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); struct dict_enumval_data t_0 = { "REGISTRATION", { .u32 = 0 }}; struct dict_enumval_data t_1 = { "DE_REGISTRATION", { .u32 = 1 }}; CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* MSISDN */ { struct dict_avp_data data = { 701, /* Code */ SH_VND_ID, /* Vendor */ "MSISDN", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* User-Data AVP */ { /* The User-Data AVP is of type OctetString. This AVP contains the user data requested in the UDR/UDA, SNR/SNA and PNR/PNA operations and the data to be modified in the PUR/PUA operation. The exact content and format of this AVP is described in 3GPP TS 29.328 [1] Annex C as ta_appli-Data. */ struct dict_avp_data data = { 702, /* Code */ SH_VND_ID, /* Vendor */ "User-Data", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Data-Reference */ { struct dict_avp_data data = { 703, /* Code */ SH_VND_ID, /* Vendor */ "Data-Reference", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Data-Reference)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); struct dict_enumval_data t_0 = { "RepositoryData", { .u32 = 0 }}; struct dict_enumval_data t_10 = { "IMSPublicIdentity", { .u32 = 10 }}; struct dict_enumval_data t_11 = { "IMSUserState", { .u32 = 11 }}; struct dict_enumval_data t_12 = { "S-CSCFName", { .u32 = 12 }}; struct dict_enumval_data t_13 = { "InitialFilterCriteria", { .u32 = 13 }}; struct dict_enumval_data t_14 = { "LocationInformation", { .u32 = 14 }}; struct dict_enumval_data t_15 = { "UserState", { .u32 = 15 }}; struct dict_enumval_data t_16 = { "ChargingInformation", { .u32 = 16 }}; struct dict_enumval_data t_17 = { "MSISDN", { .u32 = 17 }}; struct dict_enumval_data t_18 = { "PSIActivation", { .u32 = 18 }}; struct dict_enumval_data t_19 = { "DSAI", { .u32 = 19 }}; struct dict_enumval_data t_21 = { "ServiceLevelTraceInfo", { .u32 = 21 }}; struct dict_enumval_data t_22 = { "IPAddressSecureBindingInformation", { .u32 = 22 }}; struct dict_enumval_data t_23 = { "ServicePriorityLevel", { .u32 = 23 }}; struct dict_enumval_data t_24 = { "SMSRegistrationInfo", { .u32 = 24 }}; struct dict_enumval_data t_25 = { "UEReachabilityForIP", { .u32 = 25 }}; struct dict_enumval_data t_26 = { "TADSinformation", { .u32 = 26 }}; struct dict_enumval_data t_27 = { "STN-SR", { .u32 = 27 }}; struct dict_enumval_data t_28 = { "UE-SRVCC-Capability", { .u32 = 28 }}; struct dict_enumval_data t_29 = { "ExtendedPriority", { .u32 = 29 }}; struct dict_enumval_data t_30 = { "CSRN", { .u32 = 30 }}; struct dict_enumval_data t_31 = { "ReferenceLocationInformation", { .u32 = 31 }}; struct dict_enumval_data t_32 = { "IMSI", { .u32 = 32 }}; struct dict_enumval_data t_33 = { "IMSPrivateUserIdentity", { .u32 = 33 }}; CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_10 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_11 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_12 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_13 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_14 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_15 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_16 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_17 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_18 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_19 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_21 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_22 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_23 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_24 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_25 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_26 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_27 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_28 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_29 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_30 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_31 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_32 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_33 , type, NULL); CHECK_dict_new(DICT_AVP, &data, type, NULL); } /* Service-Indication AVP */ { /* The Service-Indication AVP is of type OctetString. This AVP contains the Service Indication that identifies a service or a set of services in an AS and the related repository data in the HSS. Standardized values of Service-Indication identifying a standardized service or set of services in the AS and standardized format of the related repository data are defined in 3GPP TS 29.364 [10]. */ struct dict_avp_data data = { 704, /* Code */ SH_VND_ID, /* Vendor */ "Service-Indication", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); } /* Subs-Req-Type AVP */ { struct dict_avp_data data = { 705, /* Code */ SH_VND_ID, /* Vendor */ "Subs-Req-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Subs-Req-Type AVP", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); struct dict_enumval_data t_0 = { "Subscribe", { .u32 = 0 }}; struct dict_enumval_data t_1 = { "Unsubscribe", { .u32 = 1 }}; CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Requested-Domain AVP */ { struct dict_avp_data data = { 706, /* Code */ SH_VND_ID, /* Vendor */ "Requested-Domain", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Requested-Domain", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); struct dict_enumval_data t_0 = { "CS-Domain", { .u32 = 0 }}; struct dict_enumval_data t_1 = { "PS-Domain", { .u32 = 1 }}; CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Current-Location AVP */ { struct dict_avp_data data = { 707, /* Code */ SH_VND_ID, /* Vendor */ "Current-Location", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Current-Location", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); struct dict_enumval_data t_0 = { "DoNotNeedInitiateActiveLocationRetrieval", { .u32 = 0 }}; struct dict_enumval_data t_1 = { "InitiateActiveLocationRetrieval", { .u32 = 1 }}; CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Identity-Set AVP */ { struct dict_avp_data data = { 708, /* Code */ SH_VND_ID, /* Vendor */ "Identity-Set", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Identity-Set", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); struct dict_enumval_data t_0 = { "ALL_IDENTITIES", { .u32 = 0 }}; struct dict_enumval_data t_1 = { "REGISTERED_IDENTITIES", { .u32 = 1 }}; struct dict_enumval_data t_2 = { "IMPLICIT_IDENTITIES", { .u32 = 2 }}; struct dict_enumval_data t_3 = { "ALIAS_IDENTITIES", { .u32 = 3 }}; CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_3 , type, NULL); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Expiry-Time AVP*/ { struct dict_avp_data data = { 709, /* Code */ SH_VND_ID, /* Vendor */ "Expiry-Time", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Time_type, NULL); }; /* Send-Data-Indication AVP*/ { struct dict_avp_data data = { 710, /* Code */ SH_VND_ID, /* Vendor */ "Send-Data-Indication", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Send-Data-Indication)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); struct dict_enumval_data t_0 = { "USER_DATA_NOT_REQUESTED", { .u32 = 0 }}; struct dict_enumval_data t_1 = { "USER_DATA_REQUESTED", { .u32 = 1 }}; CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* in 29.229 */ /* Server-Name */ /* Supported-Features */ /* Feature-List-ID */ /* Feature-List */ /* Supported-Applications */ /* Public-Identity */ /* DSAI-Tag */ { struct dict_avp_data data = { 711, /* Code */ SH_VND_ID, /* Vendor */ "DSAI-Tag", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* in 29.229 */ /* Session-Priority */ /* One-Time-Notification AVP*/ { struct dict_avp_data data = { 712, /* Code */ SH_VND_ID, /* Vendor */ "One-Time-Notification", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(One-Time-Notification)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); struct dict_enumval_data t_0 = { "ONE_TIME_NOTIFICATION_REQUESTED", { .u32 = 0 }}; CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Requested-Nodes AVP */ { struct dict_avp_data data = { 713, /* Code */ SH_VND_ID, /* Vendor */ "Requested-Nodes", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Serving-Node-Indication AVP*/ { struct dict_avp_data data = { 714, /* Code */ SH_VND_ID, /* Vendor */ "Serving-Node-Indication", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Serving-Node-Indication)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); struct dict_enumval_data t_0 = { "ONLY_SERVING_NODES_REQUIRED", { .u32 = 0 }}; CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Repository-Data-ID AVP */ { /* The Repository-Data-ID AVP is of type Grouped. This AVP shall contain a Service-Indication AVP and a Sequence- Number AVP. AVP format Repository-Data-ID ::= {Service-Indication} {Sequence-Number} *[AVP] */ struct dict_avp_data data = { 715, /* Code */ SH_VND_ID, /* Vendor */ "Repository-Data-ID", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); } /* Sequence-Number AVP*/ { struct dict_avp_data data = { 716, /* Code */ SH_VND_ID, /* Vendor */ "Sequence-Number", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Pre-paging-Supported AVP */ { struct dict_avp_data data = { 717, /* Code */ SH_VND_ID, /* Vendor */ "Pre-paging-Supported", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Pre-paging-Supported)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); struct dict_enumval_data t_0 = { "PREPAGING_NOT_SUPPORTED", { .u32 = 0 }}; struct dict_enumval_data t_1 = { "PREPAGING_SUPPORTED", { .u32 = 1 }}; CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Local-Time-Zone-Indication AVP */ { struct dict_avp_data data = { 718, /* Code */ SH_VND_ID, /* Vendor */ "Local-Time-Zone-Indication", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Local-Time-Zone-Indication)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); struct dict_enumval_data t_0 = { "ONLY_LOCAL_TIME_ZONE_REQUESTED", { .u32 = 0 }}; struct dict_enumval_data t_1 = { "LOCAL_TIME_ZONE_WITH_LOCATION_INFO_REQUESTED", { .u32 = 1 }}; CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* UDR-Flags */ { struct dict_avp_data data = { 719, /* Code */ SH_VND_ID, /* Vendor */ "UDR-Flags", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Call-Reference-Number AVP */ { struct dict_avp_data data = { 721, /* Code */ SH_VND_ID, /* Vendor */ "Call-Reference-Number", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* AS-Number AVP */ { struct dict_avp_data data = { 722, /* Code */ SH_VND_ID, /* Vendor */ "AS-Number", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Call-Reference-Info AVP */ { /* The Call-Reference-Info AVP is of type Grouped. This AVP shall contain a Call-Reference-Number AVP and an ASNumber AVP. AVP format Call-Reference-Info ::= {Call-Reference-Number} {AS-Number} *[AVP] */ struct dict_object * avp; struct dict_avp_data data = { 720, /* Code */ SH_VND_ID, /* Vendor */ "Call-Reference-Info", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Call-Reference-Number", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "AS-Number}", SH_VND_ID, RULE_REQUIRED, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); } /* OC-Feature-Vector AVP */ { struct dict_avp_data data = { 622, /* Code */ SH_VND_ID, /* Vendor */ "OC-Feature-Vector", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED64 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; #if 1 /* OC-Supported-Features AVP */ { /* The OC-Supported-Features AVP (AVP Code 621) is of type Grouped and serves two purposes. First, it announces a node's support for the DOIC solution in general. Second, it contains the description of the supported DOIC features of the sending node. The OC-Supported- Features AVP MUST be included in every Diameter request message a DOIC supporting node sends. OC-Supported-Features ::= < AVP Header: 621 > [ OC-Feature-Vector ] * [ AVP ] */ struct dict_object * avp; struct dict_avp_data data = { 621, /* Code */ SH_VND_ID, /* Vendor */ "OC-Supported-Features", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "OC-Feature-Vector", SH_VND_ID, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); } #endif /* OC-Sequence-Number AVP*/ { /* The OC-Sequence-Number AVP (AVP Code 624) is of type Unsigned64. Its usage in the context of overload control is described in Section 5.2. From the functionality point of view, the OC-Sequence-Number AVP is used as a nonvolatile increasing counter for a sequence of overload reports between two DOIC nodes for the same overload occurrence. Sequence numbers are treated in a unidirectional manner, i.e., two sequence numbers in each direction between two DOIC nodes are not related or correlated. */ struct dict_avp_data data = { 624, /* Code */ SH_VND_ID, /* Vendor */ "OC-Sequence-Number", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED64 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* OC-Report-Type AVP */ { struct dict_avp_data data = { 626, /* Code */ SH_VND_ID, /* Vendor */ "OC-Report-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "OC-Report-Type", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); struct dict_enumval_data t_0 = { "HOST_REPORT", { .u32 = 0 }}; struct dict_enumval_data t_1 = { "REALM_REPORT", { .u32 = 1 }}; CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* OC-Reduction-Percentage AVP */ { struct dict_avp_data data = { 627, /* Code */ SH_VND_ID, /* Vendor */ "OC-Reduction-Percentage", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "OC-Reduction-Percentage", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* OC-Validity-Duration AVP */ { struct dict_avp_data data = { 625, /* Code */ SH_VND_ID, /* Vendor */ "OC-Validity-Duration", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "OC-Validity-Duration", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; #if 1 /* OC-OLR AVP */ { /* The OC-OLR AVP (AVP Code 623) is of type Grouped and contains the information necessary to convey an overload report on an overload condition at the reporting node. The application the OC-OLR AVP applies to is identified by the Application-ID found in the Diameter message header. The host or realm the OC-OLR AVP concerns is determined from the Origin-Host AVP and/or Origin-Realm AVP found in the encapsulating Diameter command. The OC-OLR AVP is intended to be sent only by a reporting node. OC-OLR ::= < AVP Header: 623 > < OC-Sequence-Number > < OC-Report-Type > [ OC-Reduction-Percentage ] [ OC-Validity-Duration ] * [ AVP ] */ struct dict_object * avp; struct dict_avp_data data = { 623, /* Code */ SH_VND_ID, /* Vendor */ "OC-OLR", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "OC-Sequence-Number", SH_VND_ID, RULE_FIXED_HEAD, -1, 1 } /* flag to be make sure */ ,{ "OC-Report-Type", SH_VND_ID, RULE_FIXED_HEAD, -1, 1 } /* flag to be make sure */ ,{ "OC-Reduction-Percentage", SH_VND_ID, RULE_OPTIONAL, -1, 1 } /* flag to be make sure */ ,{ "OC-Validity-Duration", SH_VND_ID, RULE_OPTIONAL, -1, 1 } /* flag to be make sure */ }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); } #endif /* Error: Editor痴 Note: The code for DRMP AVP is to be updated when it is available within the draft-ietf-dime-drmp-02 [13]. */ /* DRMP AVP */ { struct dict_avp_data data = { 723, /* Code */ SH_VND_ID, /* Vendor */ "DRMP", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; } /* group AVP */ { /* User-Identity ::= [Public-Identity] [MSISDN] *[AVP] */ /* User-Identity group */ struct dict_object * avp = NULL; struct dict_avp_data data = { 700, /* Code */ SH_VND_ID, /* Vendor */ "User-Identity", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Public-Identity", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "MSISDN", SH_VND_ID, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), avp ); } /* Command section */ { /* User-Data-Request (UDR) Command */ { /* The User-Data-Request (UDR) command, indicated by the Com mand-Code field set to 306 and the 然?bit set in the Command Flags field, is sent by a Diameter client to a Diameter server in order to request user data. Message Format: < User-Data -Request> ::= < Diameter Header: 306, REQ, PXY, 16777217 > < Session-Id > [ DRMP ] { Vendor-Specific-Application-Id } { Auth-Session-State } { Origin-Host } { Origin-Realm } [ Destination-Host ] { Destination-Realm } *[ Supported-Features ] { User-Identity } [ Wildcarded-Public-Identity ] [ Wildcarded-IMPU ] [ Server-Name ] *[ Service-Indication ] *{ Data-Reference } *[ Identity-Set ] [ Requested-Domain ] [ Current-Location ] *[ DSAI-Tag ] [ Session-Priority ] [ User-Name ] [ Requested-Nodes ] [ Serving-Node-Indication ] [ Pre-paging-Supported ] [ Local-Time-Zone-Indication ] [ UDR-Flags ] [ Call-Reference-Info ] [ OC-Supported-Features ] *[ AVP ] *[ Proxy-Info ] *[ Route-Record ] */ // struct dict_object * udr_cmd; // cmd; struct dict_cmd_data data = { 306, /* Code */ "User-Data-Request", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", SH_VND_ID, RULE_FIXED_HEAD, -1, 1 } ,{ "DRMP", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Vendor-Specific-Application-Id", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "Auth-Session-State", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "Destination-Host", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Destination-Realm", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "Supported-Features", SH_VND_ID, RULE_OPTIONAL, -1, -1 } ,{ "User-Identity", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "Wildcarded-Public-Identity", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Wildcarded-IMPU", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Server-Name", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Service-Indication", SH_VND_ID, RULE_OPTIONAL, -1, -1 } ,{ "Data-Reference", SH_VND_ID, RULE_REQUIRED, -1, -1 } ,{ "Identity-Set", SH_VND_ID, RULE_OPTIONAL, -1, -1 } ,{ "Requested-Domain", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Current-Location", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "DSAI-Tag", SH_VND_ID, RULE_OPTIONAL, -1, -1 } ,{ "Session-Priority", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "User-Name", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Requested-Nodes", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Serving-Node-Indication", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Pre-paging-Supported", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Local-Time-Zone-Indication", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "UDR-Flags", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Call-Reference-Info", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "OC-Supported-Features", SH_VND_ID, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_COMMAND, &data , NULL/*sh_appli*/, &udr_cmd); // &cmd); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), udr_cmd); // cmd ); } /* User-Data-Answer (UDA) Command */ { /* The User-Data-Answer (UDA) command, indicated by the Command-Code field set to 306 and the 然?bit cleared in the Command Flags field, is sent by a server in response to the User-Data-Request command. The Experimental-Result AVP may contain one of the values defined in section 6.2 or in 3GPP TS 29.229 [6]. Message Format: < User-Data-Answer > ::= < Diameter Header: 306, PXY, 16777217 > < Session-Id > [ DRMP ] { Vendor-Specific-Application-Id } [ Result-Code ] [ Experimental-Result ] { Auth-Session-State } { Origin-Host } { Origin-Realm } *[ Supported-Features ] [ Wildcarded-Public-Identity ] [ Wildcarded-IMPU ] [ User-Data ] [ OC-Supported-Features ] [ OC-OLR ] *[ AVP ] *[ Failed-AVP ] *[ Proxy-Info ] *[ Route-Record ] */ // struct dict_object *uda_cmd; // cmd; struct dict_cmd_data data = { 306, /* Code */ "User-Data-Answer", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", SH_VND_ID, RULE_FIXED_HEAD, -1, 1 } ,{ "DRMP", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Vendor-Specific-Application-Id", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "Result-Code", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Experimental-Result", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Auth-Session-State", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "Supported-Features", SH_VND_ID, RULE_OPTIONAL, -1, -1 } ,{ "Wildcarded-Public-Identity", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Wildcarded-IMPU", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "User-Data", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "OC-Supported-Features", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "OC-OLR", SH_VND_ID, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_COMMAND, &data , NULL/*sh_appli*/, &uda_cmd); // &cmd); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), uda_cmd/*cmd*/); } /* Profile-Update-Request (PUR) Command */ { /* The Profile-Update-Request (PUR) command, indicated by the Command-Code field set to 307 and the 然?bit set in the Command Flags field, is sent by a Diameter client to a Diameter server in order to update user data in the server. Message Format: < Profile-Update-Request > ::= < Diameter Header: 307, REQ, PXY, 16777217 > < Session-Id > [ DRMP ] { Vendor-Specific-Application-Id } { Auth-Session-State } { Origin-Host } { Origin-Realm } [ Destination-Host ] { Destination-Realm } *[ Supported-Features ] { User-Identity } [ Wildcarded-Public-Identity ] [ Wildcarded-IMPU ] [ User-Name ] *{ Data-Reference } { User-Data } [ OC-Supported-Features ] *[ AVP ] *[ Proxy-Info ] *[ Route-Record ] */ struct dict_object * pur_cmd; // cmd; struct dict_cmd_data data = { 307, /* Code */ "Profile-Update-Request", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", SH_VND_ID, RULE_FIXED_HEAD, -1, 1 } ,{ "DRMP", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Vendor-Specific-Application-Id", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "Auth-Session-State", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "Destination-Host", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Destination-Realm", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "Supported-Features", SH_VND_ID, RULE_OPTIONAL, -1, -1 } ,{ "User-Identity", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "Wildcarded-Public-Identity", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Wildcarded-IMPU", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "User-Name", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Data-Reference", SH_VND_ID, RULE_REQUIRED, -1, -1 } ,{ "User-Data", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "OC-Supported-Features", SH_VND_ID, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_COMMAND, &data , NULL/*sh_appli*/, &pur_cmd); // &cmd); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), pur_cmd); // cmd ); } /* Profile-Update-Answer (PUA) Command */ { /* The Profile-Update-Answer (PUA) command, indicated by the Command-Code field set to 307 and the 然?bit cleared in the Command Flags field, is sent by a server in response to the Profile-Update-Request command. The Experimental- Result AVP may contain one of the values defined in section 6.2 or in 3GPP TS 29.229 [6]. Message Format: < Profile-Update-Answer > ::=< Diameter Header: 307, PXY, 16777217 > < Session-Id > [ DRMP ] { Vendor-Specific-Application-Id } [ Result-Code ] [ Experimental-Result ] { Auth-Session-State } { Origin-Host } { Origin-Realm } [ Wildcarded-Public-Identity ] [ Wildcarded-IMPU ] [ Repository-Data-ID ] [ Data-Reference ] *[ Supported-Features ] [ OC-Supported-Features ] [ OC-OLR ] *[ AVP ] *[ Failed-AVP ] *[ Proxy-Info ] *[ Route-Record ] */ // struct dict_object * pur_cmd;// cmd; struct dict_cmd_data data = { 307, /* Code */ "Profile-Update-Answer", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", SH_VND_ID, RULE_FIXED_HEAD, -1, 1 } ,{ "DRMP", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Vendor-Specific-Application-Id", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "Result-Code", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Experimental-Result", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Auth-Session-State", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", SH_VND_ID, RULE_REQUIRED, -1, 1 } ,{ "Wildcarded-Public-Identity", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Wildcarded-IMPU", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Repository-Data-ID", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Data-Reference", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "Supported-Features", SH_VND_ID, RULE_OPTIONAL, -1, -1 } ,{ "OC-Supported-Features", SH_VND_ID, RULE_OPTIONAL, -1, 1 } ,{ "OC-OLR", SH_VND_ID, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_COMMAND, &data , NULL/*sh_appli*/, &pua_cmd); // &cmd); PARSE_loc_rules_( rules, sizeof(rules)/sizeof(rules[0]), pua_cmd); // cmd ); } } LOG_D( "Extension 'Dictionary definitions for 3GPP29.229' initialized"); return 0; } #endif