| /* |
| * Copyright (c) 2017 Sprint |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| /**************** |
| Generated By: fdtool enhancements to diafuzzer |
| License: same as freeDiameter |
| ****************/ |
| |
| |
| /* |
| * Dictionary definitions of objects specified in ts29273_avps (e20). |
| */ |
| #include <freeDiameter/extension.h> |
| |
| #define PROTO_VER "e20" |
| #define GEN_DATE 1506697133.32 |
| |
| const char *ts29273_avps_proto_ver = PROTO_VER; |
| const double ts29273_avps_gen_date = GEN_DATE; |
| |
| /* The content of this file follows the same structure as dict_base_proto.c */ |
| |
| #define CHECK_dict_new( _type, _data, _parent, _ref ) \ |
| { \ |
| int _ret = fd_dict_new( fd_g_config->cnf_dict, (_type), (_data), (_parent), (_ref) ); \ |
| if ( _ret != 0 && _ret != EEXIST ) \ |
| return _ret; \ |
| } |
| |
| #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 { |
| struct dict_avp_request avp_vendor_plus_name; |
| enum rule_position position; |
| int min; |
| int max; |
| }; |
| |
| #define RULE_ORDER( _position ) ((((_position) == RULE_FIXED_HEAD) || ((_position) == RULE_FIXED_TAIL)) ? 1 : 0 ) |
| |
| /* Attention! This version of the macro uses AVP_BY_NAME_AND_VENDOR, in contrast to most other copies! */ |
| #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_AND_VENDOR, \ |
| &(_rulearray)[__ar].avp_vendor_plus_name, \ |
| &__data.rule_avp, 0 ) ); \ |
| if ( !__data.rule_avp ) { \ |
| TRACE_DEBUG(INFO, "AVP Not found: '%s'", (_rulearray)[__ar].avp_vendor_plus_name.avp_name); \ |
| return ENOENT; \ |
| } \ |
| { \ |
| int _ret = fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &(__data), (_parent), NULL ); \ |
| if ( _ret != 0 && _ret != EEXIST ) { \ |
| TRACE_DEBUG(INFO, "Error on rule with AVP '%s'", \ |
| (_rulearray)[__ar].avp_vendor_plus_name.avp_name); \ |
| return EINVAL; \ |
| } \ |
| } \ |
| } \ |
| } |
| |
| #define CHECK_vendor_new( _data ) { \ |
| struct dict_object * vendor_found; \ |
| if (fd_dict_search(fd_g_config->cnf_dict,DICT_VENDOR,VENDOR_BY_ID,&_data.vendor_id,&vendor_found,ENOENT) == ENOENT) { \ |
| CHECK_FCT(fd_dict_new(fd_g_config->cnf_dict, DICT_VENDOR, &_data, NULL, NULL)); \ |
| } \ |
| } |
| |
| #define enumval_def_u32( _val_, _str_ ) \ |
| { _str_, { .u32 = _val_ }} |
| |
| #define enumval_def_os( _len_, _val_, _str_ ) \ |
| { _str_, { .os = { .data = (unsigned char *)_val_, .len = _len_ }}} |
| |
| |
| static int dict_ts29273_avps_load_defs(char * conffile) |
| { |
| TRACE_ENTRY("%p", conffile); |
| /* Application Section */ |
| { |
| /* Create the vendors */ { |
| struct dict_vendor_data vendor_data = { 10415, "3GPP" }; |
| CHECK_dict_new(DICT_VENDOR, &vendor_data, NULL, NULL) |
| } |
| } |
| |
| |
| /* AVP section */ |
| { |
| struct dict_object * Address_type; |
| struct dict_object * UTF8String_type; |
| struct dict_object * DiameterIdentity_type; |
| struct dict_object * DiameterURI_type; |
| struct dict_object * Time_type; |
| struct dict_object * IPFilterRule_type; |
| |
| CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Address", &Address_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); |
| CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "IPFilterRule", &IPFilterRule_type); |
| /* ANID */ |
| { |
| struct dict_avp_data data = { |
| 1504, /* Code */ |
| 10415, /* Vendor */ |
| "ANID", /* 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); |
| }; |
| /* AN-Trusted */ |
| { |
| struct dict_avp_data data = { |
| 1503, /* Code */ |
| 10415, /* Vendor */ |
| "AN-Trusted", /* 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(AN-Trusted)", NULL, NULL, NULL }; |
| struct dict_enumval_data t_1 = { "TRUSTED", { .i32=0 }}; |
| struct dict_enumval_data t_2 = { "UNTRUSTED", { .i32=1 }}; |
| /* Create the Enumerated type, and then the AVP */ |
| CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type); |
| 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); |
| }; |
| /* MIP-FA-RK */ |
| { |
| struct dict_avp_data data = { |
| 1506, /* Code */ |
| 10415, /* Vendor */ |
| "MIP-FA-RK", /* 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); |
| }; |
| /* MIP-FA-RK-SPI */ |
| { |
| struct dict_avp_data data = { |
| 1507, /* Code */ |
| 10415, /* Vendor */ |
| "MIP-FA-RK-SPI", /* 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); |
| }; |
| /* Full-Network-Name */ |
| { |
| struct dict_avp_data data = { |
| 1516, /* Code */ |
| 10415, /* Vendor */ |
| "Full-Network-Name", /* 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); |
| }; |
| /* Short-Network-Name */ |
| { |
| struct dict_avp_data data = { |
| 1517, /* Code */ |
| 10415, /* Vendor */ |
| "Short-Network-Name", /* 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); |
| }; |
| /* Mobile-Node-Identifier */ |
| { |
| struct dict_avp_data data = { |
| 506, /* Code */ |
| 10415, /* Vendor */ |
| "Mobile-Node-Identifier", /* 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); |
| }; |
| /* AAA-Failure-Indication */ |
| { |
| struct dict_avp_data data = { |
| 1518, /* Code */ |
| 10415, /* Vendor */ |
| "AAA-Failure-Indication", /* 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); |
| }; |
| /* Transport-Access-Type */ |
| { |
| struct dict_avp_data data = { |
| 1519, /* Code */ |
| 10415, /* Vendor */ |
| "Transport-Access-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, "3GPP/Enumerated(Transport-Access-Type)", NULL, NULL, NULL }; |
| struct dict_enumval_data t_1 = { "BBF", { .i32=0 }}; |
| /* Create the Enumerated type, and then the AVP */ |
| CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type); |
| CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL); |
| CHECK_dict_new( DICT_AVP, &data, type, NULL); |
| }; |
| /* Visited-Network-Identifier */ |
| { |
| struct dict_avp_data data = { |
| 600, /* Code */ |
| 10415, /* Vendor */ |
| "Visited-Network-Identifier", /* 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); |
| }; |
| /* DER-Flags */ |
| { |
| struct dict_avp_data data = { |
| 1520, /* Code */ |
| 10415, /* Vendor */ |
| "DER-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); |
| }; |
| /* DEA-Flags */ |
| { |
| struct dict_avp_data data = { |
| 1521, /* Code */ |
| 10415, /* Vendor */ |
| "DEA-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); |
| }; |
| /* SSID */ |
| { |
| struct dict_avp_data data = { |
| 1524, /* Code */ |
| 10415, /* Vendor */ |
| "SSID", /* 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); |
| }; |
| /* HESSID */ |
| { |
| struct dict_avp_data data = { |
| 1525, /* Code */ |
| 10415, /* Vendor */ |
| "HESSID", /* 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); |
| }; |
| /* TWAN-Connection-Mode */ |
| { |
| struct dict_avp_data data = { |
| 1527, /* Code */ |
| 10415, /* Vendor */ |
| "TWAN-Connection-Mode", /* 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); |
| }; |
| /* Connectivity-Flags */ |
| { |
| struct dict_avp_data data = { |
| 1529, /* Code */ |
| 10415, /* Vendor */ |
| "Connectivity-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); |
| }; |
| /* TWAN-PCO */ |
| { |
| struct dict_avp_data data = { |
| 1530, /* Code */ |
| 10415, /* Vendor */ |
| "TWAN-PCO", /* 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); |
| }; |
| /* TWAG-CP-Address */ |
| { |
| struct dict_avp_data data = { |
| 1531, /* Code */ |
| 10415, /* Vendor */ |
| "TWAG-CP-Address", /* 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, Address_type, NULL); |
| }; |
| /* TWAG-UP-Address */ |
| { |
| struct dict_avp_data data = { |
| 1532, /* Code */ |
| 10415, /* Vendor */ |
| "TWAG-UP-Address", /* 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); |
| }; |
| /* TWAN-S2a-Failure-Cause */ |
| { |
| struct dict_avp_data data = { |
| 1533, /* Code */ |
| 10415, /* Vendor */ |
| "TWAN-S2a-Failure-Cause", /* 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); |
| }; |
| /* SM-Back-Off-Timer */ |
| { |
| struct dict_avp_data data = { |
| 1534, /* Code */ |
| 10415, /* Vendor */ |
| "SM-Back-Off-Timer", /* 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); |
| }; |
| /* WLCP-Key */ |
| { |
| struct dict_avp_data data = { |
| 1535, /* Code */ |
| 10415, /* Vendor */ |
| "WLCP-Key", /* 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); |
| }; |
| /* Emergency-Services */ |
| { |
| struct dict_avp_data data = { |
| 1538, /* Code */ |
| 10415, /* Vendor */ |
| "Emergency-Services", /* 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); |
| }; |
| /* IMEI-Check-In-VPLMN-Result */ |
| { |
| struct dict_avp_data data = { |
| 1540, /* Code */ |
| 10415, /* Vendor */ |
| "IMEI-Check-In-VPLMN-Result", /* 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); |
| }; |
| /* Non-3GPP-IP-Access */ |
| { |
| struct dict_avp_data data = { |
| 1501, /* Code */ |
| 10415, /* Vendor */ |
| "Non-3GPP-IP-Access", /* 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(Non-3GPP-IP-Access)", NULL, NULL, NULL }; |
| struct dict_enumval_data t_1 = { "NON_3GPP_SUBSCRIPTION_ALLOWED", { .i32=0 }}; |
| struct dict_enumval_data t_2 = { "NON_3GPP_SUBSCRIPTION_BARRED", { .i32=1 }}; |
| /* Create the Enumerated type, and then the AVP */ |
| CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type); |
| 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); |
| }; |
| /* Non-3GPP-IP-Access-APN */ |
| { |
| struct dict_avp_data data = { |
| 1502, /* Code */ |
| 10415, /* Vendor */ |
| "Non-3GPP-IP-Access-APN", /* 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(Non-3GPP-IP-Access-APN)", NULL, NULL, NULL }; |
| struct dict_enumval_data t_1 = { "Non_3GPP_APNS_ENABLE", { .i32=0 }}; |
| struct dict_enumval_data t_2 = { "Non_3GPP_APNS_DISABLE", { .i32=1 }}; |
| /* Create the Enumerated type, and then the AVP */ |
| CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type); |
| 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); |
| }; |
| /* PPR-Flags */ |
| { |
| struct dict_avp_data data = { |
| 1508, /* Code */ |
| 10415, /* Vendor */ |
| "PPR-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); |
| }; |
| /* TWAN-Default-APN-Context-Id */ |
| { |
| struct dict_avp_data data = { |
| 1512, /* Code */ |
| 10415, /* Vendor */ |
| "TWAN-Default-APN-Context-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); |
| }; |
| /* Access-Authorization-Flags */ |
| { |
| struct dict_avp_data data = { |
| 1511, /* Code */ |
| 10415, /* Vendor */ |
| "Access-Authorization-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); |
| }; |
| /* Service-Selection */ |
| { |
| struct dict_avp_data data = { |
| 493, /* Code */ |
| 10415, /* Vendor */ |
| "Service-Selection", /* 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); |
| }; |
| /* 3GPP-AAA-Server-Name */ |
| { |
| struct dict_avp_data data = { |
| 318, /* Code */ |
| 10415, /* Vendor */ |
| "3GPP-AAA-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, DiameterIdentity_type, NULL); |
| }; |
| /* ERP-Authorization */ |
| { |
| struct dict_avp_data data = { |
| 1541, /* Code */ |
| 10415, /* Vendor */ |
| "ERP-Authorization", /* 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); |
| }; |
| /* MIP6-Feature-Vector */ |
| { |
| struct dict_avp_data data = { |
| 124, /* Code */ |
| 10415, /* Vendor */ |
| "MIP6-Feature-Vector", /* Name */ |
| AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| AVP_TYPE_UNSIGNED64 /* base type of data */ |
| }; |
| CHECK_dict_new( DICT_AVP, &data, NULL, NULL); |
| }; |
| /* Origination-Time-Stamp */ |
| { |
| struct dict_avp_data data = { |
| 1536, /* Code */ |
| 10415, /* Vendor */ |
| "Origination-Time-Stamp", /* 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); |
| }; |
| /* Maximum-Wait-Time */ |
| { |
| struct dict_avp_data data = { |
| 1537, /* Code */ |
| 10415, /* Vendor */ |
| "Maximum-Wait-Time", /* 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); |
| }; |
| /* Access-Network-Info */ |
| { |
| /* Grouped */ |
| struct dict_object * avp; |
| struct dict_avp_data data = { |
| 1526, /* Code */ |
| 10415, /* Vendor */ |
| "Access-Network-Info", /* 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, &avp); |
| } |
| /* MIP6-Agent-Info */ |
| { |
| /* Grouped */ |
| struct dict_object * avp; |
| struct dict_avp_data data = { |
| 486, /* Code */ |
| 10415, /* Vendor */ |
| "MIP6-Agent-Info", /* Name */ |
| AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ |
| AVP_FLAG_MANDATORY, /* Fixed flag values */ |
| AVP_TYPE_GROUPED /* base type of data */ |
| }; |
| CHECK_dict_new( DICT_AVP, &data , NULL, &avp); |
| } |
| /* WLAN-Identifier */ |
| { |
| /* Grouped */ |
| struct dict_object * avp; |
| struct dict_avp_data data = { |
| 1509, /* Code */ |
| 10415, /* Vendor */ |
| "WLAN-Identifier", /* 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, &avp); |
| } |
| /* TWAN-Connectivity-Parameters */ |
| { |
| /* Grouped */ |
| struct dict_object * avp; |
| struct dict_avp_data data = { |
| 1528, /* Code */ |
| 10415, /* Vendor */ |
| "TWAN-Connectivity-Parameters", /* 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, &avp); |
| } |
| /* TWAN-Access-Info */ |
| { |
| /* Grouped */ |
| struct dict_object * avp; |
| struct dict_avp_data data = { |
| 1510, /* Code */ |
| 10415, /* Vendor */ |
| "TWAN-Access-Info", /* 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, &avp); |
| } |
| /* Trace-Info */ |
| { |
| /* Grouped */ |
| struct dict_object * avp; |
| struct dict_avp_data data = { |
| 1505, /* Code */ |
| 10415, /* Vendor */ |
| "Trace-Info", /* 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, &avp); |
| } |
| /* Non-3GPP-User-Data */ |
| { |
| /* Grouped */ |
| struct dict_object * avp; |
| struct dict_avp_data data = { |
| 1500, /* Code */ |
| 10415, /* Vendor */ |
| "Non-3GPP-User-Data", /* 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 */ |
| }; |
| CHECK_dict_new( DICT_AVP, &data , NULL, &avp); |
| } |
| |
| |
| } |
| |
| /* Commands section */ |
| { |
| |
| } |
| |
| return 0; |
| } |
| |
| static int dict_ts29273_avps_load_rules(char * conffile) |
| { |
| /* Grouped AVP section */ |
| { |
| /* Access-Network-Info */ |
| { |
| /* Grouped */ |
| struct dict_object * avp; |
| struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 10415, .avp_name = "Access-Network-Info"}; |
| CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp) |
| struct local_rules_definition rules[] = |
| { |
| { { .avp_vendor = 10415, .avp_name = "SSID"}, RULE_OPTIONAL, -1, -1 }, |
| { { .avp_vendor = 10415, .avp_name = "BSSID"}, RULE_OPTIONAL, -1, -1 }, |
| { { .avp_vendor = 0, .avp_name = "Location-Information"}, RULE_OPTIONAL, -1, -1 }, |
| { { .avp_vendor = 0, .avp_name = "Location-Data"}, RULE_OPTIONAL, -1, -1 }, |
| { { .avp_vendor = 0, .avp_name = "Operator-Name"}, RULE_OPTIONAL, -1, -1 }, |
| { { .avp_vendor = 13019, .avp_name = "Logical-Access-Id"}, RULE_OPTIONAL, -1, -1 } |
| }; |
| PARSE_loc_rules( rules, avp ); |
| } |
| /* MIP6-Agent-Info */ |
| { |
| /* Grouped */ |
| struct dict_object * avp; |
| struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 10415, .avp_name = "MIP6-Agent-Info"}; |
| CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp) |
| struct local_rules_definition rules[] = |
| { |
| { { .avp_vendor = 0, .avp_name = "MIP-Home-Agent-Address"}, RULE_OPTIONAL, -1, 2 }, |
| { { .avp_vendor = 0, .avp_name = "MIP-Home-Agent-Host"}, RULE_OPTIONAL, -1, -1 }, |
| { { .avp_vendor = 0, .avp_name = "MIP6-Home-Link-Prefix"}, RULE_OPTIONAL, -1, -1 } |
| }; |
| PARSE_loc_rules( rules, avp ); |
| } |
| /* WLAN-Identifier */ |
| { |
| /* Grouped */ |
| struct dict_object * avp; |
| struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 10415, .avp_name = "WLAN-Identifier"}; |
| CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp) |
| struct local_rules_definition rules[] = |
| { |
| { { .avp_vendor = 10415, .avp_name = "SSID"}, RULE_OPTIONAL, -1, -1 }, |
| { { .avp_vendor = 10415, .avp_name = "HESSID"}, RULE_OPTIONAL, -1, -1 } |
| }; |
| PARSE_loc_rules( rules, avp ); |
| } |
| /* TWAN-Connectivity-Parameters */ |
| { |
| /* Grouped */ |
| struct dict_object * avp; |
| struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 10415, .avp_name = "TWAN-Connectivity-Parameters"}; |
| CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp) |
| struct local_rules_definition rules[] = |
| { |
| { { .avp_vendor = 10415, .avp_name = "Connectivity-Flags"}, RULE_OPTIONAL, -1, -1 }, |
| { { .avp_vendor = 10415, .avp_name = "Service-Selection"}, RULE_OPTIONAL, -1, -1 }, |
| { { .avp_vendor = 10415, .avp_name = "PDN-Type"}, RULE_OPTIONAL, -1, -1 }, |
| { { .avp_vendor = 10415, .avp_name = "Served-Party-IP-Address"}, RULE_OPTIONAL, -1, 2 }, |
| { { .avp_vendor = 10415, .avp_name = "TWAN-PCO"}, RULE_OPTIONAL, -1, -1 }, |
| { { .avp_vendor = 10415, .avp_name = "TWAG-UP-Address"}, RULE_OPTIONAL, -1, -1 }, |
| { { .avp_vendor = 10415, .avp_name = "TWAN-S2a-Failure-Cause"}, RULE_OPTIONAL, -1, -1 }, |
| { { .avp_vendor = 10415, .avp_name = "SM-Back-Off-Timer"}, RULE_OPTIONAL, -1, -1 } |
| }; |
| PARSE_loc_rules( rules, avp ); |
| } |
| /* TWAN-Access-Info */ |
| { |
| /* Grouped */ |
| struct dict_object * avp; |
| struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 10415, .avp_name = "TWAN-Access-Info"}; |
| CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp) |
| struct local_rules_definition rules[] = |
| { |
| { { .avp_vendor = 10415, .avp_name = "Access-Authorization-Flags"}, RULE_OPTIONAL, -1, -1 }, |
| { { .avp_vendor = 10415, .avp_name = "WLAN-Identifier"}, RULE_OPTIONAL, -1, -1 } |
| }; |
| PARSE_loc_rules( rules, avp ); |
| } |
| /* Trace-Info */ |
| { |
| /* Grouped */ |
| struct dict_object * avp; |
| struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 10415, .avp_name = "Trace-Info"}; |
| CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp) |
| struct local_rules_definition rules[] = |
| { |
| { { .avp_vendor = 10415, .avp_name = "Trace-Data"}, RULE_OPTIONAL, -1, -1 }, |
| { { .avp_vendor = 10415, .avp_name = "Trace-Reference"}, RULE_OPTIONAL, -1, -1 } |
| }; |
| PARSE_loc_rules( rules, avp ); |
| } |
| /* Non-3GPP-User-Data */ |
| { |
| /* Grouped */ |
| struct dict_object * avp; |
| struct dict_avp_request avp_vendor_plus_name = { .avp_vendor = 10415, .avp_name = "Non-3GPP-User-Data"}; |
| CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avp_vendor_plus_name, &avp) |
| struct local_rules_definition rules[] = |
| { |
| { { .avp_vendor = 0, .avp_name = "Subscription-Id"}, RULE_OPTIONAL, -1, -1 }, |
| { { .avp_vendor = 10415, .avp_name = "Non-3GPP-IP-Access"}, RULE_OPTIONAL, -1, -1 }, |
| { { .avp_vendor = 10415, .avp_name = "Non-3GPP-IP-Access-APN"}, RULE_OPTIONAL, -1, -1 }, |
| { { .avp_vendor = 10415, .avp_name = "RAT-Type"}, RULE_OPTIONAL, -1, -1 }, |
| { { .avp_vendor = 0, .avp_name = "Session-Timeout"}, RULE_OPTIONAL, -1, -1 }, |
| { { .avp_vendor = 10415, .avp_name = "MIP6-Feature-Vector"}, RULE_OPTIONAL, -1, -1 }, |
| { { .avp_vendor = 10415, .avp_name = "AMBR"}, RULE_OPTIONAL, -1, -1 }, |
| { { .avp_vendor = 10415, .avp_name = "3GPP-Charging-Characteristics"}, RULE_OPTIONAL, -1, -1 }, |
| { { .avp_vendor = 10415, .avp_name = "Context-Identifier"}, RULE_OPTIONAL, -1, -1 }, |
| { { .avp_vendor = 10415, .avp_name = "APN-OI-Replacement"}, RULE_OPTIONAL, -1, -1 }, |
| { { .avp_vendor = 10415, .avp_name = "APN-Configuration"}, RULE_OPTIONAL, -1, -1 }, |
| { { .avp_vendor = 10415, .avp_name = "Trace-Info"}, RULE_OPTIONAL, -1, -1 }, |
| { { .avp_vendor = 10415, .avp_name = "TWAN-Default-APN-Context-Id"}, RULE_OPTIONAL, -1, -1 }, |
| { { .avp_vendor = 10415, .avp_name = "TWAN-Access-Info"}, RULE_OPTIONAL, -1, -1 }, |
| { { .avp_vendor = 10415, .avp_name = "Emergency-Info"}, RULE_OPTIONAL, -1, -1 }, |
| { { .avp_vendor = 10415, .avp_name = "ERP-Authorization"}, RULE_OPTIONAL, -1, -1 } |
| }; |
| PARSE_loc_rules( rules, avp ); |
| } |
| |
| } |
| |
| /* Commands section */ |
| { |
| |
| } |
| |
| LOG_D( "Extension 'Dictionary definitions for ts29273_avps (e20)' initialized"); |
| return 0; |
| } |
| |
| int dict_entry(char * conffile) |
| { |
| dict_ts29273_avps_load_defs(conffile); |
| return dict_ts29273_avps_load_rules(conffile); |
| } |
| |
| const char* dict_ts29273_avps_proto_ver(char * conffile) { |
| return ts29273_avps_proto_ver; |
| } |
| |
| const double dict_ts29273_avps_gen_ts(char * conffile) { |
| return ts29273_avps_gen_date; |
| } |
| |
| EXTENSION_ENTRY2("dict_ts29273_avps", dict_ts29273_avps_load_defs, dict_ts29273_avps_load_rules, "dict_ts32299_avps", "dict_ts29272_avps", "dict_ts29212_avps", "dict_ts29229_avps", "dict_rfc5778_avps", "dict_ts29061_avps", "dict_rfc4006bis_avps", "dict_rfc6942_avps", "dict_rfc7155_avps", "dict_rfc4072_avps", "dict_rfc5447_avps", "dict_rfc7683_avps", "dict_rfc6734_avps", "dict_rfc4004_avps", "dict_rfc5580_avps", "dict_rfc5777_avps", "dict_draftload_avps", "dict_etsi283034_avps", "dict_rfc7944_avps"); |
| |
| |
| |