SunRPCType.mesa
Demers, October 9, 1987 6:20:36 pm PDT
SunRPCType:
CEDAR
DEFINITIONS
~ {
Parameters
rpcVersion:
CARD ~ 2;
Authentication
AuthFlavor:
TYPE ~
MACHINE
DEPENDENT {
authNull(0),
authUnix(1),
authShort(2),
last(
CARDINAL.
LAST)
};
<<
OpaqueAuth:
TYPE ~ [
authFlavor:
CARD,
authBody:
COUNTED
ARRAY [0..256)
OF
CHAR
];
AuthNull:
TYPE ~
RECORD [
];
AuthUnix:
TYPE ~
RECORD [
stamp:
CARD,
machineName:
COUNTED
ARRAY [0..256)
OF
CHAR,
uid:
CARD,
gid:
CARD,
gids:
COUNTED
ARRAY [0..10)
OF
CARD
];
>>
RPC Messages
MsgType:
TYPE ~
MACHINE
DEPENDENT {
call(0),
reply(1)
};
ReplyStat:
TYPE ~
MACHINE
DEPENDENT {
msgAccepted(0),
msgDenied(1)
};
AcceptStat:
TYPE ~
MACHINE
DEPENDENT {
success(0),
progUnavail(1),
progMismatch(2),
procUnavail(3),
garbageArgs(4)
};
RejectStat:
TYPE ~
MACHINE
DEPENDENT {
rpcMismatch(0),
authError(1)
};
AuthStat:
TYPE ~
MACHINE
DEPENDENT {
authBadcred(1),
authRejectedcred(2),
authBadverf(3),
authRejectedverf(4),
authTooweak(5)
};
<<
RpcMsg:
TYPE ~
RECORD [
xid:
CARD,
SELECT msgType: MsgType
FROM
call => [call: CallBody],
reply => [reply: ReplyBody]
ENDCASE
];
CallBody:
TYPE ~
RECORD [
rpcvers:
CARD,
prog:
CARD,
vers:
CARD,
proc:
CARD,
cred: OpaqueAuth,
verf: OpaqueAuth
];
ReplyBody:
TYPE ~
RECORD [
SELECT replyStat: ReplyStat
FROM
msgAccepted => [msgAccepted: AcceptedReply],
msgDenied => [msgDenied: RejectedReply]
ENDCASE
];
AcceptedReply:
TYPE ~
RECORD [
verf: OpaqueAuth,
SELECT acceptStat: AcceptStat
FROM
success => [success: ProcedureSpecificResults],
progMismatch => [low:
CARD, high:
CARD],
ENDCASE => []
];
RejectedReply:
TYPE ~
RECORD [
SELECT rejectStat: RejectStat
FROM
rpcMismatch => [low:
CARD, high:
CARD],
authError => [authError: AuthStat]
ENDCASE
];
>>
}...