Brian Waters | 13d9601 | 2017-12-08 16:53:31 -0600 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2017 Sprint |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | /**************** |
| 18 | Generated By: fdtool enhancements to diafuzzer |
| 19 | License: same as freeDiameter |
| 20 | ****************/ |
| 21 | |
| 22 | |
| 23 | /* |
| 24 | * Dictionary definitions of objects specified in S6as6d (e30). |
| 25 | */ |
| 26 | #include <freeDiameter/extension.h> |
| 27 | |
| 28 | #define PROTO_VER "e30" |
| 29 | #define GEN_DATE 1506697194.55 |
| 30 | |
| 31 | const char *s6as6d_proto_ver = PROTO_VER; |
| 32 | const double s6as6d_gen_date = GEN_DATE; |
| 33 | |
| 34 | /* The content of this file follows the same structure as dict_base_proto.c */ |
| 35 | |
| 36 | #define CHECK_dict_new( _type, _data, _parent, _ref ) \ |
| 37 | { \ |
| 38 | int _ret = fd_dict_new( fd_g_config->cnf_dict, (_type), (_data), (_parent), (_ref) ); \ |
| 39 | if ( _ret != 0 && _ret != EEXIST ) \ |
| 40 | return _ret; \ |
| 41 | } |
| 42 | |
| 43 | #define CHECK_dict_search( _type, _criteria, _what, _result ) \ |
| 44 | CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, (_type), (_criteria), (_what), (_result), ENOENT) ); |
| 45 | |
| 46 | struct local_rules_definition { |
| 47 | struct dict_avp_request avp_vendor_plus_name; |
| 48 | enum rule_position position; |
| 49 | int min; |
| 50 | int max; |
| 51 | }; |
| 52 | |
| 53 | #define RULE_ORDER( _position ) ((((_position) == RULE_FIXED_HEAD) || ((_position) == RULE_FIXED_TAIL)) ? 1 : 0 ) |
| 54 | |
| 55 | /* Attention! This version of the macro uses AVP_BY_NAME_AND_VENDOR, in contrast to most other copies! */ |
| 56 | #define PARSE_loc_rules( _rulearray, _parent) { \ |
| 57 | int __ar; \ |
| 58 | for (__ar=0; __ar < sizeof(_rulearray) / sizeof((_rulearray)[0]); __ar++) { \ |
| 59 | struct dict_rule_data __data = { NULL, \ |
| 60 | (_rulearray)[__ar].position, \ |
| 61 | 0, \ |
| 62 | (_rulearray)[__ar].min, \ |
| 63 | (_rulearray)[__ar].max}; \ |
| 64 | __data.rule_order = RULE_ORDER(__data.rule_position); \ |
| 65 | CHECK_FCT( fd_dict_search( \ |
| 66 | fd_g_config->cnf_dict, \ |
| 67 | DICT_AVP, \ |
| 68 | AVP_BY_NAME_AND_VENDOR, \ |
| 69 | &(_rulearray)[__ar].avp_vendor_plus_name, \ |
| 70 | &__data.rule_avp, 0 ) ); \ |
| 71 | if ( !__data.rule_avp ) { \ |
| 72 | TRACE_DEBUG(INFO, "AVP Not found: '%s'", (_rulearray)[__ar].avp_vendor_plus_name.avp_name); \ |
| 73 | return ENOENT; \ |
| 74 | } \ |
| 75 | { \ |
| 76 | int _ret = fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &(__data), (_parent), NULL ); \ |
| 77 | if ( _ret != 0 && _ret != EEXIST ) { \ |
| 78 | TRACE_DEBUG(INFO, "Error on rule with AVP '%s'", \ |
| 79 | (_rulearray)[__ar].avp_vendor_plus_name.avp_name); \ |
| 80 | return EINVAL; \ |
| 81 | } \ |
| 82 | } \ |
| 83 | } \ |
| 84 | } |
| 85 | |
| 86 | #define CHECK_vendor_new( _data ) { \ |
| 87 | struct dict_object * vendor_found; \ |
| 88 | if (fd_dict_search(fd_g_config->cnf_dict,DICT_VENDOR,VENDOR_BY_ID,&_data.vendor_id,&vendor_found,ENOENT) == ENOENT) { \ |
| 89 | CHECK_FCT(fd_dict_new(fd_g_config->cnf_dict, DICT_VENDOR, &_data, NULL, NULL)); \ |
| 90 | } \ |
| 91 | } |
| 92 | |
| 93 | #define enumval_def_u32( _val_, _str_ ) \ |
| 94 | { _str_, { .u32 = _val_ }} |
| 95 | |
| 96 | #define enumval_def_os( _len_, _val_, _str_ ) \ |
| 97 | { _str_, { .os = { .data = (unsigned char *)_val_, .len = _len_ }}} |
| 98 | |
| 99 | |
| 100 | static int dict_s6as6d_load_defs(char * conffile) |
| 101 | { |
| 102 | TRACE_ENTRY("%p", conffile); |
| 103 | struct dict_object * app_id16777251; |
| 104 | |
| 105 | /* Application Section */ |
| 106 | { |
| 107 | { |
| 108 | struct dict_object * vendor; |
| 109 | CHECK_dict_search(DICT_VENDOR, VENDOR_BY_NAME, "3GPP", &vendor) |
| 110 | struct dict_application_data data = { 16777251, "S6as6d" }; |
| 111 | CHECK_dict_new( DICT_APPLICATION, &data, vendor, &app_id16777251) |
| 112 | } |
| 113 | /* Result codes */ |
| 114 | { |
| 115 | struct dict_object *type; |
| 116 | CHECK_dict_search(DICT_TYPE, TYPE_BY_NAME, "Enumerated(Result-Code)",&type); |
| 117 | struct dict_enumval_data t_1 = { "General", { .u32=1 }}; |
| 118 | struct dict_enumval_data t_2 = { "HSS_behaviour", { .u32=2 }}; |
| 119 | struct dict_enumval_data t_3 = { "MME_SGSN_behaviour", { .u32=3 }}; |
| 120 | struct dict_enumval_data t_4 = { "Transient_Failures", { .u32=4 }}; |
| 121 | struct dict_enumval_data t_5 = { "User_identity_to_HSS_resolution", { .u32=8 }}; |
| 122 | |
| 123 | CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL); |
| 124 | CHECK_dict_new( DICT_ENUMVAL, &t_2, type, NULL); |
| 125 | CHECK_dict_new( DICT_ENUMVAL, &t_3, type, NULL); |
| 126 | CHECK_dict_new( DICT_ENUMVAL, &t_4, type, NULL); |
| 127 | CHECK_dict_new( DICT_ENUMVAL, &t_5, type, NULL); |
| 128 | |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | |
| 133 | /* AVP section */ |
| 134 | { |
| 135 | struct dict_object * Address_type; |
| 136 | struct dict_object * UTF8String_type; |
| 137 | struct dict_object * DiameterIdentity_type; |
| 138 | struct dict_object * DiameterURI_type; |
| 139 | struct dict_object * Time_type; |
| 140 | struct dict_object * IPFilterRule_type; |
| 141 | |
| 142 | CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Address", &Address_type); |
| 143 | CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "UTF8String", &UTF8String_type); |
| 144 | CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "DiameterIdentity", &DiameterIdentity_type); |
| 145 | CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "DiameterURI", &DiameterURI_type); |
| 146 | CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Time", &Time_type); |
| 147 | CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "IPFilterRule", &IPFilterRule_type); |
| 148 | |
| 149 | |
| 150 | } |
| 151 | |
| 152 | /* Commands section */ |
| 153 | { |
| 154 | /* Update-Location-Request */ |
| 155 | { |
| 156 | struct dict_object* cmd; |
| 157 | struct dict_cmd_data data = { |
| 158 | 316, /* Code */ |
| 159 | "Update-Location-Request", /* Name */ |
| 160 | CMD_FLAG_REQUEST | CMD_FLAG_ERROR, /* Fixed flags */ |
| 161 | CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE, /* Fixed flag values */ |
| 162 | }; |
| 163 | |
| 164 | CHECK_dict_new( DICT_COMMAND, &data , app_id16777251, &cmd) |
| 165 | } |
| 166 | /* Update-Location-Answer */ |
| 167 | { |
| 168 | struct dict_object* cmd; |
| 169 | struct dict_cmd_data data = { |
| 170 | 316, /* Code */ |
| 171 | "Update-Location-Answer", /* Name */ |
| 172 | CMD_FLAG_REQUEST, /* Fixed flags */ |
| 173 | CMD_FLAG_PROXIABLE, /* Fixed flag values */ |
| 174 | }; |
| 175 | |
| 176 | CHECK_dict_new( DICT_COMMAND, &data , app_id16777251, &cmd) |
| 177 | } |
| 178 | /* Cancel-Location-Request */ |
| 179 | { |
| 180 | struct dict_object* cmd; |
| 181 | struct dict_cmd_data data = { |
| 182 | 317, /* Code */ |
| 183 | "Cancel-Location-Request", /* Name */ |
| 184 | CMD_FLAG_REQUEST | CMD_FLAG_ERROR, /* Fixed flags */ |
| 185 | CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE, /* Fixed flag values */ |
| 186 | }; |
| 187 | |
| 188 | CHECK_dict_new( DICT_COMMAND, &data , app_id16777251, &cmd) |
| 189 | } |
| 190 | /* Cancel-Location-Answer */ |
| 191 | { |
| 192 | struct dict_object* cmd; |
| 193 | struct dict_cmd_data data = { |
| 194 | 317, /* Code */ |
| 195 | "Cancel-Location-Answer", /* Name */ |
| 196 | CMD_FLAG_REQUEST, /* Fixed flags */ |
| 197 | CMD_FLAG_PROXIABLE, /* Fixed flag values */ |
| 198 | }; |
| 199 | |
| 200 | CHECK_dict_new( DICT_COMMAND, &data , app_id16777251, &cmd) |
| 201 | } |
| 202 | /* Authentication-Information-Request */ |
| 203 | { |
| 204 | struct dict_object* cmd; |
| 205 | struct dict_cmd_data data = { |
| 206 | 318, /* Code */ |
| 207 | "Authentication-Information-Request", /* Name */ |
| 208 | CMD_FLAG_REQUEST | CMD_FLAG_ERROR, /* Fixed flags */ |
| 209 | CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE, /* Fixed flag values */ |
| 210 | }; |
| 211 | |
| 212 | CHECK_dict_new( DICT_COMMAND, &data , app_id16777251, &cmd) |
| 213 | } |
| 214 | /* Authentication-Information-Answer */ |
| 215 | { |
| 216 | struct dict_object* cmd; |
| 217 | struct dict_cmd_data data = { |
| 218 | 318, /* Code */ |
| 219 | "Authentication-Information-Answer", /* Name */ |
| 220 | CMD_FLAG_REQUEST, /* Fixed flags */ |
| 221 | CMD_FLAG_PROXIABLE, /* Fixed flag values */ |
| 222 | }; |
| 223 | |
| 224 | CHECK_dict_new( DICT_COMMAND, &data , app_id16777251, &cmd) |
| 225 | } |
| 226 | /* Insert-Subscriber-Data-Request */ |
| 227 | { |
| 228 | struct dict_object* cmd; |
| 229 | struct dict_cmd_data data = { |
| 230 | 319, /* Code */ |
| 231 | "Insert-Subscriber-Data-Request", /* Name */ |
| 232 | CMD_FLAG_REQUEST | CMD_FLAG_ERROR, /* Fixed flags */ |
| 233 | CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE, /* Fixed flag values */ |
| 234 | }; |
| 235 | |
| 236 | CHECK_dict_new( DICT_COMMAND, &data , app_id16777251, &cmd) |
| 237 | } |
| 238 | /* Insert-Subscriber-Data-Answer */ |
| 239 | { |
| 240 | struct dict_object* cmd; |
| 241 | struct dict_cmd_data data = { |
| 242 | 319, /* Code */ |
| 243 | "Insert-Subscriber-Data-Answer", /* Name */ |
| 244 | CMD_FLAG_REQUEST, /* Fixed flags */ |
| 245 | CMD_FLAG_PROXIABLE, /* Fixed flag values */ |
| 246 | }; |
| 247 | |
| 248 | CHECK_dict_new( DICT_COMMAND, &data , app_id16777251, &cmd) |
| 249 | } |
| 250 | /* Delete-Subscriber-Data-Request */ |
| 251 | { |
| 252 | struct dict_object* cmd; |
| 253 | struct dict_cmd_data data = { |
| 254 | 320, /* Code */ |
| 255 | "Delete-Subscriber-Data-Request", /* Name */ |
| 256 | CMD_FLAG_REQUEST | CMD_FLAG_ERROR, /* Fixed flags */ |
| 257 | CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE, /* Fixed flag values */ |
| 258 | }; |
| 259 | |
| 260 | CHECK_dict_new( DICT_COMMAND, &data , app_id16777251, &cmd) |
| 261 | } |
| 262 | /* Delete-Subscriber-Data-Answer */ |
| 263 | { |
| 264 | struct dict_object* cmd; |
| 265 | struct dict_cmd_data data = { |
| 266 | 320, /* Code */ |
| 267 | "Delete-Subscriber-Data-Answer", /* Name */ |
| 268 | CMD_FLAG_REQUEST, /* Fixed flags */ |
| 269 | CMD_FLAG_PROXIABLE, /* Fixed flag values */ |
| 270 | }; |
| 271 | |
| 272 | CHECK_dict_new( DICT_COMMAND, &data , app_id16777251, &cmd) |
| 273 | } |
| 274 | /* Purge-UE-Request */ |
| 275 | { |
| 276 | struct dict_object* cmd; |
| 277 | struct dict_cmd_data data = { |
| 278 | 321, /* Code */ |
| 279 | "Purge-UE-Request", /* Name */ |
| 280 | CMD_FLAG_REQUEST | CMD_FLAG_ERROR, /* Fixed flags */ |
| 281 | CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE, /* Fixed flag values */ |
| 282 | }; |
| 283 | |
| 284 | CHECK_dict_new( DICT_COMMAND, &data , app_id16777251, &cmd) |
| 285 | } |
| 286 | /* Purge-UE-Answer */ |
| 287 | { |
| 288 | struct dict_object* cmd; |
| 289 | struct dict_cmd_data data = { |
| 290 | 321, /* Code */ |
| 291 | "Purge-UE-Answer", /* Name */ |
| 292 | CMD_FLAG_REQUEST, /* Fixed flags */ |
| 293 | CMD_FLAG_PROXIABLE, /* Fixed flag values */ |
| 294 | }; |
| 295 | |
| 296 | CHECK_dict_new( DICT_COMMAND, &data , app_id16777251, &cmd) |
| 297 | } |
| 298 | /* Reset-Request */ |
| 299 | { |
| 300 | struct dict_object* cmd; |
| 301 | struct dict_cmd_data data = { |
| 302 | 322, /* Code */ |
| 303 | "Reset-Request", /* Name */ |
| 304 | CMD_FLAG_REQUEST | CMD_FLAG_ERROR, /* Fixed flags */ |
| 305 | CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE, /* Fixed flag values */ |
| 306 | }; |
| 307 | |
| 308 | CHECK_dict_new( DICT_COMMAND, &data , app_id16777251, &cmd) |
| 309 | } |
| 310 | /* Reset-Answer */ |
| 311 | { |
| 312 | struct dict_object* cmd; |
| 313 | struct dict_cmd_data data = { |
| 314 | 322, /* Code */ |
| 315 | "Reset-Answer", /* Name */ |
| 316 | CMD_FLAG_REQUEST, /* Fixed flags */ |
| 317 | CMD_FLAG_PROXIABLE, /* Fixed flag values */ |
| 318 | }; |
| 319 | |
| 320 | CHECK_dict_new( DICT_COMMAND, &data , app_id16777251, &cmd) |
| 321 | } |
| 322 | |
| 323 | } |
| 324 | |
| 325 | return 0; |
| 326 | } |
| 327 | |
| 328 | static int dict_s6as6d_load_rules(char * conffile) |
| 329 | { |
| 330 | /* Grouped AVP section */ |
| 331 | { |
| 332 | |
| 333 | } |
| 334 | |
| 335 | /* Commands section */ |
| 336 | { |
| 337 | /* Update-Location-Request */ |
| 338 | { |
| 339 | struct dict_object* cmd; |
| 340 | CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Update-Location-Request", &cmd) |
| 341 | struct local_rules_definition rules[] = |
| 342 | { |
| 343 | { { .avp_vendor = 0, .avp_name = "Session-Id"}, RULE_FIXED_HEAD, -1, -1 }, |
| 344 | { { .avp_vendor = 0, .avp_name = "DRMP"}, RULE_OPTIONAL, -1, -1 }, |
| 345 | { { .avp_vendor = 0, .avp_name = "Vendor-Specific-Application-Id"}, RULE_OPTIONAL, -1, -1 }, |
| 346 | { { .avp_vendor = 0, .avp_name = "Auth-Session-State"}, RULE_REQUIRED, -1, -1 }, |
| 347 | { { .avp_vendor = 0, .avp_name = "Origin-Host"}, RULE_REQUIRED, -1, -1 }, |
| 348 | { { .avp_vendor = 0, .avp_name = "Origin-Realm"}, RULE_REQUIRED, -1, -1 }, |
| 349 | { { .avp_vendor = 0, .avp_name = "Destination-Host"}, RULE_OPTIONAL, -1, -1 }, |
| 350 | { { .avp_vendor = 0, .avp_name = "Destination-Realm"}, RULE_REQUIRED, -1, -1 }, |
| 351 | { { .avp_vendor = 0, .avp_name = "User-Name"}, RULE_REQUIRED, -1, -1 }, |
| 352 | { { .avp_vendor = 0, .avp_name = "OC-Supported-Features"}, RULE_OPTIONAL, -1, -1 }, |
| 353 | { { .avp_vendor = 10415, .avp_name = "Supported-Features"}, RULE_OPTIONAL, -1, -1 }, |
| 354 | { { .avp_vendor = 10415, .avp_name = "Terminal-Information"}, RULE_OPTIONAL, -1, -1 }, |
| 355 | { { .avp_vendor = 10415, .avp_name = "RAT-Type"}, RULE_REQUIRED, -1, -1 }, |
| 356 | { { .avp_vendor = 10415, .avp_name = "ULR-Flags"}, RULE_REQUIRED, -1, -1 }, |
| 357 | { { .avp_vendor = 10415, .avp_name = "UE-SRVCC-Capability"}, RULE_OPTIONAL, -1, -1 }, |
| 358 | { { .avp_vendor = 10415, .avp_name = "Visited-PLMN-Id"}, RULE_REQUIRED, -1, -1 }, |
| 359 | { { .avp_vendor = 10415, .avp_name = "SGSN-Number"}, RULE_OPTIONAL, -1, -1 }, |
| 360 | { { .avp_vendor = 10415, .avp_name = "Homogeneous-Support-of-IMS-Voice-Over-PS-Sessions"}, RULE_OPTIONAL, -1, -1 }, |
| 361 | { { .avp_vendor = 10415, .avp_name = "GMLC-Address"}, RULE_OPTIONAL, -1, -1 }, |
| 362 | { { .avp_vendor = 10415, .avp_name = "Active-APN"}, RULE_OPTIONAL, -1, -1 }, |
| 363 | { { .avp_vendor = 10415, .avp_name = "Equivalent-PLMN-List"}, RULE_OPTIONAL, -1, -1 }, |
| 364 | { { .avp_vendor = 10415, .avp_name = "MME-Number-for-MT-SMS"}, RULE_OPTIONAL, -1, -1 }, |
| 365 | { { .avp_vendor = 10415, .avp_name = "SMS-Register-Request"}, RULE_OPTIONAL, -1, -1 }, |
| 366 | { { .avp_vendor = 10415, .avp_name = "SGs-MME-Identity"}, RULE_OPTIONAL, -1, -1 }, |
| 367 | { { .avp_vendor = 10415, .avp_name = "Coupled-Node-Diameter-ID"}, RULE_OPTIONAL, -1, -1 }, |
| 368 | { { .avp_vendor = 10415, .avp_name = "Adjacent-PLMNs"}, RULE_OPTIONAL, -1, -1 }, |
| 369 | { { .avp_vendor = 10415, .avp_name = "Supported-Services"}, RULE_OPTIONAL, -1, -1 }, |
| 370 | { { .avp_vendor = 0, .avp_name = "Proxy-Info"}, RULE_OPTIONAL, -1, -1 }, |
| 371 | { { .avp_vendor = 0, .avp_name = "Route-Record"}, RULE_OPTIONAL, -1, -1 } |
| 372 | }; |
| 373 | PARSE_loc_rules(rules, cmd); |
| 374 | } |
| 375 | /* Update-Location-Answer */ |
| 376 | { |
| 377 | struct dict_object* cmd; |
| 378 | CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Update-Location-Answer", &cmd) |
| 379 | struct local_rules_definition rules[] = |
| 380 | { |
| 381 | { { .avp_vendor = 0, .avp_name = "Session-Id"}, RULE_FIXED_HEAD, -1, -1 }, |
| 382 | { { .avp_vendor = 0, .avp_name = "DRMP"}, RULE_OPTIONAL, -1, -1 }, |
| 383 | { { .avp_vendor = 0, .avp_name = "Vendor-Specific-Application-Id"}, RULE_OPTIONAL, -1, -1 }, |
| 384 | { { .avp_vendor = 0, .avp_name = "Result-Code"}, RULE_OPTIONAL, -1, -1 }, |
| 385 | { { .avp_vendor = 0, .avp_name = "Experimental-Result"}, RULE_OPTIONAL, -1, -1 }, |
| 386 | { { .avp_vendor = 10415, .avp_name = "Error-Diagnostic"}, RULE_OPTIONAL, -1, -1 }, |
| 387 | { { .avp_vendor = 0, .avp_name = "Auth-Session-State"}, RULE_REQUIRED, -1, -1 }, |
| 388 | { { .avp_vendor = 0, .avp_name = "Origin-Host"}, RULE_REQUIRED, -1, -1 }, |
| 389 | { { .avp_vendor = 0, .avp_name = "Origin-Realm"}, RULE_REQUIRED, -1, -1 }, |
| 390 | { { .avp_vendor = 0, .avp_name = "OC-Supported-Features"}, RULE_OPTIONAL, -1, -1 }, |
| 391 | { { .avp_vendor = 0, .avp_name = "OC-OLR"}, RULE_OPTIONAL, -1, -1 }, |
| 392 | { { .avp_vendor = 0, .avp_name = "Load"}, RULE_OPTIONAL, -1, -1 }, |
| 393 | { { .avp_vendor = 10415, .avp_name = "Supported-Features"}, RULE_OPTIONAL, -1, -1 }, |
| 394 | { { .avp_vendor = 10415, .avp_name = "ULA-Flags"}, RULE_OPTIONAL, -1, -1 }, |
| 395 | { { .avp_vendor = 10415, .avp_name = "Subscription-Data"}, RULE_OPTIONAL, -1, -1 }, |
| 396 | { { .avp_vendor = 10415, .avp_name = "Reset-ID"}, RULE_OPTIONAL, -1, -1 }, |
| 397 | { { .avp_vendor = 0, .avp_name = "Failed-AVP"}, RULE_OPTIONAL, -1, -1 }, |
| 398 | { { .avp_vendor = 0, .avp_name = "Proxy-Info"}, RULE_OPTIONAL, -1, -1 }, |
| 399 | { { .avp_vendor = 0, .avp_name = "Route-Record"}, RULE_OPTIONAL, -1, -1 } |
| 400 | }; |
| 401 | PARSE_loc_rules(rules, cmd); |
| 402 | } |
| 403 | /* Cancel-Location-Request */ |
| 404 | { |
| 405 | struct dict_object* cmd; |
| 406 | CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Cancel-Location-Request", &cmd) |
| 407 | struct local_rules_definition rules[] = |
| 408 | { |
| 409 | { { .avp_vendor = 0, .avp_name = "Session-Id"}, RULE_FIXED_HEAD, -1, -1 }, |
| 410 | { { .avp_vendor = 0, .avp_name = "DRMP"}, RULE_OPTIONAL, -1, -1 }, |
| 411 | { { .avp_vendor = 0, .avp_name = "Vendor-Specific-Application-Id"}, RULE_OPTIONAL, -1, -1 }, |
| 412 | { { .avp_vendor = 0, .avp_name = "Auth-Session-State"}, RULE_REQUIRED, -1, -1 }, |
| 413 | { { .avp_vendor = 0, .avp_name = "Origin-Host"}, RULE_REQUIRED, -1, -1 }, |
| 414 | { { .avp_vendor = 0, .avp_name = "Origin-Realm"}, RULE_REQUIRED, -1, -1 }, |
| 415 | { { .avp_vendor = 0, .avp_name = "Destination-Host"}, RULE_REQUIRED, -1, -1 }, |
| 416 | { { .avp_vendor = 0, .avp_name = "Destination-Realm"}, RULE_REQUIRED, -1, -1 }, |
| 417 | { { .avp_vendor = 0, .avp_name = "User-Name"}, RULE_REQUIRED, -1, -1 }, |
| 418 | { { .avp_vendor = 10415, .avp_name = "Supported-Features"}, RULE_OPTIONAL, -1, -1 }, |
| 419 | { { .avp_vendor = 10415, .avp_name = "Cancellation-Type"}, RULE_REQUIRED, -1, -1 }, |
| 420 | { { .avp_vendor = 10415, .avp_name = "CLR-Flags"}, RULE_OPTIONAL, -1, -1 }, |
| 421 | { { .avp_vendor = 0, .avp_name = "Proxy-Info"}, RULE_OPTIONAL, -1, -1 }, |
| 422 | { { .avp_vendor = 0, .avp_name = "Route-Record"}, RULE_OPTIONAL, -1, -1 } |
| 423 | }; |
| 424 | PARSE_loc_rules(rules, cmd); |
| 425 | } |
| 426 | /* Cancel-Location-Answer */ |
| 427 | { |
| 428 | struct dict_object* cmd; |
| 429 | CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Cancel-Location-Answer", &cmd) |
| 430 | struct local_rules_definition rules[] = |
| 431 | { |
| 432 | { { .avp_vendor = 0, .avp_name = "Session-Id"}, RULE_FIXED_HEAD, -1, -1 }, |
| 433 | { { .avp_vendor = 0, .avp_name = "DRMP"}, RULE_OPTIONAL, -1, -1 }, |
| 434 | { { .avp_vendor = 0, .avp_name = "Vendor-Specific-Application-Id"}, RULE_OPTIONAL, -1, -1 }, |
| 435 | { { .avp_vendor = 10415, .avp_name = "Supported-Features"}, RULE_OPTIONAL, -1, -1 }, |
| 436 | { { .avp_vendor = 0, .avp_name = "Result-Code"}, RULE_OPTIONAL, -1, -1 }, |
| 437 | { { .avp_vendor = 0, .avp_name = "Experimental-Result"}, RULE_OPTIONAL, -1, -1 }, |
| 438 | { { .avp_vendor = 0, .avp_name = "Auth-Session-State"}, RULE_REQUIRED, -1, -1 }, |
| 439 | { { .avp_vendor = 0, .avp_name = "Origin-Host"}, RULE_REQUIRED, -1, -1 }, |
| 440 | { { .avp_vendor = 0, .avp_name = "Origin-Realm"}, RULE_REQUIRED, -1, -1 }, |
| 441 | { { .avp_vendor = 0, .avp_name = "Failed-AVP"}, RULE_OPTIONAL, -1, -1 }, |
| 442 | { { .avp_vendor = 0, .avp_name = "Proxy-Info"}, RULE_OPTIONAL, -1, -1 }, |
| 443 | { { .avp_vendor = 0, .avp_name = "Route-Record"}, RULE_OPTIONAL, -1, -1 } |
| 444 | }; |
| 445 | PARSE_loc_rules(rules, cmd); |
| 446 | } |
| 447 | /* Authentication-Information-Request */ |
| 448 | { |
| 449 | struct dict_object* cmd; |
| 450 | CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Authentication-Information-Request", &cmd) |
| 451 | struct local_rules_definition rules[] = |
| 452 | { |
| 453 | { { .avp_vendor = 0, .avp_name = "Session-Id"}, RULE_FIXED_HEAD, -1, -1 }, |
| 454 | { { .avp_vendor = 0, .avp_name = "DRMP"}, RULE_OPTIONAL, -1, -1 }, |
| 455 | { { .avp_vendor = 0, .avp_name = "Vendor-Specific-Application-Id"}, RULE_OPTIONAL, -1, -1 }, |
| 456 | { { .avp_vendor = 0, .avp_name = "Auth-Session-State"}, RULE_REQUIRED, -1, -1 }, |
| 457 | { { .avp_vendor = 0, .avp_name = "Origin-Host"}, RULE_REQUIRED, -1, -1 }, |
| 458 | { { .avp_vendor = 0, .avp_name = "Origin-Realm"}, RULE_REQUIRED, -1, -1 }, |
| 459 | { { .avp_vendor = 0, .avp_name = "Destination-Host"}, RULE_OPTIONAL, -1, -1 }, |
| 460 | { { .avp_vendor = 0, .avp_name = "Destination-Realm"}, RULE_REQUIRED, -1, -1 }, |
| 461 | { { .avp_vendor = 0, .avp_name = "User-Name"}, RULE_REQUIRED, -1, -1 }, |
| 462 | { { .avp_vendor = 0, .avp_name = "OC-Supported-Features"}, RULE_OPTIONAL, -1, -1 }, |
| 463 | { { .avp_vendor = 10415, .avp_name = "Supported-Features"}, RULE_OPTIONAL, -1, -1 }, |
| 464 | { { .avp_vendor = 10415, .avp_name = "Requested-EUTRAN-Authentication-Info"}, RULE_OPTIONAL, -1, -1 }, |
| 465 | { { .avp_vendor = 10415, .avp_name = "Requested-UTRAN-GERAN-Authentication-Info"}, RULE_OPTIONAL, -1, -1 }, |
| 466 | { { .avp_vendor = 10415, .avp_name = "Visited-PLMN-Id"}, RULE_REQUIRED, -1, -1 }, |
| 467 | { { .avp_vendor = 10415, .avp_name = "AIR-Flags"}, RULE_OPTIONAL, -1, -1 }, |
| 468 | { { .avp_vendor = 0, .avp_name = "Proxy-Info"}, RULE_OPTIONAL, -1, -1 }, |
| 469 | { { .avp_vendor = 0, .avp_name = "Route-Record"}, RULE_OPTIONAL, -1, -1 } |
| 470 | }; |
| 471 | PARSE_loc_rules(rules, cmd); |
| 472 | } |
| 473 | /* Authentication-Information-Answer */ |
| 474 | { |
| 475 | struct dict_object* cmd; |
| 476 | CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Authentication-Information-Answer", &cmd) |
| 477 | struct local_rules_definition rules[] = |
| 478 | { |
| 479 | { { .avp_vendor = 0, .avp_name = "Session-Id"}, RULE_FIXED_HEAD, -1, -1 }, |
| 480 | { { .avp_vendor = 0, .avp_name = "DRMP"}, RULE_OPTIONAL, -1, -1 }, |
| 481 | { { .avp_vendor = 0, .avp_name = "Vendor-Specific-Application-Id"}, RULE_OPTIONAL, -1, -1 }, |
| 482 | { { .avp_vendor = 0, .avp_name = "Result-Code"}, RULE_OPTIONAL, -1, -1 }, |
| 483 | { { .avp_vendor = 0, .avp_name = "Experimental-Result"}, RULE_OPTIONAL, -1, -1 }, |
| 484 | { { .avp_vendor = 10415, .avp_name = "Error-Diagnostic"}, RULE_OPTIONAL, -1, -1 }, |
| 485 | { { .avp_vendor = 0, .avp_name = "Auth-Session-State"}, RULE_REQUIRED, -1, -1 }, |
| 486 | { { .avp_vendor = 0, .avp_name = "Origin-Host"}, RULE_REQUIRED, -1, -1 }, |
| 487 | { { .avp_vendor = 0, .avp_name = "Origin-Realm"}, RULE_REQUIRED, -1, -1 }, |
| 488 | { { .avp_vendor = 0, .avp_name = "OC-Supported-Features"}, RULE_OPTIONAL, -1, -1 }, |
| 489 | { { .avp_vendor = 0, .avp_name = "OC-OLR"}, RULE_OPTIONAL, -1, -1 }, |
| 490 | { { .avp_vendor = 0, .avp_name = "Load"}, RULE_OPTIONAL, -1, -1 }, |
| 491 | { { .avp_vendor = 10415, .avp_name = "Supported-Features"}, RULE_OPTIONAL, -1, -1 }, |
| 492 | { { .avp_vendor = 10415, .avp_name = "Authentication-Info"}, RULE_OPTIONAL, -1, -1 }, |
| 493 | { { .avp_vendor = 10415, .avp_name = "UE-Usage-Type"}, RULE_OPTIONAL, -1, -1 }, |
| 494 | { { .avp_vendor = 0, .avp_name = "Failed-AVP"}, RULE_OPTIONAL, -1, -1 }, |
| 495 | { { .avp_vendor = 0, .avp_name = "Proxy-Info"}, RULE_OPTIONAL, -1, -1 }, |
| 496 | { { .avp_vendor = 0, .avp_name = "Route-Record"}, RULE_OPTIONAL, -1, -1 } |
| 497 | }; |
| 498 | PARSE_loc_rules(rules, cmd); |
| 499 | } |
| 500 | /* Insert-Subscriber-Data-Request */ |
| 501 | { |
| 502 | struct dict_object* cmd; |
| 503 | CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Insert-Subscriber-Data-Request", &cmd) |
| 504 | struct local_rules_definition rules[] = |
| 505 | { |
| 506 | { { .avp_vendor = 0, .avp_name = "Session-Id"}, RULE_FIXED_HEAD, -1, -1 }, |
| 507 | { { .avp_vendor = 0, .avp_name = "DRMP"}, RULE_OPTIONAL, -1, -1 }, |
| 508 | { { .avp_vendor = 0, .avp_name = "Vendor-Specific-Application-Id"}, RULE_OPTIONAL, -1, -1 }, |
| 509 | { { .avp_vendor = 0, .avp_name = "Auth-Session-State"}, RULE_REQUIRED, -1, -1 }, |
| 510 | { { .avp_vendor = 0, .avp_name = "Origin-Host"}, RULE_REQUIRED, -1, -1 }, |
| 511 | { { .avp_vendor = 0, .avp_name = "Origin-Realm"}, RULE_REQUIRED, -1, -1 }, |
| 512 | { { .avp_vendor = 0, .avp_name = "Destination-Host"}, RULE_REQUIRED, -1, -1 }, |
| 513 | { { .avp_vendor = 0, .avp_name = "Destination-Realm"}, RULE_REQUIRED, -1, -1 }, |
| 514 | { { .avp_vendor = 0, .avp_name = "User-Name"}, RULE_REQUIRED, -1, -1 }, |
| 515 | { { .avp_vendor = 10415, .avp_name = "Supported-Features"}, RULE_OPTIONAL, -1, -1 }, |
| 516 | { { .avp_vendor = 10415, .avp_name = "Subscription-Data"}, RULE_REQUIRED, -1, -1 }, |
| 517 | { { .avp_vendor = 10415, .avp_name = "IDR-Flags"}, RULE_OPTIONAL, -1, -1 }, |
| 518 | { { .avp_vendor = 10415, .avp_name = "Reset-ID"}, RULE_OPTIONAL, -1, -1 }, |
| 519 | { { .avp_vendor = 0, .avp_name = "Proxy-Info"}, RULE_OPTIONAL, -1, -1 }, |
| 520 | { { .avp_vendor = 0, .avp_name = "Route-Record"}, RULE_OPTIONAL, -1, -1 } |
| 521 | }; |
| 522 | PARSE_loc_rules(rules, cmd); |
| 523 | } |
| 524 | /* Insert-Subscriber-Data-Answer */ |
| 525 | { |
| 526 | struct dict_object* cmd; |
| 527 | CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Insert-Subscriber-Data-Answer", &cmd) |
| 528 | struct local_rules_definition rules[] = |
| 529 | { |
| 530 | { { .avp_vendor = 0, .avp_name = "Session-Id"}, RULE_FIXED_HEAD, -1, -1 }, |
| 531 | { { .avp_vendor = 0, .avp_name = "DRMP"}, RULE_OPTIONAL, -1, -1 }, |
| 532 | { { .avp_vendor = 0, .avp_name = "Vendor-Specific-Application-Id"}, RULE_OPTIONAL, -1, -1 }, |
| 533 | { { .avp_vendor = 10415, .avp_name = "Supported-Features"}, RULE_OPTIONAL, -1, -1 }, |
| 534 | { { .avp_vendor = 0, .avp_name = "Result-Code"}, RULE_OPTIONAL, -1, -1 }, |
| 535 | { { .avp_vendor = 0, .avp_name = "Experimental-Result"}, RULE_OPTIONAL, -1, -1 }, |
| 536 | { { .avp_vendor = 0, .avp_name = "Auth-Session-State"}, RULE_REQUIRED, -1, -1 }, |
| 537 | { { .avp_vendor = 0, .avp_name = "Origin-Host"}, RULE_REQUIRED, -1, -1 }, |
| 538 | { { .avp_vendor = 0, .avp_name = "Origin-Realm"}, RULE_REQUIRED, -1, -1 }, |
| 539 | { { .avp_vendor = 10415, .avp_name = "IMS-Voice-Over-PS-Sessions-Supported"}, RULE_OPTIONAL, -1, -1 }, |
| 540 | { { .avp_vendor = 10415, .avp_name = "Last-UE-Activity-Time"}, RULE_OPTIONAL, -1, -1 }, |
| 541 | { { .avp_vendor = 10415, .avp_name = "RAT-Type"}, RULE_OPTIONAL, -1, -1 }, |
| 542 | { { .avp_vendor = 10415, .avp_name = "IDA-Flags"}, RULE_OPTIONAL, -1, -1 }, |
| 543 | { { .avp_vendor = 10415, .avp_name = "EPS-User-State"}, RULE_OPTIONAL, -1, -1 }, |
| 544 | { { .avp_vendor = 10415, .avp_name = "EPS-Location-Information"}, RULE_OPTIONAL, -1, -1 }, |
| 545 | { { .avp_vendor = 10415, .avp_name = "Local-Time-Zone"}, RULE_OPTIONAL, -1, -1 }, |
| 546 | { { .avp_vendor = 10415, .avp_name = "Supported-Services"}, RULE_OPTIONAL, -1, -1 }, |
| 547 | { { .avp_vendor = 10415, .avp_name = "Monitoring-Event-Report"}, RULE_OPTIONAL, -1, -1 }, |
| 548 | { { .avp_vendor = 10415, .avp_name = "Monitoring-Event-Config-Status"}, RULE_OPTIONAL, -1, -1 }, |
| 549 | { { .avp_vendor = 0, .avp_name = "Failed-AVP"}, RULE_OPTIONAL, -1, -1 }, |
| 550 | { { .avp_vendor = 0, .avp_name = "Proxy-Info"}, RULE_OPTIONAL, -1, -1 }, |
| 551 | { { .avp_vendor = 0, .avp_name = "Route-Record"}, RULE_OPTIONAL, -1, -1 } |
| 552 | }; |
| 553 | PARSE_loc_rules(rules, cmd); |
| 554 | } |
| 555 | /* Delete-Subscriber-Data-Request */ |
| 556 | { |
| 557 | struct dict_object* cmd; |
| 558 | CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Delete-Subscriber-Data-Request", &cmd) |
| 559 | struct local_rules_definition rules[] = |
| 560 | { |
| 561 | { { .avp_vendor = 0, .avp_name = "Session-Id"}, RULE_FIXED_HEAD, -1, -1 }, |
| 562 | { { .avp_vendor = 0, .avp_name = "DRMP"}, RULE_OPTIONAL, -1, -1 }, |
| 563 | { { .avp_vendor = 0, .avp_name = "Vendor-Specific-Application-Id"}, RULE_OPTIONAL, -1, -1 }, |
| 564 | { { .avp_vendor = 0, .avp_name = "Auth-Session-State"}, RULE_REQUIRED, -1, -1 }, |
| 565 | { { .avp_vendor = 0, .avp_name = "Origin-Host"}, RULE_REQUIRED, -1, -1 }, |
| 566 | { { .avp_vendor = 0, .avp_name = "Origin-Realm"}, RULE_REQUIRED, -1, -1 }, |
| 567 | { { .avp_vendor = 0, .avp_name = "Destination-Host"}, RULE_REQUIRED, -1, -1 }, |
| 568 | { { .avp_vendor = 0, .avp_name = "Destination-Realm"}, RULE_REQUIRED, -1, -1 }, |
| 569 | { { .avp_vendor = 0, .avp_name = "User-Name"}, RULE_REQUIRED, -1, -1 }, |
| 570 | { { .avp_vendor = 10415, .avp_name = "Supported-Features"}, RULE_OPTIONAL, -1, -1 }, |
| 571 | { { .avp_vendor = 10415, .avp_name = "DSR-Flags"}, RULE_REQUIRED, -1, -1 }, |
| 572 | { { .avp_vendor = 10415, .avp_name = "SCEF-ID"}, RULE_OPTIONAL, -1, -1 }, |
| 573 | { { .avp_vendor = 10415, .avp_name = "Context-Identifier"}, RULE_OPTIONAL, -1, -1 }, |
| 574 | { { .avp_vendor = 10415, .avp_name = "Trace-Reference"}, RULE_OPTIONAL, -1, -1 }, |
| 575 | { { .avp_vendor = 10415, .avp_name = "TS-Code"}, RULE_OPTIONAL, -1, -1 }, |
| 576 | { { .avp_vendor = 10415, .avp_name = "SS-Code"}, RULE_OPTIONAL, -1, -1 }, |
| 577 | { { .avp_vendor = 0, .avp_name = "Proxy-Info"}, RULE_OPTIONAL, -1, -1 }, |
| 578 | { { .avp_vendor = 0, .avp_name = "Route-Record"}, RULE_OPTIONAL, -1, -1 } |
| 579 | }; |
| 580 | PARSE_loc_rules(rules, cmd); |
| 581 | } |
| 582 | /* Delete-Subscriber-Data-Answer */ |
| 583 | { |
| 584 | struct dict_object* cmd; |
| 585 | CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Delete-Subscriber-Data-Answer", &cmd) |
| 586 | struct local_rules_definition rules[] = |
| 587 | { |
| 588 | { { .avp_vendor = 0, .avp_name = "Session-Id"}, RULE_FIXED_HEAD, -1, -1 }, |
| 589 | { { .avp_vendor = 0, .avp_name = "DRMP"}, RULE_OPTIONAL, -1, -1 }, |
| 590 | { { .avp_vendor = 0, .avp_name = "Vendor-Specific-Application-Id"}, RULE_OPTIONAL, -1, -1 }, |
| 591 | { { .avp_vendor = 10415, .avp_name = "Supported-Features"}, RULE_OPTIONAL, -1, -1 }, |
| 592 | { { .avp_vendor = 0, .avp_name = "Result-Code"}, RULE_OPTIONAL, -1, -1 }, |
| 593 | { { .avp_vendor = 0, .avp_name = "Experimental-Result"}, RULE_OPTIONAL, -1, -1 }, |
| 594 | { { .avp_vendor = 0, .avp_name = "Auth-Session-State"}, RULE_REQUIRED, -1, -1 }, |
| 595 | { { .avp_vendor = 0, .avp_name = "Origin-Host"}, RULE_REQUIRED, -1, -1 }, |
| 596 | { { .avp_vendor = 0, .avp_name = "Origin-Realm"}, RULE_REQUIRED, -1, -1 }, |
| 597 | { { .avp_vendor = 10415, .avp_name = "DSA-Flags"}, RULE_OPTIONAL, -1, -1 }, |
| 598 | { { .avp_vendor = 0, .avp_name = "Failed-AVP"}, RULE_OPTIONAL, -1, -1 }, |
| 599 | { { .avp_vendor = 0, .avp_name = "Proxy-Info"}, RULE_OPTIONAL, -1, -1 }, |
| 600 | { { .avp_vendor = 0, .avp_name = "Route-Record"}, RULE_OPTIONAL, -1, -1 } |
| 601 | }; |
| 602 | PARSE_loc_rules(rules, cmd); |
| 603 | } |
| 604 | /* Purge-UE-Request */ |
| 605 | { |
| 606 | struct dict_object* cmd; |
| 607 | CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Purge-UE-Request", &cmd) |
| 608 | struct local_rules_definition rules[] = |
| 609 | { |
| 610 | { { .avp_vendor = 0, .avp_name = "Session-Id"}, RULE_FIXED_HEAD, -1, -1 }, |
| 611 | { { .avp_vendor = 0, .avp_name = "DRMP"}, RULE_OPTIONAL, -1, -1 }, |
| 612 | { { .avp_vendor = 0, .avp_name = "Vendor-Specific-Application-Id"}, RULE_OPTIONAL, -1, -1 }, |
| 613 | { { .avp_vendor = 0, .avp_name = "Auth-Session-State"}, RULE_REQUIRED, -1, -1 }, |
| 614 | { { .avp_vendor = 0, .avp_name = "Origin-Host"}, RULE_REQUIRED, -1, -1 }, |
| 615 | { { .avp_vendor = 0, .avp_name = "Origin-Realm"}, RULE_REQUIRED, -1, -1 }, |
| 616 | { { .avp_vendor = 0, .avp_name = "Destination-Host"}, RULE_OPTIONAL, -1, -1 }, |
| 617 | { { .avp_vendor = 0, .avp_name = "Destination-Realm"}, RULE_REQUIRED, -1, -1 }, |
| 618 | { { .avp_vendor = 0, .avp_name = "User-Name"}, RULE_REQUIRED, -1, -1 }, |
| 619 | { { .avp_vendor = 0, .avp_name = "OC-Supported-Features"}, RULE_OPTIONAL, -1, -1 }, |
| 620 | { { .avp_vendor = 10415, .avp_name = "PUR-Flags"}, RULE_OPTIONAL, -1, -1 }, |
| 621 | { { .avp_vendor = 10415, .avp_name = "Supported-Features"}, RULE_OPTIONAL, -1, -1 }, |
| 622 | { { .avp_vendor = 10415, .avp_name = "EPS-Location-Information"}, RULE_OPTIONAL, -1, -1 }, |
| 623 | { { .avp_vendor = 0, .avp_name = "Proxy-Info"}, RULE_OPTIONAL, -1, -1 }, |
| 624 | { { .avp_vendor = 0, .avp_name = "Route-Record"}, RULE_OPTIONAL, -1, -1 } |
| 625 | }; |
| 626 | PARSE_loc_rules(rules, cmd); |
| 627 | } |
| 628 | /* Purge-UE-Answer */ |
| 629 | { |
| 630 | struct dict_object* cmd; |
| 631 | CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Purge-UE-Answer", &cmd) |
| 632 | struct local_rules_definition rules[] = |
| 633 | { |
| 634 | { { .avp_vendor = 0, .avp_name = "Session-Id"}, RULE_FIXED_HEAD, -1, -1 }, |
| 635 | { { .avp_vendor = 0, .avp_name = "DRMP"}, RULE_OPTIONAL, -1, -1 }, |
| 636 | { { .avp_vendor = 0, .avp_name = "Vendor-Specific-Application-Id"}, RULE_OPTIONAL, -1, -1 }, |
| 637 | { { .avp_vendor = 10415, .avp_name = "Supported-Features"}, RULE_OPTIONAL, -1, -1 }, |
| 638 | { { .avp_vendor = 0, .avp_name = "Result-Code"}, RULE_OPTIONAL, -1, -1 }, |
| 639 | { { .avp_vendor = 0, .avp_name = "Experimental-Result"}, RULE_OPTIONAL, -1, -1 }, |
| 640 | { { .avp_vendor = 0, .avp_name = "Auth-Session-State"}, RULE_REQUIRED, -1, -1 }, |
| 641 | { { .avp_vendor = 0, .avp_name = "Origin-Host"}, RULE_REQUIRED, -1, -1 }, |
| 642 | { { .avp_vendor = 0, .avp_name = "Origin-Realm"}, RULE_REQUIRED, -1, -1 }, |
| 643 | { { .avp_vendor = 0, .avp_name = "OC-Supported-Features"}, RULE_OPTIONAL, -1, -1 }, |
| 644 | { { .avp_vendor = 0, .avp_name = "OC-OLR"}, RULE_OPTIONAL, -1, -1 }, |
| 645 | { { .avp_vendor = 0, .avp_name = "Load"}, RULE_OPTIONAL, -1, -1 }, |
| 646 | { { .avp_vendor = 10415, .avp_name = "PUA-Flags"}, RULE_OPTIONAL, -1, -1 }, |
| 647 | { { .avp_vendor = 0, .avp_name = "Failed-AVP"}, RULE_OPTIONAL, -1, -1 }, |
| 648 | { { .avp_vendor = 0, .avp_name = "Proxy-Info"}, RULE_OPTIONAL, -1, -1 }, |
| 649 | { { .avp_vendor = 0, .avp_name = "Route-Record"}, RULE_OPTIONAL, -1, -1 } |
| 650 | }; |
| 651 | PARSE_loc_rules(rules, cmd); |
| 652 | } |
| 653 | /* Reset-Request */ |
| 654 | { |
| 655 | struct dict_object* cmd; |
| 656 | CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Reset-Request", &cmd) |
| 657 | struct local_rules_definition rules[] = |
| 658 | { |
| 659 | { { .avp_vendor = 0, .avp_name = "Session-Id"}, RULE_FIXED_HEAD, -1, -1 }, |
| 660 | { { .avp_vendor = 0, .avp_name = "DRMP"}, RULE_OPTIONAL, -1, -1 }, |
| 661 | { { .avp_vendor = 0, .avp_name = "Vendor-Specific-Application-Id"}, RULE_OPTIONAL, -1, -1 }, |
| 662 | { { .avp_vendor = 0, .avp_name = "Auth-Session-State"}, RULE_REQUIRED, -1, -1 }, |
| 663 | { { .avp_vendor = 0, .avp_name = "Origin-Host"}, RULE_REQUIRED, -1, -1 }, |
| 664 | { { .avp_vendor = 0, .avp_name = "Origin-Realm"}, RULE_REQUIRED, -1, -1 }, |
| 665 | { { .avp_vendor = 0, .avp_name = "Destination-Host"}, RULE_REQUIRED, -1, -1 }, |
| 666 | { { .avp_vendor = 0, .avp_name = "Destination-Realm"}, RULE_REQUIRED, -1, -1 }, |
| 667 | { { .avp_vendor = 10415, .avp_name = "Supported-Features"}, RULE_OPTIONAL, -1, -1 }, |
| 668 | { { .avp_vendor = 10415, .avp_name = "User-Id"}, RULE_OPTIONAL, -1, -1 }, |
| 669 | { { .avp_vendor = 10415, .avp_name = "Reset-ID"}, RULE_OPTIONAL, -1, -1 }, |
| 670 | { { .avp_vendor = 10415, .avp_name = "Subscription-Data"}, RULE_OPTIONAL, -1, -1 }, |
| 671 | { { .avp_vendor = 10415, .avp_name = "Subscription-Data-Deletion"}, RULE_OPTIONAL, -1, -1 }, |
| 672 | { { .avp_vendor = 0, .avp_name = "Proxy-Info"}, RULE_OPTIONAL, -1, -1 }, |
| 673 | { { .avp_vendor = 0, .avp_name = "Route-Record"}, RULE_OPTIONAL, -1, -1 } |
| 674 | }; |
| 675 | PARSE_loc_rules(rules, cmd); |
| 676 | } |
| 677 | /* Reset-Answer */ |
| 678 | { |
| 679 | struct dict_object* cmd; |
| 680 | CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Reset-Answer", &cmd) |
| 681 | struct local_rules_definition rules[] = |
| 682 | { |
| 683 | { { .avp_vendor = 0, .avp_name = "Session-Id"}, RULE_FIXED_HEAD, -1, -1 }, |
| 684 | { { .avp_vendor = 0, .avp_name = "DRMP"}, RULE_OPTIONAL, -1, -1 }, |
| 685 | { { .avp_vendor = 0, .avp_name = "Vendor-Specific-Application-Id"}, RULE_OPTIONAL, -1, -1 }, |
| 686 | { { .avp_vendor = 10415, .avp_name = "Supported-Features"}, RULE_OPTIONAL, -1, -1 }, |
| 687 | { { .avp_vendor = 0, .avp_name = "Result-Code"}, RULE_OPTIONAL, -1, -1 }, |
| 688 | { { .avp_vendor = 0, .avp_name = "Experimental-Result"}, RULE_OPTIONAL, -1, -1 }, |
| 689 | { { .avp_vendor = 0, .avp_name = "Auth-Session-State"}, RULE_REQUIRED, -1, -1 }, |
| 690 | { { .avp_vendor = 0, .avp_name = "Origin-Host"}, RULE_REQUIRED, -1, -1 }, |
| 691 | { { .avp_vendor = 0, .avp_name = "Origin-Realm"}, RULE_REQUIRED, -1, -1 }, |
| 692 | { { .avp_vendor = 0, .avp_name = "Failed-AVP"}, RULE_OPTIONAL, -1, -1 }, |
| 693 | { { .avp_vendor = 0, .avp_name = "Proxy-Info"}, RULE_OPTIONAL, -1, -1 }, |
| 694 | { { .avp_vendor = 0, .avp_name = "Route-Record"}, RULE_OPTIONAL, -1, -1 } |
| 695 | }; |
| 696 | PARSE_loc_rules(rules, cmd); |
| 697 | } |
| 698 | |
| 699 | } |
| 700 | |
| 701 | LOG_D( "Extension 'Dictionary definitions for S6as6d (e30)' initialized"); |
| 702 | return 0; |
| 703 | } |
| 704 | |
| 705 | int dict_entry(char * conffile) |
| 706 | { |
| 707 | dict_s6as6d_load_defs(conffile); |
| 708 | return dict_s6as6d_load_rules(conffile); |
| 709 | } |
| 710 | |
| 711 | const char* dict_s6as6d_proto_ver(char * conffile) { |
| 712 | return s6as6d_proto_ver; |
| 713 | } |
| 714 | |
| 715 | const double dict_s6as6d_gen_ts(char * conffile) { |
| 716 | return s6as6d_gen_date; |
| 717 | } |
| 718 | |
| 719 | EXTENSION_ENTRY2("dict_s6as6d", dict_s6as6d_load_defs, dict_s6as6d_load_rules, "dict_ts29272_avps", "dict_ts32299_avps", "dict_ts29273_avps", "dict_ts29336_avps", "dict_ts29212_avps", "dict_ts29214_avps", "dict_ts29344_avps", "dict_ts29338_avps", "dict_ts29217_avps", "dict_ts29173_avps", "dict_ts29329_avps", "dict_ts29229_avps", "dict_rfc5778_avps", "dict_ts29061_avps", "dict_rfc5447_avps", "dict_draftload_avps", "dict_rfc7683_avps", "dict_rfc4004_avps", "dict_rfc5777_avps", "dict_rfc7944_avps"); |
| 720 | |
| 721 | |
| 722 | |