17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 59acbbeafSnn35248 * Common Development and Distribution License (the "License"). 69acbbeafSnn35248 * You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate * 87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate * and limitations under the License. 127c478bd9Sstevel@tonic-gate * 137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate * 197c478bd9Sstevel@tonic-gate * CDDL HEADER END 207c478bd9Sstevel@tonic-gate */ 217c478bd9Sstevel@tonic-gate /* 22*9ff75adeSSurya Prakki * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. 237c478bd9Sstevel@tonic-gate */ 247c478bd9Sstevel@tonic-gate 257c478bd9Sstevel@tonic-gate /* 267c478bd9Sstevel@tonic-gate * nfs_tbind.h, common code for nfsd and lockd 277c478bd9Sstevel@tonic-gate */ 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gate #ifndef _NFS_TBIND_H 307c478bd9Sstevel@tonic-gate #define _NFS_TBIND_H 317c478bd9Sstevel@tonic-gate 327c478bd9Sstevel@tonic-gate #include <netconfig.h> 337c478bd9Sstevel@tonic-gate #include <netdir.h> 347c478bd9Sstevel@tonic-gate 357c478bd9Sstevel@tonic-gate #ifdef __cplusplus 367c478bd9Sstevel@tonic-gate extern "C" { 377c478bd9Sstevel@tonic-gate #endif 387c478bd9Sstevel@tonic-gate 397c478bd9Sstevel@tonic-gate /* 407c478bd9Sstevel@tonic-gate * Globals which should be initialised by daemon main(). 417c478bd9Sstevel@tonic-gate */ 427c478bd9Sstevel@tonic-gate extern size_t end_listen_fds; 437c478bd9Sstevel@tonic-gate extern size_t num_fds; 447c478bd9Sstevel@tonic-gate extern int listen_backlog; 457c478bd9Sstevel@tonic-gate extern int (*Mysvc)(int, struct netbuf, struct netconfig *); 467c478bd9Sstevel@tonic-gate extern int (*Mysvc4)(int, struct netbuf *, struct netconfig *, 477c478bd9Sstevel@tonic-gate int, struct netbuf *); 487c478bd9Sstevel@tonic-gate extern int max_conns_allowed; 497c478bd9Sstevel@tonic-gate 507c478bd9Sstevel@tonic-gate /* 517c478bd9Sstevel@tonic-gate * RPC protocol block. Useful for passing registration information. 527c478bd9Sstevel@tonic-gate */ 537c478bd9Sstevel@tonic-gate struct protob { 547c478bd9Sstevel@tonic-gate char *serv; /* ASCII service name, e.g. "NFS" */ 557c478bd9Sstevel@tonic-gate int versmin; /* minimum version no. to be registered */ 567c478bd9Sstevel@tonic-gate int versmax; /* maximum version no. to be registered */ 577c478bd9Sstevel@tonic-gate int program; /* program no. to be registered */ 587c478bd9Sstevel@tonic-gate struct protob *next; /* next entry on list */ 597c478bd9Sstevel@tonic-gate }; 607c478bd9Sstevel@tonic-gate 617c478bd9Sstevel@tonic-gate /* 627c478bd9Sstevel@tonic-gate * Declarations for protocol types and comparison. 637c478bd9Sstevel@tonic-gate */ 647c478bd9Sstevel@tonic-gate #define NETSELDECL(x) char *x 657c478bd9Sstevel@tonic-gate #define NETSELPDECL(x) char **x 667c478bd9Sstevel@tonic-gate #define NETSELEQ(x, y) (strcmp((x), (y)) == 0) 677c478bd9Sstevel@tonic-gate 687c478bd9Sstevel@tonic-gate /* 697c478bd9Sstevel@tonic-gate * nfs library routines 707c478bd9Sstevel@tonic-gate */ 717c478bd9Sstevel@tonic-gate extern int nfslib_transport_open(struct netconfig *); 727c478bd9Sstevel@tonic-gate extern int nfslib_bindit(struct netconfig *, struct netbuf **, 737c478bd9Sstevel@tonic-gate struct nd_hostserv *, int); 747c478bd9Sstevel@tonic-gate extern void nfslib_log_tli_error(char *, int, struct netconfig *); 757c478bd9Sstevel@tonic-gate extern int do_all(struct protob *, 76*9ff75adeSSurya Prakki int (*)(int, struct netbuf, struct netconfig *)); 777c478bd9Sstevel@tonic-gate extern void do_one(char *, char *, struct protob *, 78*9ff75adeSSurya Prakki int (*)(int, struct netbuf, struct netconfig *)); 797c478bd9Sstevel@tonic-gate extern void poll_for_action(void); 807c478bd9Sstevel@tonic-gate 817c478bd9Sstevel@tonic-gate #ifdef __cplusplus 827c478bd9Sstevel@tonic-gate } 837c478bd9Sstevel@tonic-gate #endif 847c478bd9Sstevel@tonic-gate 857c478bd9Sstevel@tonic-gate #endif /* _NFS_TBIND_H */ 86