more-or-less working with new proc & user structs
[unix-history] / usr / src / sys / nfs / xdr_subs.h
/*
* Copyright (c) 1989 The Regents of the University of California.
* All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Rick Macklem at The University of Guelph.
*
* %sccs.include.redist.c%
*
* @(#)xdr_subs.h 7.3 (Berkeley) %G%
*/
/*
* Macros used for conversion to/from xdr representation by nfs...
* These use the MACHINE DEPENDENT routines ntohl, htonl
* As defined by "XDR: External Data Representation Standard" RFC1014
*/
/* From xdr to machine */
#define fxdr_unsigned(t, v) ((t)ntohl((long)(v)))
#define fxdr_time(f, t) {((struct timeval *)(t))->tv_sec=ntohl( \
((struct timeval *)(f))->tv_sec); \
((struct timeval *)(t))->tv_usec=ntohl( \
((struct timeval *)(f))->tv_usec);}
/* from machine to xdr */
#define txdr_unsigned(v) (htonl((long)(v)))
#define txdr_time(f, t) {((struct timeval *)(t))->tv_sec=htonl( \
((struct timeval *)(f))->tv_sec); \
((struct timeval *)(t))->tv_usec=htonl( \
((struct timeval *)(f))->tv_usec);}