Print this page
4953763 Need way to configure NFS window sizes without changing system wide defaults
6216670 NFS server needs a bigger transmit buffer


   2  * CDDL HEADER START
   3  *
   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.
   7  *
   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.
  12  *
  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]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  */
  25 
  26 /*
  27  * nfs_tbind.h, common code for nfsd and lockd
  28  */
  29 
  30 #ifndef _NFS_TBIND_H
  31 #define _NFS_TBIND_H
  32 
  33 #pragma ident   "%Z%%M% %I%     %E% SMI"
  34 
  35 #include <netconfig.h>
  36 #include <netdir.h>
  37 
  38 #ifdef __cplusplus
  39 extern "C" {
  40 #endif
  41 
  42 /*
  43  * Globals which should be initialised by daemon main().
  44  */
  45 extern  size_t  end_listen_fds;
  46 extern  size_t  num_fds;
  47 extern  int     listen_backlog;
  48 extern  int     (*Mysvc)(int, struct netbuf, struct netconfig *);
  49 extern  int     (*Mysvc4)(int, struct netbuf *, struct netconfig *,
  50                 int, struct netbuf *);
  51 extern  int     max_conns_allowed;
  52 
  53 /*
  54  * RPC protocol block.  Useful for passing registration information.


  56 struct protob {
  57         char *serv;             /* ASCII service name, e.g. "NFS" */
  58         int versmin;            /* minimum version no. to be registered */
  59         int versmax;            /* maximum version no. to be registered */
  60         int program;            /* program no. to be registered */
  61         struct protob *next;    /* next entry on list */
  62 };
  63 
  64 /*
  65  * Declarations for protocol types and comparison.
  66  */
  67 #define NETSELDECL(x)   char *x
  68 #define NETSELPDECL(x)  char **x
  69 #define NETSELEQ(x, y)  (strcmp((x), (y)) == 0)
  70 
  71 /*
  72  * nfs library routines
  73  */
  74 extern int      nfslib_transport_open(struct netconfig *);
  75 extern int      nfslib_bindit(struct netconfig *, struct netbuf **,
  76                         struct nd_hostserv *, int);
  77 extern void     nfslib_log_tli_error(char *, int, struct netconfig *);



  78 extern int      do_all(struct protob *,
  79                         int (*)(int, struct netbuf, struct netconfig *),
  80                         int use_pmap);



  81 extern void     do_one(char *, char *, struct protob *,
  82                         int (*)(int, struct netbuf, struct netconfig *),
  83                         int use_pmap);
  84 extern void     poll_for_action(void);
  85 
  86 #ifdef __cplusplus
  87 }
  88 #endif
  89 
  90 #endif  /* _NFS_TBIND_H */


   2  * CDDL HEADER START
   3  *
   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.
   7  *
   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.
  12  *
  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]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  */
  25 
  26 /*
  27  * nfs_tbind.h, common code for nfsd and lockd
  28  */
  29 
  30 #ifndef _NFS_TBIND_H
  31 #define _NFS_TBIND_H
  32 


  33 #include <netconfig.h>
  34 #include <netdir.h>
  35 
  36 #ifdef __cplusplus
  37 extern "C" {
  38 #endif
  39 
  40 /*
  41  * Globals which should be initialised by daemon main().
  42  */
  43 extern  size_t  end_listen_fds;
  44 extern  size_t  num_fds;
  45 extern  int     listen_backlog;
  46 extern  int     (*Mysvc)(int, struct netbuf, struct netconfig *);
  47 extern  int     (*Mysvc4)(int, struct netbuf *, struct netconfig *,
  48                 int, struct netbuf *);
  49 extern  int     max_conns_allowed;
  50 
  51 /*
  52  * RPC protocol block.  Useful for passing registration information.


  54 struct protob {
  55         char *serv;             /* ASCII service name, e.g. "NFS" */
  56         int versmin;            /* minimum version no. to be registered */
  57         int versmax;            /* maximum version no. to be registered */
  58         int program;            /* program no. to be registered */
  59         struct protob *next;    /* next entry on list */
  60 };
  61 
  62 /*
  63  * Declarations for protocol types and comparison.
  64  */
  65 #define NETSELDECL(x)   char *x
  66 #define NETSELPDECL(x)  char **x
  67 #define NETSELEQ(x, y)  (strcmp((x), (y)) == 0)
  68 
  69 /*
  70  * nfs library routines
  71  */
  72 extern int      nfslib_transport_open(struct netconfig *);
  73 extern int      nfslib_bindit(struct netconfig *, struct netbuf **,
  74                         struct nd_hostserv *, int, int sndbufsz, int rcvbufsz);
  75 extern void     nfslib_log_tli_error(char *, int, struct netconfig *);
  76 extern int      do_all_setbuf(struct protob *,
  77                         int (*)(int, struct netbuf, struct netconfig *),
  78                         int use_pmap, int sndbufsz, int rcvbufsz);
  79 extern int      do_all(struct protob *,
  80                         int (*)(int, struct netbuf, struct netconfig *),
  81                         int use_pmap);
  82 extern void     do_one_setbuf(char *, char *, struct protob *,
  83                         int (*)(int, struct netbuf, struct netconfig *),
  84                         int use_pmap, int sndbufsz, int rcvbufsz);
  85 extern void     do_one(char *, char *, struct protob *,
  86                         int (*)(int, struct netbuf, struct netconfig *),
  87                         int use_pmap);
  88 extern void     poll_for_action(void);
  89 
  90 #ifdef __cplusplus
  91 }
  92 #endif
  93 
  94 #endif  /* _NFS_TBIND_H */