xref: /illumos-gate/usr/src/uts/common/pcmcia/sys/cis_protos.h (revision 7a6d80f1660abd4755c68cbd094d4a914681d26e)
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, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright (c) 1999,2001 by Sun Microsystems, Inc.
24  * All rights reserved.
25  */
26 
27 #ifndef _CIS_PROTOS_H
28 #define	_CIS_PROTOS_H
29 
30 #ifdef	__cplusplus
31 extern "C" {
32 #endif
33 
34 /*
35  * This file contains all of the function prototypes for functions
36  *	used by the CIS interpreter.
37  *
38  * Prototypes for general functions
39  */
40 uint32_t	cis_list_create(cistpl_callout_t *, cs_socket_t *);
41 uint32_t	cis_list_destroy(cs_socket_t *);
42 uint32_t	cis_list_lcreate(cistpl_callout_t *, cisptr_t *,
43 			cis_info_t *, cisparse_t *, cs_socket_t *);
44 uint32_t	cis_list_ldestroy(cistpl_t **);
45 cistpl_t	*cis_get_ltuple(cistpl_t *, cisdata_t, uint32_t);
46 uint32_t	cistpl_devspeed(cistpl_t *, cisdata_t, uint32_t);
47 uint32_t	cistpl_expd_parse(cistpl_t *, uint32_t *);
48 uint32_t	cis_convert_devspeed(convert_speed_t *);
49 uint32_t	cis_convert_devsize(convert_size_t *);
50 uint32_t	cis_validate_longlink_acm(cisptr_t *);
51 
52 /*
53  * Prototypes for the tuple handlers
54  */
55 uint32_t	cis_tuple_handler(cistpl_callout_t *, cistpl_t *, uint32_t,
56 					void *, cisdata_t);
57 uint32_t	cis_no_tuple_handler(cistpl_callout_t *, cistpl_t *,
58 					uint32_t, void *);
59 uint32_t	cis_unknown_tuple_handler(cistpl_callout_t *, cistpl_t *,
60 					uint32_t, void *);
61 uint32_t	cistpl_vers_1_handler(cistpl_callout_t *, cistpl_t *,
62 					uint32_t, void *);
63 uint32_t	cistpl_config_handler(cistpl_callout_t *, cistpl_t *,
64 					uint32_t, void *);
65 uint32_t	cistpl_device_handler(cistpl_callout_t *, cistpl_t *,
66 					uint32_t, void *);
67 uint32_t	cistpl_cftable_handler(cistpl_callout_t *, cistpl_t *,
68 					uint32_t, void *);
69 uint32_t	cistpl_jedec_handler(cistpl_callout_t *, cistpl_t *,
70 					uint32_t, void *);
71 uint32_t	cistpl_vers_2_handler(cistpl_callout_t *, cistpl_t *,
72 					uint32_t, void *);
73 uint32_t	cistpl_format_handler(cistpl_callout_t *, cistpl_t *,
74 					uint32_t, void *);
75 uint32_t	cistpl_geometry_handler(cistpl_callout_t *, cistpl_t *,
76 					uint32_t, void *);
77 uint32_t	cistpl_byteorder_handler(cistpl_callout_t *,
78 					cistpl_t *, uint32_t, void *);
79 uint32_t	cistpl_date_handler(cistpl_callout_t *, cistpl_t *,
80 					uint32_t, void *);
81 uint32_t	cistpl_battery_handler(cistpl_callout_t *, cistpl_t *,
82 					uint32_t, void *);
83 uint32_t	cistpl_org_handler(cistpl_callout_t *, cistpl_t *,
84 					uint32_t, void *);
85 uint32_t	cistpl_funcid_handler(cistpl_callout_t *, cistpl_t *,
86 					uint32_t, void *);
87 uint32_t	cistpl_funce_serial_handler(cistpl_callout_t *, cistpl_t *,
88 					uint32_t, void *);
89 uint32_t	cistpl_funce_lan_handler(cistpl_callout_t *,
90 					cistpl_t *, uint32_t, void *);
91 uint32_t	cistpl_manfid_handler(cistpl_callout_t *, cistpl_t *,
92 					uint32_t, void *);
93 uint32_t	cistpl_linktarget_handler(cistpl_callout_t *,
94 					cistpl_t *, uint32_t, void *);
95 uint32_t	cistpl_longlink_ac_handler(cistpl_callout_t *,
96 					cistpl_t *, uint32_t, void *);
97 uint32_t	cistpl_longlink_mfc_handler(cistpl_callout_t *,
98 					cistpl_t *, uint32_t, void *);
99 
100 char	*cis_getstr(cistpl_t *);
101 
102 #ifdef	_KERNEL
103 caddr_t	cis_malloc(size_t);
104 void	cis_free(caddr_t);
105 #endif	/* _KERNEL */
106 
107 #ifdef	__cplusplus
108 }
109 #endif
110 
111 #endif	/* _CIS_PROTOS_H */
112