comparison include/freeDiameter/libfreeDiameter.h @ 34:0e2b57789361

Backup for the WE, some warnings remaining
author Sebastien Decugis <sdecugis@nict.go.jp>
date Fri, 30 Oct 2009 17:23:06 +0900
parents e6fcdf12b9a0
children 2db15632a63d
comparison
equal deleted inserted replaced
33:e6fcdf12b9a0 34:0e2b57789361
1987 * 1987 *
1988 * RETURN VALUE: 1988 * RETURN VALUE:
1989 * 0 : Operation complete. 1989 * 0 : Operation complete.
1990 * !0 : an error occurred. 1990 * !0 : an error occurred.
1991 */ 1991 */
1992 int fd_msg_source_set( struct msg * msg, char * diamid, uint32_t hash, int add_rr, struct dictionary * dict ); 1992 int fd_msg_source_set( struct msg * msg, char * diamid, int add_rr, struct dictionary * dict );
1993 int fd_msg_source_get( struct msg * msg, char ** diamid, uint32_t *hash ); 1993 int fd_msg_source_get( struct msg * msg, char ** diamid );
1994 1994
1995 /* 1995 /*
1996 * FUNCTION: fd_msg_eteid_get 1996 * FUNCTION: fd_msg_eteid_get
1997 * 1997 *
1998 * PARAMETERS: 1998 * PARAMETERS:
2135 * ENOMEM : Unable to allocate enough memory to complete the operation. 2135 * ENOMEM : Unable to allocate enough memory to complete the operation.
2136 * ENOTSUP : No dictionary definition for the command or one of the mandatory AVP was found. 2136 * ENOTSUP : No dictionary definition for the command or one of the mandatory AVP was found.
2137 */ 2137 */
2138 int fd_msg_parse_dict ( msg_or_avp * object, struct dictionary * dict ); 2138 int fd_msg_parse_dict ( msg_or_avp * object, struct dictionary * dict );
2139 2139
2140 /* Parsing Error Information structure */
2141 struct fd_pei {
2142 char * pei_errcode; /* name of the error code to use */
2143 struct avp * pei_avp; /* pointer to invalid or missing AVP (to be freed) */
2144 char * pei_message; /* Overwrite default message if needed */
2145 int pei_protoerr; /* do we set the 'E' bit in the error message ? */
2146 };
2147
2140 /* 2148 /*
2141 * FUNCTION: fd_msg_parse_rules 2149 * FUNCTION: fd_msg_parse_rules
2142 * 2150 *
2143 * PARAMETERS: 2151 * PARAMETERS:
2144 * object : A msg or grouped avp object that must be verified. 2152 * object : A msg or grouped avp object that must be verified.
2145 * dict : The dictionary containing the rules definitions. 2153 * dict : The dictionary containing the rules definitions.
2146 * rule : If not NULL, the first conflicting rule will be saved here if a conflict is found. 2154 * error_info : If not NULL, the first problem information will be saved here.
2147 * 2155 *
2148 * DESCRIPTION: 2156 * DESCRIPTION:
2149 * Check that the children of the object do not conflict with the dictionary rules (ABNF compliance). 2157 * Check that the children of the object do not conflict with the dictionary rules (ABNF compliance).
2150 * 2158 *
2151 * RETURN VALUE: 2159 * RETURN VALUE:
2152 * 0 : The message has been fully parsed and complies to the defined rules. 2160 * 0 : The message has been fully parsed and complies to the defined rules.
2153 * EBADMSG : A conflict was detected, or a mandatory AVP is unknown in the dictionary. 2161 * EBADMSG : A conflict was detected, or a mandatory AVP is unknown in the dictionary.
2154 * EINVAL : The msg or avp object is invalid for this operation. 2162 * EINVAL : The msg or avp object is invalid for this operation.
2155 * ENOMEM : Unable to allocate enough memory to complete the operation. 2163 * ENOMEM : Unable to allocate enough memory to complete the operation.
2156 */ 2164 */
2157 int fd_msg_parse_rules ( msg_or_avp * object, struct dictionary * dict, struct dict_object ** rule); 2165 int fd_msg_parse_rules ( msg_or_avp * object, struct dictionary * dict, struct fd_pei *error_info);
2166
2158 2167
2159 2168
2160 /* 2169 /*
2161 * FUNCTION: fd_msg_update_length 2170 * FUNCTION: fd_msg_update_length
2162 * 2171 *
"Welcome to our mercurial repository"