Print this page
remove support for non-ANSI compilation
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/sys/t_kuser.h
+++ new/usr/src/uts/common/sys/t_kuser.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License, Version 1.0 only
6 6 * (the "License"). You may not use this file except in compliance
7 7 * with the License.
8 8 *
9 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 10 * or http://www.opensolaris.org/os/licensing.
11 11 * See the License for the specific language governing permissions
12 12 * and limitations under the License.
↓ open down ↓ |
12 lines elided |
↑ open up ↑ |
13 13 *
14 14 * When distributing Covered Code, include this CDDL HEADER in each
15 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 16 * If applicable, add the following below this CDDL HEADER, with the
17 17 * fields enclosed by brackets "[]" replaced with your own identifying
18 18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 19 *
20 20 * CDDL HEADER END
21 21 */
22 22 /*
23 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
24 + *
23 25 * Copyright 1998 Sun Microsystems, Inc. All rights reserved.
24 26 * Use is subject to license terms.
25 27 */
26 28
27 29 /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
28 30 /* All Rights Reserved */
29 31
30 32 /*
31 33 * University Copyright- Copyright (c) 1982, 1986, 1988
32 34 * The Regents of the University of California
33 35 * All Rights Reserved
34 36 *
35 37 * University Acknowledgment- Portions of this document are derived from
36 38 * software developed by the University of California, Berkeley, and its
37 39 * contributors.
38 40 */
39 41
40 42 #ifndef _SYS_T_KUSER_H
41 43 #define _SYS_T_KUSER_H
42 44
43 45 #pragma ident "%Z%%M% %I% %E% SMI"
44 46
45 47 #include <sys/types.h>
46 48 #include <sys/file.h>
47 49 #include <sys/cred.h>
48 50 #include <sys/stream.h>
49 51 #include <sys/tiuser.h>
50 52
51 53 #ifdef __cplusplus
52 54 extern "C" {
53 55 #endif
54 56
55 57 /*
56 58 * Note this structure will need to be expanded to handle data
57 59 * related to connection orientated transports.
58 60 */
59 61 typedef struct tiuser {
60 62 struct file *fp;
61 63 struct t_info tp_info; /* Transport provider Info. */
62 64 int flags;
63 65 } TIUSER;
64 66 #define TIUSERSZ sizeof (TIUSER)
65 67
66 68 struct knetbuf {
67 69 mblk_t *udata_mp; /* current receive streams block */
68 70 unsigned int maxlen;
69 71 unsigned int len;
70 72 char *buf;
71 73 };
72 74
73 75 struct t_kunitdata {
74 76 struct netbuf addr;
75 77 struct netbuf opt;
76 78 struct knetbuf udata;
77 79 };
78 80
79 81
80 82 #ifdef KTLIDEBUG
81 83 extern int ktli_log();
82 84 extern int ktlilog;
83 85
↓ open down ↓ |
51 lines elided |
↑ open up ↑ |
84 86 #define KTLILOG(A, B, C) ((void)((ktlilog) && ktli_log((A), (B), (C))))
85 87 #else
86 88 #define KTLILOG(A, B, C)
87 89 #endif
88 90
89 91 /*
90 92 * flags
91 93 */
92 94 #define MADE_FP 0x02
93 95
94 -
95 -#ifdef __STDC__
96 -
97 96 extern int t_kalloc(TIUSER *, int, int, char **);
98 97 extern int t_kbind(TIUSER *, struct t_bind *, struct t_bind *);
99 98 extern int t_kclose(TIUSER *, int);
100 99 extern int t_kconnect(TIUSER *, struct t_call *, struct t_call *);
101 100 extern int t_kfree(TIUSER *, char *, int);
102 101 extern int t_kgetstate(TIUSER *, int *);
103 102 extern int t_kopen(struct file *, dev_t, int, TIUSER **, struct cred *);
104 103 extern int t_krcvudata(TIUSER *, struct t_kunitdata *, int *, int *);
105 104 extern int t_ksndudata(TIUSER *, struct t_kunitdata *, frtn_t *);
106 105 extern int t_kspoll(TIUSER *, int, int, int *);
107 106 extern int t_kunbind(TIUSER *);
108 107 extern int tli_send(TIUSER *, mblk_t *, int);
109 108 extern int tli_recv(TIUSER *, mblk_t **, int);
110 109 extern int t_tlitosyserr(int);
111 110 extern int get_ok_ack(TIUSER *, int, int);
112 111
113 -#else
114 -
115 -extern int t_kalloc();
116 -extern int t_kbind();
117 -extern int t_kclose();
118 -extern int t_kconnect();
119 -extern int t_kfree();
120 -extern int t_kgetstate();
121 -extern int t_kopen();
122 -extern int t_krcvudata();
123 -extern int t_ksndudata();
124 -extern int t_kspoll();
125 -extern int t_kunbind();
126 -extern int tli_send();
127 -extern int tli_recv();
128 -extern int t_tlitosyserr();
129 -extern int get_ok_ack();
130 -#endif /* __STDC__ */
131 -
132 112 /*
133 113 * these make life a lot easier
134 114 */
135 115 #define TCONNREQSZ sizeof (struct T_conn_req)
136 116 #define TCONNRESSZ sizeof (struct T_conn_res)
137 117 #define TDISCONREQSZ sizeof (struct T_discon_req)
138 118 #define TDATAREQSZ sizeof (struct T_data_req)
139 119 #define TEXDATAREQSZ sizeof (struct T_exdata_req)
140 120 #define TINFOREQSZ sizeof (struct T_info_req)
141 121 #define TBINDREQSZ sizeof (struct T_bind_req)
142 122 #define TUNBINDREQSZ sizeof (struct T_unbind_req)
143 123 #define TUNITDATAREQSZ sizeof (struct T_unitdata_req)
144 124 #define TOPTMGMTREQSZ sizeof (struct T_optmgmt_req)
145 125 #define TORDRELREQSZ sizeof (struct T_ordrel_req)
146 126 #define TCONNINDSZ sizeof (struct T_conn_ind)
147 127 #define TCONNCONSZ sizeof (struct T_conn_con)
148 128 #define TDISCONINDSZ sizeof (struct T_discon_ind)
149 129 #define TDATAINDSZ sizeof (struct T_data_ind)
150 130 #define TEXDATAINDSZ sizeof (struct T_exdata_ind)
151 131 #define TINFOACKSZ sizeof (struct T_info_ack)
152 132 #define TBINDACKSZ sizeof (struct T_bind_ack)
153 133 #define TERRORACKSZ sizeof (struct T_error_ack)
154 134 #define TOKACKSZ sizeof (struct T_ok_ack)
155 135 #define TUNITDATAINDSZ sizeof (struct T_unitdata_ind)
156 136 #define TUDERRORINDSZ sizeof (struct T_uderror_ind)
157 137 #define TOPTMGMTACKSZ sizeof (struct T_optmgmt_ack)
158 138 #define TORDRELINDSZ sizeof (struct T_ordrel_ind)
159 139 #define TPRIMITIVES sizeof (struct T_primitives)
160 140
161 141 #ifdef __cplusplus
162 142 }
163 143 #endif
164 144
165 145 #endif /* _SYS_T_KUSER_H */
↓ open down ↓ |
24 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX