/*****************************************************************************/
/* File name: Constants.java                                                 */
/* Purpose: contains useful RPC constants                                    */
/*                                                                           */
/* Last modified: 06.08.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 rpc;


public
interface

Constants
{

  /* $Header: /d/NFS/rpc/RCS/Constants.java,v 1.5 1999/08/07 19:23:42 vklimov Exp $ */

  final static long LOWEST_RPC_PROTOCOL_VERSION_SUPPORTED = 2;
  final static long HIGHEST_RPC_PROTOCOL_VERSION_SUPPORTED = 2;

  final static long RPC_CALL = 0;
  final static long RPC_REPLY = 1;
                   
  final static long MSG_ACCEPTED = 0;
  final static long MSG_DENIED   = 1;
                   
  final static long RPC_MISMATCH = 0;  /* server doesnt support        */
                                      /* this version of RPC protocol */
  final static long AUTH_ERROR = 1;    /* remote can't authenticate caller */
                   
  final static int AUTH_BADCRED      = 1;  /* bad credentials (seal broken) */
  final static int AUTH_REJECTEDCRED = 2;  /* client must begin new session */
  final static int AUTH_BADVERF      = 3;  /* bad verifier (seal broken)    */
  final static int AUTH_REJECTEDVERF = 4;  /* verifier expired or replayed  */
  final static int AUTH_TOOWEAK      = 5;  /* rejected for security reasons */

                                                       /* auth_flavor */
  final static long AUTH_NULL       = 0;
  final static long AUTH_UNIX       = 1;
  final static long AUTH_SHORT      = 2;
  final static long AUTH_DES        = 3;

                                                       /* accept_stat */
  final static long SUCCESS       = 0; /* RPC executed successfully       */
  final static long PROG_UNAVAIL  = 1; /* remote hasn't exported program  */
  final static long PROG_MISMATCH = 2; /* remote can't support version #  */
  final static long PROC_UNAVAIL  = 3; /* program can't support procedure */
  final static long GARBAGE_ARGS  = 4; /* procedure can't decode params   */

  final static String LOCAL_LOOP_IP_ADDRESS = "127.0.0.1";
  final static int    XDR_UNSIGNED_INT_LENGTH = 4;

  final static int    VERSION_MISMATCH_UDP_PACKET_DATA_LENGTH = 24;

  final static int PROGRAM_UNAVAILABLE_UDP_PACKET_DATA_LENGTH = 24;
  final static int PROC_NULL_UDP_PACKET_DATA_LENGTH = 28;
  final static int PROGRAM_MISMATCH_UDP_PACKET_DATA_LENGTH = 32;
  
  final static String LOG_MESSAGES_FLAG_PROPERTY = "log.messages";
  final static String LOG_TRANSACTIONS_FLAG_PROPERTY = "log.transactions";
  final static String LOG_MESSAGES_FILE_NAME_PROPERTY = "log.file";
  final static String TIME_ZONE_PROPERTY              = "time.zone";
  final static String CACHE_DIR_PROPERTY              = "cache.dir";
  final static String LOG_MESSAGES_FLAG_YES_STRING = "yes";

} /* end of Constants interface */

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