ksocket.h revision 3e95bd4ab92abca814bd28e854607d1975c7dc88
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning * CDDL HEADER START
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning * The contents of this file are subject to the terms of the
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning * Common Development and Distribution License (the "License").
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning * You may not use this file except in compliance with the License.
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning * See the License for the specific language governing permissions
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning * and limitations under the License.
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning * When distributing Covered Code, include this CDDL HEADER in each
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning * If applicable, add the following below this CDDL HEADER, with the
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning * fields enclosed by brackets "[]" replaced with your own identifying
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning * information: Portions Copyright [yyyy] [name of copyright owner]
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning * CDDL HEADER END
3e95bd4ab92abca814bd28e854607d1975c7dc88Anders Persson * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning/* Opaque kernel socket type */
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning/* flag bit for each Callback Event */
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning * Kernel Socket Callback Events
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangningtypedef void (*ksocket_callback_t)(ksocket_t, ksocket_callback_event_t,
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangningextern int ksocket_socket(ksocket_t *, int, int, int, int, struct cred *);
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangningextern int ksocket_bind(ksocket_t, struct sockaddr *, socklen_t,
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangningextern int ksocket_listen(ksocket_t, int, struct cred *);
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangningextern int ksocket_accept(ksocket_t, struct sockaddr *, socklen_t *,
3e95bd4ab92abca814bd28e854607d1975c7dc88Anders Perssonextern int ksocket_connect(ksocket_t, struct sockaddr *, socklen_t,
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangningextern int ksocket_send(ksocket_t, void *, size_t, int, size_t *,
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangningextern int ksocket_sendto(ksocket_t, void *, size_t, int,
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning struct sockaddr *, socklen_t, size_t *, struct cred *);
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangningextern int ksocket_sendmsg(ksocket_t, struct nmsghdr *, int, size_t *,
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangningextern int ksocket_sendmblk(ksocket_t, struct nmsghdr *, int, mblk_t **,
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangningextern int ksocket_recv(ksocket_t, void *, size_t, int, size_t *,
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangningextern int ksocket_recvfrom(ksocket_t, void *, size_t, int,
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning struct sockaddr *, socklen_t *, size_t *, struct cred *);
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangningextern int ksocket_recvmsg(ksocket_t, struct nmsghdr *, int, size_t *,
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangningextern int ksocket_shutdown(ksocket_t, int, struct cred *);
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangningextern int ksocket_setsockopt(ksocket_t, int, int, const void *, int,
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangningextern int ksocket_getsockopt(ksocket_t, int, int, void *, int *,
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangningextern int ksocket_getpeername(ksocket_t, struct sockaddr *, socklen_t *,
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangningextern int ksocket_getsockname(ksocket_t, struct sockaddr *, socklen_t *,
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangningextern int ksocket_ioctl(ksocket_t, int, intptr_t, int *, struct cred *);
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangningextern int ksocket_setcallbacks(ksocket_t, ksocket_callbacks_t *, void *,
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangningextern int ksocket_close(ksocket_t, struct cred *);
0f1702c5201310f0529cd5abb77652e5e9b241b6Yu Xiangning#endif /* _SYS_KSOCKET_H_ */