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.
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.
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]
22 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 #ifndef _SYS_SOCKFS_NL7C_H
27 #define _SYS_SOCKFS_NL7C_H
33 #include <sys/types.h>
34 #include <sys/atomic.h>
35 #include <sys/cmn_err.h>
36 #include <sys/stropts.h>
37 #include <sys/socket.h>
38 #include <sys/socketvar.h>
44 * NCA_INET_DEV TPI device for the INET based transport that NCA will use.
46 #define NCA_DEV "/dev/nca"
47 #define NCA_INET_DEV "/dev/tcp"
50 * NL7C (uint64_t)(sotpi_info_t).sti_nl7c_flags:
53 #define NL7C_ENABLED 0x00000001 /* NL7C enabled socket */
54 #define NL7C_SOPERSIST 0x00000002 /* NL7C socket is persistent */
55 #define NL7C_WAITWRITE 0x00000004 /* NL7C waiting first write */
56 #define NL7C_AF_NCA 0x00000008 /* NL7C enabled socket via AF_NCA */
57 #define NL7C_POLLIN 0x00000010 /* poll() POLLIN prior to read */
58 #define NL7C_CLOSE 0x00000020 /* NL7C close needed */
60 #define NL7C_SCHEMEPRIV 0xFFFF0000 /* NL7C scheme private state */
62 #define NL7C_UNUSED 0xFFFFFFFF00000000 /* Unused bits */
68 extern boolean_t nl7c_enabled
;
69 extern clock_t nl7c_uri_ttl
;
72 * Function prototypes ...
75 boolean_t
nl7c_process(struct sonode
*, boolean_t
);
76 int nl7c_data(struct sonode
*, uio_t
*);
77 void nl7c_urifree(struct sonode
*);
78 void nl7c_close(struct sonode
*);
79 boolean_t
nl7c_parse(struct sonode
*, boolean_t
, boolean_t
*);
81 extern void *nl7c_lookup_addr(void *, t_uscalar_t
);
82 extern void *nl7c_add_addr(void *, t_uscalar_t
);
83 extern void nl7c_listener_addr(void *, struct sonode
*);
89 #endif /* _SYS_SOCKFS_NL7C_H */