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 2009 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27 #ifndef _SOCKFS_SOCKTPI_IMPL_H
28 #define _SOCKFS_SOCKTPI_IMPL_H
29
30 #include <sys/socketvar.h>
31 #include <fs/sockfs/socktpi.h>
32
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36
37 /*
38 * so_priv will always be set to &st_info
39 */
40 typedef struct sotpi_sonode {
41 struct sonode st_sonode;
42 struct sotpi_info st_info;
43 } sotpi_sonode_t;
44
45 extern void so_proc_tcapability_ack(struct sonode *,
46 struct T_capability_ack *);
47 extern void so_basic_strinit(struct sonode *);
48 extern void so_alloc_addr(struct sonode *, t_uscalar_t);
49 extern int so_set_events(struct sonode *, vnode_t *, cred_t *);
50 extern int so_sock2stream(struct sonode *);
51 extern void so_stream2sock(struct sonode *);
52
53 extern int so_strinit(struct sonode *, struct sonode *);
54 extern void so_update_attrs(struct sonode *, int);
55 extern int sogetrderr(vnode_t *, int, int *);
56 extern int sogetwrerr(vnode_t *, int, int *);
57 extern int so_addr_verify(struct sonode *, const struct sockaddr *,
58 socklen_t);
59 extern int so_ux_addr_xlate(struct sonode *, struct sockaddr *,
60 socklen_t, int, void **, socklen_t *);
61 extern void so_unix_close(struct sonode *);
62
63 extern int sowaitprim(struct sonode *, t_scalar_t, t_scalar_t,
64 t_uscalar_t, mblk_t **, clock_t);
65 extern int sowaitokack(struct sonode *, t_scalar_t);
66 extern int sowaitack(struct sonode *, mblk_t **, clock_t);
67 extern void soqueueack(struct sonode *, mblk_t *);
68 extern int sowaitconnind(struct sonode *, int, mblk_t **);
69 extern void soqueueconnind(struct sonode *, mblk_t *);
70 extern int soflushconnind(struct sonode *, t_scalar_t);
71 extern void so_drain_discon_ind(struct sonode *);
72 extern void so_flush_discon_ind(struct sonode *);
73
74 extern mblk_t *soallocproto(size_t, int, cred_t *);
75 extern mblk_t *soallocproto1(const void *, ssize_t, ssize_t, int, cred_t *);
76 extern void soappendmsg(mblk_t *, const void *, ssize_t);
77 extern mblk_t *soallocproto2(const void *, ssize_t, const void *, ssize_t,
78 ssize_t, int, cred_t *);
|
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 2009 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 * Copyright 2015 Joyent, Inc.
26 */
27
28 #ifndef _SOCKFS_SOCKTPI_IMPL_H
29 #define _SOCKFS_SOCKTPI_IMPL_H
30
31 #include <sys/socketvar.h>
32 #include <fs/sockfs/socktpi.h>
33
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 /*
39 * so_priv will always be set to &st_info
40 */
41 typedef struct sotpi_sonode {
42 struct sonode st_sonode;
43 struct sotpi_info st_info;
44 } sotpi_sonode_t;
45
46 extern void so_proc_tcapability_ack(struct sonode *,
47 struct T_capability_ack *);
48 extern void so_basic_strinit(struct sonode *);
49 extern void so_alloc_addr(struct sonode *, t_uscalar_t);
50 extern int so_set_events(struct sonode *, vnode_t *, cred_t *);
51 extern int so_sock2stream(struct sonode *);
52 extern void so_stream2sock(struct sonode *);
53
54 extern int so_strinit(struct sonode *, struct sonode *);
55 extern void so_update_attrs(struct sonode *, int);
56 extern int sogetrderr(vnode_t *, int, int *);
57 extern int sogetwrerr(vnode_t *, int, int *);
58 extern int so_addr_verify(struct sonode *, const struct sockaddr *,
59 socklen_t);
60 extern int so_ux_lookup(struct sonode *, struct sockaddr_un *, int,
61 vnode_t **);
62 extern int so_ux_addr_xlate(struct sonode *, struct sockaddr *,
63 socklen_t, int, void **, socklen_t *);
64 extern void so_unix_close(struct sonode *);
65
66 extern int sowaitprim(struct sonode *, t_scalar_t, t_scalar_t,
67 t_uscalar_t, mblk_t **, clock_t);
68 extern int sowaitokack(struct sonode *, t_scalar_t);
69 extern int sowaitack(struct sonode *, mblk_t **, clock_t);
70 extern void soqueueack(struct sonode *, mblk_t *);
71 extern int sowaitconnind(struct sonode *, int, mblk_t **);
72 extern void soqueueconnind(struct sonode *, mblk_t *);
73 extern int soflushconnind(struct sonode *, t_scalar_t);
74 extern void so_drain_discon_ind(struct sonode *);
75 extern void so_flush_discon_ind(struct sonode *);
76
77 extern mblk_t *soallocproto(size_t, int, cred_t *);
78 extern mblk_t *soallocproto1(const void *, ssize_t, ssize_t, int, cred_t *);
79 extern void soappendmsg(mblk_t *, const void *, ssize_t);
80 extern mblk_t *soallocproto2(const void *, ssize_t, const void *, ssize_t,
81 ssize_t, int, cred_t *);
|