xref: /titanic_52/usr/src/lib/libsip/common/sip_parse_generic.h (revision dc20a3024900c47dd2ee44b9707e6df38f7d62a5)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 
22 /*
23  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef	_SIP_PARSE_GENERIC_H
28 #define	_SIP_PARSE_GENERIC_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 #include <sip.h>
37 #include <sys/types.h>
38 
39 #include "sip_msg.h"
40 
41 extern int		sip_atoi(_sip_header_t	*, int *);
42 extern int		sip_find_token(_sip_header_t  *, char);
43 extern int		sip_find_cr(_sip_header_t *);
44 extern int		sip_find_separator(_sip_header_t *, char, char, char,
45 			    boolean_t);
46 extern int		sip_find_white_space(_sip_header_t *);
47 extern int		sip_skip_white_space(_sip_header_t *);
48 extern int		sip_reverse_skip_white_space(_sip_header_t *);
49 extern int		sip_parse_goto_values(_sip_header_t  *);
50 extern int		sip_goto_next_value(_sip_header_t *);
51 extern int		sip_parse_params(_sip_header_t *, sip_param_t **);
52 extern int		sip_prim_parsers(_sip_header_t *,
53 			    sip_parsed_header_t **);
54 extern boolean_t	sip_is_empty_hdr(_sip_header_t *);
55 extern int		sip_parse_hdr_empty(_sip_header_t *,
56 			    sip_parsed_header_t **);
57 int			sip_get_protocol_version(_sip_header_t *,
58 			    sip_proto_version_t *sip_proto_version);
59 extern int		sip_parse_first_line(_sip_header_t *,
60 			    sip_message_type_t **);
61 extern int		sip_parse_hdr_parser1(_sip_header_t *,
62 			    sip_parsed_header_t **, char);
63 extern int		sip_parse_hdr_parser2(_sip_header_t *,
64 			    sip_parsed_header_t **, int);
65 extern int		sip_parse_hdr_parser3(_sip_header_t *,
66 			    sip_parsed_header_t **, int, boolean_t);
67 extern int		sip_parse_hdr_parser4(_sip_header_t *,
68 			    sip_parsed_header_t **);
69 extern int		sip_parse_hdr_parser5(_sip_header_t *,
70 			    sip_parsed_header_t **, boolean_t);
71 #ifdef	__cplusplus
72 }
73 #endif
74 
75 #endif	/* _SIP_PARSE_GENERIC_H */
76