/* Machine generated file -- Do NOT edit */

#include <afsconfig.h>
#include <afs/param.h>
#include <roken.h>
#ifdef AFS_NT40_ENV
#define AFS_RXGEN_EXPORT __declspec(dllexport)
#endif /* AFS_NT40_ENV */
#include "ptint.h"



bool_t
xdr_prdebugentry(XDR *xdrs, prdebugentry *objp)
{
	if (!xdr_afs_int32(xdrs, &objp->flags)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->id)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->cellid)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->next)) {
		return (FALSE);
	}
	if (!xdr_vector(xdrs, (char *) objp->reserved, 5, sizeof(afs_int32), (xdrproc_t) xdr_afs_int32)) {
		return (FALSE);
	}
	if (!xdr_vector(xdrs, (char *) objp->entries, PRSIZE, sizeof(afs_int32), (xdrproc_t) xdr_afs_int32)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->nextID)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->nextname)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->owner)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->creator)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->ngroups)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->nusers)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->count)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->instance)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->owned)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->nextOwned)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->parent)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->sibling)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->child)) {
		return (FALSE);
	}
	if (!xdr_vector(xdrs, (char *) objp->name, PR_MAXNAMELEN, sizeof(char), (xdrproc_t) xdr_char)) {
		return (FALSE);
	}
	return (TRUE);
}




bool_t
xdr_prcheckentry(XDR *xdrs, prcheckentry *objp)
{
	if (!xdr_afs_int32(xdrs, &objp->flags)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->id)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->owner)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->creator)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->ngroups)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->nusers)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->count)) {
		return (FALSE);
	}
	if (!xdr_vector(xdrs, (char *) objp->reserved, 5, sizeof(afs_int32), (xdrproc_t) xdr_afs_int32)) {
		return (FALSE);
	}
	if (!xdr_vector(xdrs, (char *) objp->name, PR_MAXNAMELEN, sizeof(char), (xdrproc_t) xdr_char)) {
		return (FALSE);
	}
	return (TRUE);
}




bool_t
xdr_prlistentries(XDR *xdrs, prlistentries *objp)
{
	if (!xdr_afs_int32(xdrs, &objp->flags)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->id)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->owner)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->creator)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->ngroups)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->nusers)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->count)) {
		return (FALSE);
	}
	if (!xdr_vector(xdrs, (char *) objp->reserved, 5, sizeof(afs_int32), (xdrproc_t) xdr_afs_int32)) {
		return (FALSE);
	}
	if (!xdr_vector(xdrs, (char *) objp->name, PR_MAXNAMELEN, sizeof(char), (xdrproc_t) xdr_char)) {
		return (FALSE);
	}
	return (TRUE);
}




bool_t
xdr_PrUpdateEntry(XDR *xdrs, PrUpdateEntry *objp)
{
	if (!xdr_afs_uint32(xdrs, &objp->Mask)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->flags)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->id)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->owner)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->creator)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->ngroups)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->nusers)) {
		return (FALSE);
	}
	if (!xdr_afs_int32(xdrs, &objp->count)) {
		return (FALSE);
	}
	if (!xdr_vector(xdrs, (char *) objp->reserved, 5, sizeof(afs_int32), (xdrproc_t) xdr_afs_int32)) {
		return (FALSE);
	}
	if (!xdr_vector(xdrs, (char *) objp->name, PR_MAXNAMELEN, sizeof(char), (xdrproc_t) xdr_char)) {
		return (FALSE);
	}
	return (TRUE);
}


#define PR_SF_ALLBITS 0xff /* set all access bits */
#define PR_SF_NGROUPS (1u<<31) /* set field limiting group creation */
#define PR_SF_NUSERS (1u<<30) /*  "  "  foreign users  "  */


bool_t
xdr_prname(XDR *xdrs, prname *objp)
{
	if (!xdr_vector(xdrs, (char *) objp, PR_MAXNAMELEN, sizeof(char), (xdrproc_t) xdr_char)) {
		return (FALSE);
	}
	return (TRUE);
}




bool_t
xdr_namelist(XDR *xdrs, namelist *objp)
{
	if (!xdr_array(xdrs, (caddr_t *)&objp->namelist_val, &objp->namelist_len, OPENAFS_MAXPRLIST, sizeof(prname), (xdrproc_t) xdr_prname)) {
		return (FALSE);
	}
	return (TRUE);
}




bool_t
xdr_idlist(XDR *xdrs, idlist *objp)
{
	if (!xdr_array(xdrs, (caddr_t *)&objp->idlist_val, &objp->idlist_len, OPENAFS_MAXPRLIST, sizeof(afs_int32), (xdrproc_t) xdr_afs_int32)) {
		return (FALSE);
	}
	return (TRUE);
}




bool_t
xdr_prlist(XDR *xdrs, prlist *objp)
{
	if (!xdr_array(xdrs, (caddr_t *)&objp->prlist_val, &objp->prlist_len, OPENAFS_MAXPRLIST, sizeof(afs_int32), (xdrproc_t) xdr_afs_int32)) {
		return (FALSE);
	}
	return (TRUE);
}




bool_t
xdr_prentries(XDR *xdrs, prentries *objp)
{
	if (!xdr_array(xdrs, (caddr_t *)&objp->prentries_val, &objp->prentries_len, OPENAFS_MAXPRLIST, sizeof(prlistentries), (xdrproc_t) xdr_prlistentries)) {
		return (FALSE);
	}
	return (TRUE);
}


AFS_RXGEN_EXPORT
const char *PR_function_names[] = {
	"PR_INewEntry",
	"PR_WhereIsIt",
	"PR_DumpEntry",
	"PR_AddToGroup",
	"PR_NameToID",
	"PR_IDToName",
	"PR_Delete",
	"PR_RemoveFromGroup",
	"PR_GetCPS",
	"PR_NewEntry",
	"PR_ListMax",
	"PR_SetMax",
	"PR_ListEntry",
	"PR_ChangeEntry",
	"PR_ListElements",
	"PR_IsAMemberOf",
	"PR_SetFieldsEntry",
	"PR_ListOwned",
	"PR_GetCPS2",
	"PR_GetHostCPS",
	"PR_UpdateEntry",
	"PR_ListEntries",
	"PR_ListSuperGroups"
};
char *PR_TranslateOpCode(int op)
{
	switch (op) {
		case 500:	return "PR_INewEntry";
		case 501:	return "PR_WhereIsIt";
		case 502:	return "PR_DumpEntry";
		case 503:	return "PR_AddToGroup";
		case 504:	return "PR_NameToID";
		case 505:	return "PR_IDToName";
		case 506:	return "PR_Delete";
		case 507:	return "PR_RemoveFromGroup";
		case 508:	return "PR_GetCPS";
		case 509:	return "PR_NewEntry";
		case 510:	return "PR_ListMax";
		case 511:	return "PR_SetMax";
		case 512:	return "PR_ListEntry";
		case 513:	return "PR_ChangeEntry";
		case 514:	return "PR_ListElements";
		case 515:	return "PR_IsAMemberOf";
		case 516:	return "PR_SetFieldsEntry";
		case 517:	return "PR_ListOwned";
		case 518:	return "PR_GetCPS2";
		case 519:	return "PR_GetHostCPS";
		case 520:	return "PR_UpdateEntry";
		case 521:	return "PR_ListEntries";
		case 530:	return "PR_ListSuperGroups";
		default:
			return NULL;
	}
}
int PR_OpCodeIndex(int op)
{
	switch (op) {
		case 500:	return 0;
		case 501:	return 1;
		case 502:	return 2;
		case 503:	return 3;
		case 504:	return 4;
		case 505:	return 5;
		case 506:	return 6;
		case 507:	return 7;
		case 508:	return 8;
		case 509:	return 9;
		case 510:	return 10;
		case 511:	return 11;
		case 512:	return 12;
		case 513:	return 13;
		case 514:	return 14;
		case 515:	return 15;
		case 516:	return 16;
		case 517:	return 17;
		case 518:	return 18;
		case 519:	return 19;
		case 520:	return 20;
		case 521:	return 21;
		case 530:	return 22;
		default:
			return -1;
	}
}
