/*
 * $RCSfile: prottbl.h,v $
 *
 * x-kernel v3.3
 *
 * Copyright (c) 1993,1991,1990,1996  Arizona Board of Regents
 *
 * $Log: prottbl.h,v $
 * Revision 1.2  1996/01/29 20:25:55  slm
 * Updated copyright and version.
 *
 * Revision 1.1  1995/07/28  21:29:10  slm
 * Initial revision
 *
 * Revision 1.9.1.1.1.1  1994/10/27  20:48:08  hkaram
 * New branch
 *
 * Revision 1.9.1.1  1994/04/19  00:21:20  menze
 * prottbl functions now use 32-bit ProtId
 *
 * Revision 1.9  1993/12/15  23:06:15  menze
 * Modifications from UMass:
 *
 *   [ 93/07/27          yates ]
 *   added relProtNumById() function
 */

/* 
 * Interface to the protocol table utility
 */

#ifndef prottbl_h
#define prottbl_h

#ifndef upi_h
#include <upi.h>
#endif

#ifndef platform_h
#include "platform.h"
#endif

typedef xk_int32 ProtId;
#define PROTID_HEX_FORMAT XK_INT32_HEX_FORMAT
#define PROTID_DEC_FORMAT XK_INT32_DEC_FORMAT

/* 
 * return the protocol id number of the protocol by looking in the table.
 * If no entry for this protocol exists, -1 is returned.
 */
#ifdef __STDC__
extern ProtId protTblGetId(char *protocolName);
#else
extern ProtId protTblGetId();
#endif

/* 
 * relProtNum -- return the number of hlp relative to llp.  If this
 * number can not be determined from the table, -1 is returned.  This
 * should be considered an error.
 */
#ifdef __STDC__
extern ProtId relProtNum(Protl, Protl);
#else
extern ProtId relProtNum();
#endif

/* 
 * relProtNumById -- return the number of protocol with ID hlpId relative 
 * to llp.  If this number can not be determined from the table, -1 is 
 * returned.  This should be considered an error.
 */
#ifdef __STDC__
extern ProtId relProtNumById(ProtId, Protl);
#else
extern ProtId relProtNumById();
#endif

extern void prottbl_init(void);

#ifdef XK_DEBUG

/* Display the contents of the protocol table map */
#ifdef __STDC__
void protTblDisplayMap(void);
#else
void protTblDisplayMap();
#endif

#endif  /* XK_DEBUG */

#endif /* !prottbl_h */
