8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / cmd / fs.d / nfs / lib / nfs_tbind.h
blob6f5da2d5b3b2a8e122d60da516fb2d8781f56546
1 /*
2 * CDDL HEADER START
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]
19 * CDDL HEADER END
22 * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
26 * nfs_tbind.h, common code for nfsd and lockd
29 #ifndef _NFS_TBIND_H
30 #define _NFS_TBIND_H
32 #include <netconfig.h>
33 #include <netdir.h>
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
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.
53 struct protob {
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);
81 #ifdef __cplusplus
83 #endif
85 #endif /* _NFS_TBIND_H */