/* -*-  mode:c; tab-width:8; c-basic-offset:8; indent-tabs-mode:nil;  -*- */
/*
 * Please do not edit this file.
 * It was generated using rpcgen.
 */

#include "rpcbind_data.h"

uint32_t
zdr_mapping (ZDR *zdrs, mapping *objp)
{
	


	if (zdrs->x_op == ZDR_ENCODE) {
		 if (!zdr_pointer (zdrs, (char **)&objp->next, sizeof (mapping), (zdrproc_t) zdr_mapping))
			 return FALSE;
		int32_t *buf;
		buf = ZDR_INLINE (zdrs, 3 * BYTES_PER_ZDR_UNIT);
		if (buf == NULL) {
			 if (!zdr_u_int (zdrs, &objp->port))
				 return FALSE;
			 if (!zdr_u_int (zdrs, &objp->prog))
				 return FALSE;
			 if (!zdr_u_int (zdrs, &objp->vers))
				 return FALSE;

		} else {
		IZDR_PUT_U_LONG(buf, objp->port);
		IZDR_PUT_U_LONG(buf, objp->prog);
		IZDR_PUT_U_LONG(buf, objp->vers);
		}
		 if (!zdr_string (zdrs, &objp->netid, ~0))
			 return FALSE;
		 if (!zdr_string (zdrs, &objp->addr, ~0))
			 return FALSE;
		 if (!zdr_string (zdrs, &objp->owner, ~0))
			 return FALSE;
		return TRUE;
	} else if (zdrs->x_op == ZDR_DECODE) {
		 if (!zdr_pointer (zdrs, (char **)&objp->next, sizeof (mapping), (zdrproc_t) zdr_mapping))
			 return FALSE;
		int32_t *buf;
		buf = ZDR_INLINE (zdrs, 3 * BYTES_PER_ZDR_UNIT);
		if (buf == NULL) {
			 if (!zdr_u_int (zdrs, &objp->port))
				 return FALSE;
			 if (!zdr_u_int (zdrs, &objp->prog))
				 return FALSE;
			 if (!zdr_u_int (zdrs, &objp->vers))
				 return FALSE;

		} else {
		objp->port = IZDR_GET_U_LONG(buf);
		objp->prog = IZDR_GET_U_LONG(buf);
		objp->vers = IZDR_GET_U_LONG(buf);
		}
		 if (!zdr_string (zdrs, &objp->netid, ~0))
			 return FALSE;
		 if (!zdr_string (zdrs, &objp->addr, ~0))
			 return FALSE;
		 if (!zdr_string (zdrs, &objp->owner, ~0))
			 return FALSE;
	 return TRUE;
	}

	 if (!zdr_pointer (zdrs, (char **)&objp->next, sizeof (mapping), (zdrproc_t) zdr_mapping))
		 return FALSE;
	 if (!zdr_u_int (zdrs, &objp->port))
		 return FALSE;
	 if (!zdr_u_int (zdrs, &objp->prog))
		 return FALSE;
	 if (!zdr_u_int (zdrs, &objp->vers))
		 return FALSE;
	 if (!zdr_string (zdrs, &objp->netid, ~0))
		 return FALSE;
	 if (!zdr_string (zdrs, &objp->addr, ~0))
		 return FALSE;
	 if (!zdr_string (zdrs, &objp->owner, ~0))
		 return FALSE;
	return TRUE;
}

uint32_t
zdr_mapping_ptr (ZDR *zdrs, mapping_ptr *objp)
{
	

	 if (!zdr_pointer (zdrs, (char **)objp, sizeof (mapping), (zdrproc_t) zdr_mapping))
		 return FALSE;
	return TRUE;
}
