comparison include/freeDiameter/libfdproto.h @ 1423:67c263056d78

fd_msg_search_avp: search msg_or_avp, not just msg Change fd_msg_search_avp() to support searching struct msg or struct avp, and not just struct msg.
author Luke Mewburn <luke@mewburn.net>
date Wed, 19 Feb 2020 10:20:20 +1100
parents b1e8c5281d29
children 566bb46cc73f
comparison
equal deleted inserted replaced
1422:b1e8c5281d29 1423:67c263056d78
2364 2364
2365 /* 2365 /*
2366 * FUNCTION: fd_msg_search_avp 2366 * FUNCTION: fd_msg_search_avp
2367 * 2367 *
2368 * PARAMETERS: 2368 * PARAMETERS:
2369 * msg : The message structure in which to search the AVP. 2369 * reference : Pointer to a valid msg or avp in which to search the AVP.
2370 * what : The dictionary model of the AVP to search. 2370 * what : The dictionary model of the AVP to search.
2371 * avp : location where the AVP reference is stored if found. 2371 * avp : location where the AVP reference is stored if found.
2372 * 2372 *
2373 * DESCRIPTION: 2373 * DESCRIPTION:
2374 * Search the first top-level AVP of a given model inside a message. 2374 * Search for the first top-level AVP of a given model inside a message or AVP.
2375 * Note: only the first instance of the AVP is returned by this function. 2375 * Note: only the first instance of the AVP is returned by this function.
2376 * Note: only top-level AVPs are searched, not inside grouped AVPs. 2376 * Note: only top-level AVPs are searched, not inside grouped AVPs.
2377 * Use msg_browse if you need more advanced search features. 2377 * Use msg_browse if you need more advanced search features.
2378 * 2378 *
2379 * RETURN VALUE: 2379 * RETURN VALUE:
2380 * 0 : The AVP has been found. 2380 * 0 : The AVP has been found.
2381 * EINVAL : A parameter is invalid. 2381 * EINVAL : A parameter is invalid.
2382 * ENOENT : No AVP has been found, and "avp" was NULL (otherwise, *avp is set to NULL and 0 returned). 2382 * ENOENT : No AVP has been found, and "avp" was NULL (otherwise, *avp is set to NULL and 0 returned).
2383 */ 2383 */
2384 int fd_msg_search_avp ( struct msg * msg, struct dict_object * what, struct avp ** avp ); 2384 int fd_msg_search_avp ( msg_or_avp * reference, struct dict_object * what, struct avp ** avp );
2385 2385
2386 /* 2386 /*
2387 * FUNCTION: fd_msg_free 2387 * FUNCTION: fd_msg_free
2388 * 2388 *
2389 * PARAMETERS: 2389 * PARAMETERS:
"Welcome to our mercurial repository"