Mercurial > hg > freeDiameter
comparison include/freeDiameter/libfdproto.h @ 1422:b1e8c5281d29
libfdproto.h: fix typos and whitespace
author | Luke Mewburn <luke@mewburn.net> |
---|---|
date | Wed, 19 Feb 2020 10:07:17 +1100 |
parents | f6f12521c2aa |
children | 67c263056d78 |
comparison
equal
deleted
inserted
replaced
1421:3ac2877628a5 | 1422:b1e8c5281d29 |
---|---|
27 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * | 27 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * |
28 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR * | 28 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR * |
29 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * | 29 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * |
30 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * | 30 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * |
31 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR * | 31 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR * |
32 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY S_OUT OF THE USE OF THIS SOFTWARE, EVEN IF * | 32 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY S_OUT OF THE USE OF THIS SOFTWARE, EVEN IF * |
33 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * | 33 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * |
34 *********************************************************************************************************/ | 34 *********************************************************************************************************/ |
35 | 35 |
36 /* This file contains the definitions of functions and types used by the libfreeDiameter library. | 36 /* This file contains the definitions of functions and types used by the libfreeDiameter library. |
37 * | 37 * |
960 | 960 |
961 /* | 961 /* |
962 * FUNCTION: fd_dict_new | 962 * FUNCTION: fd_dict_new |
963 * | 963 * |
964 * PARAMETERS: | 964 * PARAMETERS: |
965 * dict : Pointer to the dictionnary where the object is created | 965 * dict : Pointer to the dictionary where the object is created |
966 * type : What kind of object must be created | 966 * type : What kind of object must be created |
967 * data : pointer to the data for the object. | 967 * data : pointer to the data for the object. |
968 * type parameter is used to determine the type of data (see below for detail). | 968 * type parameter is used to determine the type of data (see below for detail). |
969 * parent : a reference to a parent object, if needed. | 969 * parent : a reference to a parent object, if needed. |
970 * ref : upon successful creation, reference to new object is stored here if !null. | 970 * ref : upon successful creation, reference to new object is stored here if !null. |
985 | 985 |
986 /* | 986 /* |
987 * FUNCTION: fd_dict_search | 987 * FUNCTION: fd_dict_search |
988 * | 988 * |
989 * PARAMETERS: | 989 * PARAMETERS: |
990 * dict : Pointer to the dictionnary where the object is searched | 990 * dict : Pointer to the dictionary where the object is searched |
991 * type : type of object that is being searched | 991 * type : type of object that is being searched |
992 * criteria : how the object must be searched. See object-related sections below for more information. | 992 * criteria : how the object must be searched. See object-related sections below for more information. |
993 * what : depending on criteria, the data that must be searched. | 993 * what : depending on criteria, the data that must be searched. |
994 * result : On successful return, pointer to the object is stored here. | 994 * result : On successful return, pointer to the object is stored here. |
995 * retval : this value is returned if the object is not found and result is not NULL. | 995 * retval : this value is returned if the object is not found and result is not NULL. |
1378 }; | 1378 }; |
1379 | 1379 |
1380 /* The criteria for searching a constant in the dictionary */ | 1380 /* The criteria for searching a constant in the dictionary */ |
1381 enum { | 1381 enum { |
1382 ENUMVAL_BY_STRUCT = 40, /* "what" points to a struct dict_enumval_request as defined below */ | 1382 ENUMVAL_BY_STRUCT = 40, /* "what" points to a struct dict_enumval_request as defined below */ |
1383 ENUMVAL_BY_NAME, /* This cannot be used for researches */ | 1383 ENUMVAL_BY_NAME, /* This cannot be used for searches */ |
1384 ENUMVAL_BY_VALUE /* This cannot be used for researches */ | 1384 ENUMVAL_BY_VALUE /* This cannot be used for searches */ |
1385 }; | 1385 }; |
1386 | 1386 |
1387 struct dict_enumval_request { | 1387 struct dict_enumval_request { |
1388 /* Identifier of the parent type, one of the following must not be NULL */ | 1388 /* Identifier of the parent type, one of the following must not be NULL */ |
1389 struct dict_object *type_obj; | 1389 struct dict_object *type_obj; |
1508 /* kept for backward compatibility, better use AVP_BY_STRUCT above instead */ | 1508 /* kept for backward compatibility, better use AVP_BY_STRUCT above instead */ |
1509 AVP_BY_CODE_AND_VENDOR, /* "what" points to a struct dict_avp_request (see below), where avp_vendor and avp_code are set */ | 1509 AVP_BY_CODE_AND_VENDOR, /* "what" points to a struct dict_avp_request (see below), where avp_vendor and avp_code are set */ |
1510 AVP_BY_NAME_AND_VENDOR /* "what" points to a struct dict_avp_request (see below), where avp_vendor and avp_name are set */ | 1510 AVP_BY_NAME_AND_VENDOR /* "what" points to a struct dict_avp_request (see below), where avp_vendor and avp_name are set */ |
1511 }; | 1511 }; |
1512 | 1512 |
1513 /* Struct used for some researchs */ | 1513 /* Struct used for some searches */ |
1514 struct dict_avp_request_ex { | 1514 struct dict_avp_request_ex { |
1515 struct { | 1515 struct { |
1516 /* Only one of the following fields must be set. */ | 1516 /* Only one of the following fields must be set. */ |
1517 struct dict_object * vendor; /* most efficient if already known, set to NULL to ignore */ | 1517 struct dict_object * vendor; /* most efficient if already known, set to NULL to ignore */ |
1518 vendor_id_t vendor_id; /* set to 0 to ignore -- prefer AVP_BY_CODE or AVP_BY_NAME for vendor 0 */ | 1518 vendor_id_t vendor_id; /* set to 0 to ignore -- prefer AVP_BY_CODE or AVP_BY_NAME for vendor 0 */ |
2372 * | 2372 * |
2373 * DESCRIPTION: | 2373 * DESCRIPTION: |
2374 * Search the first top-level AVP of a given model inside a message. | 2374 * Search the first top-level AVP of a given model inside a message. |
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 research 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). |