/*****************************************************************************/
/* File name: Constants.java                                                 */
/* Purpose: contains constants for NFS mount service                         */
/*                                                                           */
/* Last modified: 11.07.99                                                   */
/* Author: Victor Klimov, 1999                                               */
/*                                                                           */
/* This program is distributed in the hope that it will be useful, but       */
/* WITHOUT ANY WARRANTY; without even the implied warranty of                */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General */
/* Public License for more details.                                          */
/*                                                                           */
/* This software is distributed under the terms                              */
/* of the GNU General Public License as published                            */
/* by the Free Software Foundation; either version 2, or (at your option)    */
/* any later version.                                                        */
/* See file COPYING for your rights (GNU GPL)                                */
/*****************************************************************************/

package mount;


public
interface

Constants
{

  /* $Header: /d/NFS/mount/RCS/Constants.java,v 1.5 1999/07/13 19:02:08 vklimov Exp $ */

  final static int MOUNT_PORT = 635;

  final static int MOUNTPROG = 100005;                  /* mount prog # */
  final static long MOUNT_VERS_LOW  = 1;           /* mount version low  */
  final static long MOUNT_VERS_HIGH = 1;           /* mount version high */
  final static long MOUNT_VERS = MOUNT_VERS_HIGH;

                                                       /* procedures */
  final static int MOUNTPROC_NULL = 0;   
  final static int MOUNTPROC_MNT = 1; 
  final static int MOUNTPROC_DUMP = 2;   
  final static int MOUNTPROC_UMNT = 3;
  final static int MOUNTPROC_UMNTALL = 4;
  final static int MOUNTPROC_EXPORT  = 5;

  final static int MNTPATHLEN = 1024;      /* The maximum number of bytes */
                                           /* in a pathname argument      */
  final static int MNTNAMLEN = 255;        /* The maximum number of bytes */
                                           /* in a name argument          */
  final static int FHSIZE = 32;        /* The size in bytes of the opaque */
                                       /* file handle                     */

  final static int UDP_PACKET_LENGTH = 256;
  final static int MOUNTPROC_MNT_REPLY_UDP_PACKET_DATA_LENGTH = 7 *
                     rpc.Constants.XDR_UNSIGNED_INT_LENGTH +
                     FHSIZE;
  final static int MOUNTPROC_DUMP_UDP_DATA_PREFIX_LENGTH = 6 *
                     rpc.Constants.XDR_UNSIGNED_INT_LENGTH;
  final static int MOUNTPROC_MNT_ERR_UDP_PACKET_DATA_LENGTH = 7 *
                     rpc.Constants.XDR_UNSIGNED_INT_LENGTH;
  final static int MOUNT_DUMP_REQUEST_UDP_PACKET_DATA_LENGTH = 10 *
                     rpc.Constants.XDR_UNSIGNED_INT_LENGTH;
  final static int MOUNT_REQUEST_UDP_PACKET_DATA_LENGTH = MNTPATHLEN + 10 *
                     rpc.Constants.XDR_UNSIGNED_INT_LENGTH;
  final static int HASHCODE_FOR_EMPTY = 0;

  final static int N_ENTRIES_MAX_DUMP_TO_GET = 37;
  final static int N_ENTRIES_MAX_DUMP_TO_SEND = 16;
  final static long END_OF_ENTRY_LIST_UNSIGNED_INT = 0;

  final static int N_BYTES_PER_MOUNT_ENTRY = MNTNAMLEN + MNTPATHLEN;
  final static int N_BYTES_PER_NULL_MOUNT_ENTRY = 2 *
                     rpc.Constants.XDR_UNSIGNED_INT_LENGTH;

  final static String ALL_THE_WORLD_GROUP_NAME = "world";
  final static String ALL_FILESYSTEMS_DIR_PATH = "*";

  final static int JAVA_LONG_N_BYTES = 8;

  final static long FILE_ID_NOT_VALID = 0;

  final static long FHSTATUS_OK = 0;

  final static String REGISTRY_SAVE_FILE_NAME = "mregistr";

  final static int TEST_MOUNT_PORT = 2027;

  final static int MNT_ERR_ENOENT = 2;       /* No such file or directory */
  final static int MNT_ERR_EMFILE = 24;      /* Too many open files       */
  final static int MNT_ERR_ENFILE = 23;      /* File table overflow       */

                                                                 /* 61 sec. */
  final static int MILLISECONDS_TO_WAIT_ON_ONE_TIME_UDP_RECEIVE = 61000;

  final static String PROPERTIES_FILE_PATH = "properties";

} /* end of Constants interface */

/*****************************************************************************/
/* End of file: Constants.java                                               */
/*****************************************************************************/
