/*****************************************************************************/
/* File name: Constants.java                                                 */
/* Purpose: contains constants for portmapping service                       */
/*                                                                           */
/* Last modified: 10.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 pm;


public
interface

Constants
{

  /* $Header: /d/NFS/pm/RCS/Constants.java,v 1.8 1999/07/13 19:02:04 vklimov Exp $ */

  final static int PORT_MAPPER_PORT = 111;

  final static int PMAP_PROG = 100000;                 /* portmapper prog # */
  final static long PMAP_VERS_LOW  = 2;           /* portmapper version low  */
  final static long PMAP_VERS_HIGH = 2;           /* portmapper version high */

                                                       /* procedures */
  final static int PMAPPROC_NULL    = 0;
  final static int PMAPPROC_SET     = 1;
  final static int PMAPPROC_UNSET   = 2;
  final static int PMAPPROC_GETPORT = 3;
  final static int PMAPPROC_DUMP    = 4;
  final static int PMAPPROC_CALLIT  = 5;

  final static int IPPROTO_TCP = 6;      /* protocol number for TCP/IP */
  final static int IPPROTO_UDP = 17;     /* protocol number for UDP/IP */

  final static int UDP_PACKET_LENGTH = 256;
  final static int PMAPPROC_SET_UDP_PACKET_DATA_LENGTH = 28;
  final static int PMAPPROC_DUMP_UDP_DATA_PREFIX_LENGTH = 24;
  final static int PORTMAPPER_DUMP_REQUEST_UDP_PACKET_DATA_LENGTH = 40;

  final static int N_BYTES_PER_MAPPING = 16;

  final static int HASHCODE_FOR_EMPTY = 0;

  final static long PORT_NOT_FOUND_NUMBER = 0;

  final static int N_MAPPINGS_MAX_DUMP_TO_GET = 100;
  final static long END_OF_MAPPING_LIST_UNSIGNED_INT = 0;

  final static int TEST_PORTMAPPER_PORT = 2037;

  final static String PROPERTIES_FILE_PATH = "properties";

} /* end of Constants interface */

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