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 (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
26 * nfs_tbind.h, common code for nfsd and lockd
32 #include <netconfig.h>
40 * Globals which should be initialised by daemon main().
42 extern size_t end_listen_fds
;
43 extern size_t num_fds
;
44 extern int listen_backlog
;
45 extern int (*Mysvc
)(int, struct netbuf
, struct netconfig
*);
46 extern int (*Mysvc4
)(int, struct netbuf
*, struct netconfig
*,
47 int, struct netbuf
*);
48 extern int max_conns_allowed
;
51 * RPC protocol block. Useful for passing registration information.
54 char *serv
; /* ASCII service name, e.g. "NFS" */
55 int versmin
; /* minimum version no. to be registered */
56 int versmax
; /* maximum version no. to be registered */
57 int program
; /* program no. to be registered */
58 struct protob
*next
; /* next entry on list */
62 * Declarations for protocol types and comparison.
64 #define NETSELDECL(x) char *x
65 #define NETSELPDECL(x) char **x
66 #define NETSELEQ(x, y) (strcmp((x), (y)) == 0)
69 * nfs library routines
71 extern int nfslib_transport_open(struct netconfig
*);
72 extern int nfslib_bindit(struct netconfig
*, struct netbuf
**,
73 struct nd_hostserv
*, int);
74 extern void nfslib_log_tli_error(char *, int, struct netconfig
*);
75 extern int do_all(struct protob
*,
76 int (*)(int, struct netbuf
, struct netconfig
*));
77 extern void do_one(char *, char *, struct protob
*,
78 int (*)(int, struct netbuf
, struct netconfig
*));
79 extern void poll_for_action(void);
85 #endif /* _NFS_TBIND_H */