2 * Cf. /lib/rfc/rfc1014, /lib/rfc/rfc1050
26 * A reply to a call message can take on two forms:
27 * The message was either accepted or rejected.
37 * Given that a call message was accepted, the following is the
38 * status of an attempt to call a remote procedure.
42 SUCCESS = 0, /* RPC executed successfully */
43 PROG_UNAVAIL = 1, /* remote hasn't exported program */
44 PROG_MISMATCH = 2, /* remote can't support version # */
45 PROC_UNAVAIL = 3, /* program can't support procedure */
46 GARBAGE_ARGS = 4 /* procedure can't decode params */
50 * Reasons why a call message was rejected:
54 RPC_MISMATCH = 0, /* RPC version number != 2 */
55 AUTH_ERROR = 1 /* remote can't authenticate caller */
59 * Why authentication failed:
63 AUTH_BADCRED = 1, /* bad credentials (seal broken) */
64 AUTH_REJECTEDCRED = 2, /* client must begin new session */
65 AUTH_BADVERF = 3, /* bad verifier (seal broken) */
66 AUTH_REJECTEDVERF = 4, /* verifier expired or replayed */
67 AUTH_TOOWEAK = 5 /* rejected for security reasons */
72 IPPROTO_TCP = 6, /* protocol number for TCP/IP */
73 IPPROTO_UDP = 17 /* protocol number for UDP/IP */
76 #define ROUNDUP(n) ((n) + ((-(n))&3))
78 #define PLONG(x) (dataptr[3] = ((ulong)(x)), dataptr[2] = ((ulong)(x))>>8, dataptr[1] = ((ulong)(x))>>16, dataptr[0] = ((ulong)(x))>>24, dataptr += 4)
79 #define PPTR(x, n) (memmove(dataptr, (x), n), dataptr += ROUNDUP(n))
80 #define PBYTE(x) (*dataptr++ = (x))
82 #define GLONG() (argptr += 4, (((uchar*)argptr)[-1] | (((uchar*)argptr)[-2]<<8) | (((uchar*)argptr)[-3]<<16) | (((uchar*)argptr)[-4]<<24)))
83 #define GPTR(n) (void *)(argptr); argptr += ROUNDUP(n)
84 #define GBYTE() (argptr++, ((uchar*)argptr)[-1])