Scope:
Copyright (C) 2005 FhG Fokus
Definition in file e2_avp.c.
#include "e2_avp.h"
#include "../../mem/shm_mem.h"
#include <stdio.h>
Go to the source code of this file.
Functions | |
| static int | e2_add_avp (AAAMessage *m, char *d, int len, int avp_code, int flags, int vendorid, int data_do, const char *func) |
| Create and add an AVP to a Diameter message. | |
| static int | e2_add_avp_list (AAA_AVP_LIST *list, char *d, int len, int avp_code, int flags, int vendorid, int data_do, const char *func) |
| Create and add an AVP to a list of AVPs. | |
| static str | e2_get_avp (AAAMessage *msg, int avp_code, int vendor_id, const char *func) |
| Returns the value of a certain AVP from a Diameter message. | |
| int | e2_add_user_name (AAAMessage *msg, str data) |
| NO DATA WILL BE DUPLICATED OR FREED - DO THAT AFTER SENDING THE MESSAGE!!! | |
| int | e2_add_public_identity (AAAMessage *msg, str data) |
| Creates and adds a Public Identity AVP. | |
| int | e2_add_authorization_type (AAAMessage *msg, unsigned int data) |
| Creates and adds a Authorization-Type AVP. | |
| int | e2_add_server_name (AAAMessage *msg, str data) |
| Creates and adds a Server-Name AVP. | |
| int | e2_add_result_code (AAAMessage *msg, unsigned int data) |
| Creates and adds a Result-Code AVP. | |
| int | e2_add_experimental_result_code (AAAMessage *msg, unsigned int data) |
| Creates and adds a Experimental-Result-Code AVP. | |
| int | e2_add_vendor_specific_appid (AAAMessage *msg, unsigned int vendor_id, unsigned int auth_id, unsigned int acct_id) |
| Creates and adds a Vendor-Specifig-Application-ID AVP. | |
| int | e2_add_auth_session_state (AAAMessage *msg, unsigned int data) |
| Creates and adds a Auth-Session-State AVP. | |
| int | e2_add_destination_realm (AAAMessage *msg, str data) |
| Creates and adds a Destination-Realm AVP. | |
| int | e2_add_g_unique_address (AAAMessage *msg, str ip, str realm) |
| Creates and adds a AVP_Framed_IP_Address and a AVP_ETSI_Address_Realm to a AVP_ETSI_Globally_Unique_Address group. | |
| int | e2_add_app_identifier (AAAMessage *msg, str data) |
| Creates and adds AVP_IMS_AF_Application_Identifier. | |
| str | e2_get_session_id (AAAMessage *msg) |
| Returns the Session-Id AVP of a Diameter message. | |
| str | e2_get_user_name (AAAMessage *msg) |
| Returns the User-Name AVP from a Diameter message. | |
| str | e2_get_terminal_type (AAAMessage *msg) |
| int | e2_get_access_net (AAAMessage *msg, int *data) |
| int | e2_get_location_info (AAAMessage *msg, str *data) |
Variables | |
| cdp_binds | cdpb |
| Structure with pointers to cdp funcs. | |
| static int e2_add_avp | ( | AAAMessage * | m, | |
| char * | d, | |||
| int | len, | |||
| int | avp_code, | |||
| int | flags, | |||
| int | vendorid, | |||
| int | data_do, | |||
| const char * | func | |||
| ) | [inline, static] |
Create and add an AVP to a Diameter message.
| m | - Diameter message to add to | |
| d | - the payload data | |
| len | - length of the payload data | |
| avp_code | - the code of the AVP | |
| flags | - flags for the AVP | |
| vendorid | - the value of the vendor id or 0 if none | |
| data_do | - what to do with the data when done | |
| func | - the name of the calling function, for debugging purposes |
Definition at line 79 of file e2_avp.c.
References AAA_AVP_FLAG_VENDOR_SPECIFIC, AAA_ERR_SUCCESS, cdp_binds::AAAAddAVPToMessage, cdp_binds::AAACreateAVP, cdp_binds::AAAFreeAVP, _message_t::avpList, cdpb, M_NAME, and _avp_list_t::tail.
Referenced by e2_add_app_identifier(), e2_add_auth_session_state(), e2_add_authorization_type(), e2_add_destination_realm(), e2_add_experimental_result_code(), e2_add_public_identity(), e2_add_result_code(), e2_add_server_name(), e2_add_user_name(), and e2_add_vendor_specific_appid().
00081 { 00082 AAA_AVP *avp; 00083 if (vendorid!=0) flags |= AAA_AVP_FLAG_VENDOR_SPECIFIC; 00084 avp = cdpb.AAACreateAVP(avp_code,flags,vendorid,d,len,data_do); 00085 if (!avp) { 00086 LOG(L_ERR,"ERR:"M_NAME":%s: Failed creating avp\n",func); 00087 return 0; 00088 } 00089 if (cdpb.AAAAddAVPToMessage(m,avp,m->avpList.tail)!=AAA_ERR_SUCCESS) { 00090 LOG(L_ERR,"ERR:"M_NAME":%s: Failed adding avp to message\n",func); 00091 cdpb.AAAFreeAVP(&avp); 00092 return 0; 00093 } 00094 return 1; 00095 }
| static int e2_add_avp_list | ( | AAA_AVP_LIST * | list, | |
| char * | d, | |||
| int | len, | |||
| int | avp_code, | |||
| int | flags, | |||
| int | vendorid, | |||
| int | data_do, | |||
| const char * | func | |||
| ) | [inline, static] |
Create and add an AVP to a list of AVPs.
| list | - the AVP list to add to | |
| d | - the payload data | |
| len | - length of the payload data | |
| avp_code | - the code of the AVP | |
| flags | - flags for the AVP | |
| vendorid | - the value of the vendor id or 0 if none | |
| data_do | - what to do with the data when done | |
| func | - the name of the calling function, for debugging purposes |
Definition at line 109 of file e2_avp.c.
References AAA_AVP_FLAG_VENDOR_SPECIFIC, cdp_binds::AAACreateAVP, cdpb, _avp_list_t::head, M_NAME, avp::next, avp::prev, and _avp_list_t::tail.
Referenced by e2_add_experimental_result_code(), e2_add_g_unique_address(), and e2_add_vendor_specific_appid().
00111 { 00112 AAA_AVP *avp; 00113 if (vendorid!=0) flags |= AAA_AVP_FLAG_VENDOR_SPECIFIC; 00114 avp = cdpb.AAACreateAVP(avp_code,flags,vendorid,d,len,data_do); 00115 if (!avp) { 00116 LOG(L_ERR,"ERR:"M_NAME":%s: Failed creating avp\n",func); 00117 return 0; 00118 } 00119 if (list->tail) { 00120 avp->prev=list->tail; 00121 avp->next=0; 00122 list->tail->next = avp; 00123 list->tail=avp; 00124 } else { 00125 list->head = avp; 00126 list->tail = avp; 00127 avp->next=0; 00128 avp->prev=0; 00129 } 00130 00131 return 1; 00132 }
| static str e2_get_avp | ( | AAAMessage * | msg, | |
| int | avp_code, | |||
| int | vendor_id, | |||
| const char * | func | |||
| ) | [inline, static] |
Returns the value of a certain AVP from a Diameter message.
| m | - Diameter message to look into | |
| avp_code | - the code to search for | |
| vendorid | - the value of the vendor id to look for or 0 if none | |
| func | - the name of the calling function, for debugging purposes |
Definition at line 142 of file e2_avp.c.
References cdp_binds::AAAFindMatchingAVP, cdpb, avp::data, and M_NAME.
Referenced by e2_get_access_net(), e2_get_location_info(), e2_get_session_id(), e2_get_terminal_type(), and e2_get_user_name().
00144 { 00145 AAA_AVP *avp; 00146 str r={0,0}; 00147 00148 avp = cdpb.AAAFindMatchingAVP(msg,0,avp_code,vendor_id,0); 00149 if (avp==0){ 00150 LOG(L_INFO,"INFO:"M_NAME":%s: Failed finding avp\n",func); 00151 return r; 00152 } 00153 else 00154 return avp->data; 00155 }
| int e2_add_user_name | ( | AAAMessage * | msg, | |
| str | data | |||
| ) | [inline] |
NO DATA WILL BE DUPLICATED OR FREED - DO THAT AFTER SENDING THE MESSAGE!!!
| msg | - the Diameter message to add to. | |
| data | - the value for the AVP payload |
Definition at line 166 of file e2_avp.c.
References AAA_AVP_FLAG_MANDATORY, AVP_DUPLICATE_DATA, AVP_User_Name, and e2_add_avp().
Referenced by e2_UDR().
00167 { 00168 return 00169 e2_add_avp(msg,data.s,data.len, 00170 AVP_User_Name, 00171 AAA_AVP_FLAG_MANDATORY, 00172 0, 00173 AVP_DUPLICATE_DATA, 00174 __FUNCTION__); 00175 }
| int e2_add_public_identity | ( | AAAMessage * | msg, | |
| str | data | |||
| ) | [inline] |
Creates and adds a Public Identity AVP.
| msg | - the Diameter message to add to. | |
| data | - the value for the AVP payload |
Definition at line 183 of file e2_avp.c.
References AAA_AVP_FLAG_MANDATORY, AAA_AVP_FLAG_VENDOR_SPECIFIC, AVP_DUPLICATE_DATA, AVP_IMS_Public_Identity, e2_add_avp(), and IMS_vendor_id_3GPP.
00184 { 00185 return 00186 e2_add_avp(msg,data.s,data.len, 00187 AVP_IMS_Public_Identity, 00188 AAA_AVP_FLAG_MANDATORY|AAA_AVP_FLAG_VENDOR_SPECIFIC, 00189 IMS_vendor_id_3GPP, 00190 AVP_DUPLICATE_DATA, 00191 __FUNCTION__); 00192 }
| int e2_add_authorization_type | ( | AAAMessage * | msg, | |
| unsigned int | data | |||
| ) | [inline] |
Creates and adds a Authorization-Type AVP.
| msg | - the Diameter message to add to. | |
| data | - the value for the AVP payload |
Definition at line 201 of file e2_avp.c.
References AAA_AVP_FLAG_MANDATORY, AAA_AVP_FLAG_VENDOR_SPECIFIC, AVP_DUPLICATE_DATA, AVP_IMS_User_Authorization_Type, e2_add_avp(), IMS_vendor_id_3GPP, and set_4bytes.
00202 { 00203 char x[4]; 00204 set_4bytes(x,data); 00205 return 00206 e2_add_avp(msg,x,4, 00207 AVP_IMS_User_Authorization_Type, 00208 AAA_AVP_FLAG_MANDATORY|AAA_AVP_FLAG_VENDOR_SPECIFIC, 00209 IMS_vendor_id_3GPP, 00210 AVP_DUPLICATE_DATA, 00211 __FUNCTION__); 00212 }
| int e2_add_server_name | ( | AAAMessage * | msg, | |
| str | data | |||
| ) | [inline] |
Creates and adds a Server-Name AVP.
| msg | - the Diameter message to add to. | |
| data | - the value for the AVP payload |
Definition at line 221 of file e2_avp.c.
References AAA_AVP_FLAG_MANDATORY, AAA_AVP_FLAG_VENDOR_SPECIFIC, AVP_DUPLICATE_DATA, AVP_IMS_Server_Name, e2_add_avp(), and IMS_vendor_id_3GPP.
00222 { 00223 return 00224 e2_add_avp(msg,data.s,data.len, 00225 AVP_IMS_Server_Name, 00226 AAA_AVP_FLAG_MANDATORY|AAA_AVP_FLAG_VENDOR_SPECIFIC, 00227 IMS_vendor_id_3GPP, 00228 AVP_DUPLICATE_DATA, 00229 __FUNCTION__); 00230 }
| int e2_add_result_code | ( | AAAMessage * | msg, | |
| unsigned int | data | |||
| ) | [inline] |
Creates and adds a Result-Code AVP.
| msg | - the Diameter message to add to. | |
| data | - the value for the AVP payload |
Definition at line 238 of file e2_avp.c.
References AAA_AVP_FLAG_MANDATORY, AVP_DUPLICATE_DATA, AVP_Result_Code, e2_add_avp(), and set_4bytes.
00239 { 00240 char x[4]; 00241 set_4bytes(x,data); 00242 return 00243 e2_add_avp(msg,x,4, 00244 AVP_Result_Code, 00245 AAA_AVP_FLAG_MANDATORY, 00246 0, 00247 AVP_DUPLICATE_DATA, 00248 __FUNCTION__); 00249 }
| int e2_add_experimental_result_code | ( | AAAMessage * | msg, | |
| unsigned int | data | |||
| ) | [inline] |
Creates and adds a Experimental-Result-Code AVP.
| msg | - the Diameter message to add to. | |
| data | - the value for the AVP payload |
Definition at line 257 of file e2_avp.c.
References AAA_AVP_FLAG_MANDATORY, cdp_binds::AAAFreeAVPList, cdp_binds::AAAGroupAVPS, AVP_DUPLICATE_DATA, AVP_FREE_DATA, AVP_IMS_Experimental_Result, AVP_IMS_Experimental_Result_Code, AVP_IMS_Vendor_Id, cdpb, e2_add_avp(), e2_add_avp_list(), _avp_list_t::head, IMS_vendor_id_3GPP, set_4bytes, and _avp_list_t::tail.
00258 { 00259 AAA_AVP_LIST list; 00260 str group; 00261 char x[4]; 00262 list.head=0;list.tail=0; 00263 00264 set_4bytes(x,data); 00265 e2_add_avp_list(&list, 00266 x,4, 00267 AVP_IMS_Experimental_Result_Code, 00268 AAA_AVP_FLAG_MANDATORY, 00269 0, 00270 AVP_DUPLICATE_DATA, 00271 __FUNCTION__); 00272 00273 set_4bytes(x,IMS_vendor_id_3GPP); 00274 e2_add_avp_list(&list, 00275 x,4, 00276 AVP_IMS_Vendor_Id, 00277 AAA_AVP_FLAG_MANDATORY, 00278 0, 00279 AVP_DUPLICATE_DATA, 00280 __FUNCTION__); 00281 00282 00283 group = cdpb.AAAGroupAVPS(list); 00284 00285 cdpb.AAAFreeAVPList(&list); 00286 00287 return 00288 e2_add_avp(msg,group.s,group.len, 00289 AVP_IMS_Experimental_Result, 00290 AAA_AVP_FLAG_MANDATORY, 00291 0, 00292 AVP_FREE_DATA, 00293 __FUNCTION__); 00294 }
| int e2_add_vendor_specific_appid | ( | AAAMessage * | msg, | |
| unsigned int | vendor_id, | |||
| unsigned int | auth_id, | |||
| unsigned int | acct_id | |||
| ) | [inline] |
Creates and adds a Vendor-Specifig-Application-ID AVP.
| msg | - the Diameter message to add to. | |
| vendor_id | - the value of the vendor_id, | |
| auth_id | - the authorization application id | |
| acct_id | - the accounting application id |
Definition at line 304 of file e2_avp.c.
References AAA_AVP_FLAG_MANDATORY, cdp_binds::AAAFreeAVPList, cdp_binds::AAAGroupAVPS, AVP_Acct_Application_Id, AVP_Auth_Application_Id, AVP_DUPLICATE_DATA, AVP_FREE_DATA, AVP_Vendor_Id, AVP_Vendor_Specific_Application_Id, cdpb, e2_add_avp(), e2_add_avp_list(), _avp_list_t::head, set_4bytes, and _avp_list_t::tail.
Referenced by e2_UDR().
00306 { 00307 AAA_AVP_LIST list; 00308 str group; 00309 char x[4]; 00310 00311 list.head=0;list.tail=0; 00312 00313 set_4bytes(x,vendor_id); 00314 e2_add_avp_list(&list, 00315 x,4, 00316 AVP_Vendor_Id, 00317 AAA_AVP_FLAG_MANDATORY, 00318 0, 00319 AVP_DUPLICATE_DATA, 00320 __FUNCTION__); 00321 00322 if (auth_id) { 00323 set_4bytes(x,auth_id); 00324 e2_add_avp_list(&list, 00325 x,4, 00326 AVP_Auth_Application_Id, 00327 AAA_AVP_FLAG_MANDATORY, 00328 0, 00329 AVP_DUPLICATE_DATA, 00330 __FUNCTION__); 00331 } 00332 if (acct_id) { 00333 set_4bytes(x,acct_id); 00334 e2_add_avp_list(&list, 00335 x,4, 00336 AVP_Acct_Application_Id, 00337 AAA_AVP_FLAG_MANDATORY, 00338 0, 00339 AVP_DUPLICATE_DATA, 00340 __FUNCTION__); 00341 } 00342 00343 group = cdpb.AAAGroupAVPS(list); 00344 00345 cdpb.AAAFreeAVPList(&list); 00346 00347 return 00348 e2_add_avp(msg,group.s,group.len, 00349 AVP_Vendor_Specific_Application_Id, 00350 AAA_AVP_FLAG_MANDATORY, 00351 0, 00352 AVP_FREE_DATA, 00353 __FUNCTION__); 00354 }
| int e2_add_auth_session_state | ( | AAAMessage * | msg, | |
| unsigned int | data | |||
| ) | [inline] |
Creates and adds a Auth-Session-State AVP.
| msg | - the Diameter message to add to. | |
| data | - the value for the AVP payload |
Definition at line 363 of file e2_avp.c.
References AAA_AVP_FLAG_MANDATORY, AVP_Auth_Session_State, AVP_DUPLICATE_DATA, e2_add_avp(), and set_4bytes.
Referenced by e2_UDR().
00364 { 00365 char x[4]; 00366 set_4bytes(x,data); 00367 return 00368 e2_add_avp(msg,x,4, 00369 AVP_Auth_Session_State, 00370 AAA_AVP_FLAG_MANDATORY, 00371 0, 00372 AVP_DUPLICATE_DATA, 00373 __FUNCTION__); 00374 }
| int e2_add_destination_realm | ( | AAAMessage * | msg, | |
| str | data | |||
| ) | [inline] |
Creates and adds a Destination-Realm AVP.
| msg | - the Diameter message to add to. | |
| data | - the value for the AVP payload |
Definition at line 382 of file e2_avp.c.
References AAA_AVP_FLAG_MANDATORY, AVP_Destination_Realm, AVP_DUPLICATE_DATA, and e2_add_avp().
Referenced by e2_UDR().
00383 { 00384 return 00385 e2_add_avp(msg,data.s,data.len, 00386 AVP_Destination_Realm, 00387 AAA_AVP_FLAG_MANDATORY, 00388 0, 00389 AVP_DUPLICATE_DATA, 00390 __FUNCTION__); 00391 }
| int e2_add_g_unique_address | ( | AAAMessage * | msg, | |
| str | ip, | |||
| str | realm | |||
| ) | [inline] |
Creates and adds a AVP_Framed_IP_Address and a AVP_ETSI_Address_Realm to a AVP_ETSI_Globally_Unique_Address group.
| msg | - the Diameter message to add to. | |
| ip | - ue ip address | |
| realm | - realm |
Definition at line 400 of file e2_avp.c.
References AVP_DUPLICATE_DATA, AVP_Framed_IP_Address, e2_add_avp_list(), _avp_list_t::head, and _avp_list_t::tail.
Referenced by e2_UDR().
00401 { 00402 AAA_AVP_LIST list; 00403 str group; 00404 char x[6]; 00405 int i,j,k; 00406 list.head=0;list.tail=0; 00407 00408 if (ip.len>0){ 00409 memset(x,0,4); 00410 x[1]=1; 00411 i=2;k=0; 00412 for(j=0;j<ip.len;j++){ 00413 if (ip.s[j]=='.') {x[i++]=k;k=0;} 00414 else if (ip.s[j]>='0' && ip.s[j]<='9') 00415 k = k*10 + ip.s[j]-'0'; 00416 } 00417 x[i]=k; 00418 00419 e2_add_avp_list(&list, 00420 x,6, 00421 AVP_Framed_IP_Address, 00422 0, 00423 0, 00424 AVP_DUPLICATE_DATA, 00425 __FUNCTION__); 00426 } 00427 00428 if (realm.len) 00429 { 00430 e2_add_avp_list(&list, 00431 realm.s,realm.len, 00432 AVP_ETSI_Address_Realm, 00433 AAA_AVP_FLAG_MANDATORY|AAA_AVP_FLAG_VENDOR_SPECIFIC, 00434 IMS_vendor_id_ETSI, 00435 AVP_DUPLICATE_DATA, 00436 __FUNCTION__); 00437 } 00438 00439 group = cdpb.AAAGroupAVPS(list); 00440 00441 cdpb.AAAFreeAVPList(&list); 00442 00443 return 00444 e2_add_avp(msg,group.s,group.len, 00445 AVP_ETSI_Globally_Unique_Address, 00446 AAA_AVP_FLAG_MANDATORY|AAA_AVP_FLAG_VENDOR_SPECIFIC, 00447 IMS_vendor_id_ETSI, 00448 AVP_FREE_DATA, 00449 __FUNCTION__); 00450 }
| int e2_add_app_identifier | ( | AAAMessage * | msg, | |
| str | data | |||
| ) | [inline] |
Creates and adds AVP_IMS_AF_Application_Identifier.
| msg | - the Diameter message to add to. | |
| data | - application_Identifier |
Definition at line 459 of file e2_avp.c.
References AAA_AVP_FLAG_MANDATORY, AAA_AVP_FLAG_VENDOR_SPECIFIC, AVP_DUPLICATE_DATA, AVP_IMS_AF_Application_Identifier, e2_add_avp(), and IMS_vendor_id_3GPP.
Referenced by e2_UDR().
00460 { 00461 return 00462 e2_add_avp(msg,data.s,data.len, 00463 AVP_IMS_AF_Application_Identifier, 00464 AAA_AVP_FLAG_MANDATORY|AAA_AVP_FLAG_VENDOR_SPECIFIC, 00465 IMS_vendor_id_3GPP, 00466 AVP_DUPLICATE_DATA, 00467 __FUNCTION__); 00468 }
| str e2_get_session_id | ( | AAAMessage * | msg | ) | [inline] |
Returns the Session-Id AVP of a Diameter message.
| msg | - the Diameter message |
Definition at line 476 of file e2_avp.c.
References AVP_Session_Id, and e2_get_avp().
00477 { 00478 return e2_get_avp(msg, 00479 AVP_Session_Id, 00480 0, 00481 __FUNCTION__); 00482 }
| str e2_get_user_name | ( | AAAMessage * | msg | ) | [inline] |
Returns the User-Name AVP from a Diameter message.
| msg | - the Diameter message |
Definition at line 490 of file e2_avp.c.
References AVP_User_Name, and e2_get_avp().
00491 { 00492 return e2_get_avp(msg, 00493 AVP_User_Name, 00494 0, 00495 __FUNCTION__); 00496 }
| str e2_get_terminal_type | ( | AAAMessage * | msg | ) | [inline] |
Definition at line 498 of file e2_avp.c.
References AVP_ETSI_Terminal_Type, e2_get_avp(), and IMS_vendor_id_ETSI.
Referenced by P_access_network_info().
00499 { 00500 return 00501 e2_get_avp(msg, 00502 AVP_ETSI_Terminal_Type, 00503 IMS_vendor_id_ETSI, 00504 __FUNCTION__); 00505 }
| int e2_get_access_net | ( | AAAMessage * | msg, | |
| int * | data | |||
| ) |
Definition at line 508 of file e2_avp.c.
References cdp_binds::AAAFindMatchingAVPList, cdp_binds::AAAFreeAVPList, cdp_binds::AAAUngroupAVPS, AVP_ETSI_Access_Network_Type, AVP_NAS_Port_Type, cdpb, avp::data, e2_get_avp(), and IMS_vendor_id_ETSI.
00509 { 00510 AAA_AVP_LIST list; 00511 AAA_AVP *avp; 00512 str grp; 00513 grp = e2_get_avp(msg, 00514 AVP_ETSI_Access_Network_Type, 00515 IMS_vendor_id_ETSI, 00516 __FUNCTION__); 00517 00518 if (!grp.s) return 0; 00519 00520 list = cdpb.AAAUngroupAVPS(grp); 00521 00522 avp = cdpb.AAAFindMatchingAVPList(list,0,AVP_NAS_Port_Type,0,0); 00523 if (!avp||!avp->data.s) { 00524 cdpb.AAAFreeAVPList(&list); 00525 return 0; 00526 } 00527 *data = atoi(avp->data.s); 00528 return 1; 00529 }
| int e2_get_location_info | ( | AAAMessage * | msg, | |
| str * | data | |||
| ) |
Definition at line 531 of file e2_avp.c.
References cdp_binds::AAAFindMatchingAVPList, cdp_binds::AAAFreeAVPList, cdp_binds::AAAUngroupAVPS, AVP_ETSI_Location_Information, AVP_Line_Identifier, cdpb, avp::data, e2_get_avp(), and IMS_vendor_id_ETSI.
Referenced by P_access_network_info().
00532 { 00533 AAA_AVP_LIST list; 00534 AAA_AVP *avp; 00535 str grp; 00536 data->len = 0; 00537 grp = e2_get_avp(msg, 00538 AVP_ETSI_Location_Information, 00539 IMS_vendor_id_ETSI, 00540 __FUNCTION__); 00541 00542 if (!grp.s) return 0; 00543 00544 list = cdpb.AAAUngroupAVPS(grp); 00545 00546 avp = cdpb.AAAFindMatchingAVPList(list,0,AVP_Line_Identifier,IMS_vendor_id_ETSI,0); 00547 if (!avp||!avp->data.s) { 00548 cdpb.AAAFreeAVPList(&list); 00549 return 0; 00550 } 00551 00552 *data = avp->data; 00553 return 1; 00554 }
1.5.2