2 * Copyright 2012 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
6 * Paweł Dziepak, pdziepak@quarnos.org
13 #include <util/kernel_cpp.h>
27 Call::Create(uint32 proc
, const Auth
* creds
, const Auth
* ver
)
29 ASSERT(creds
!= NULL
);
32 Call
* call
= new(std::nothrow
) Call
;
36 // XID will be determined and set by RPC::Server
37 call
->fXIDPosition
= call
->fStream
.Current();
38 call
->fStream
.AddUInt(0);
40 call
->fStream
.AddInt(CALL
);
41 call
->fStream
.AddUInt(VERSION
);
42 call
->fStream
.AddUInt(PROGRAM_NFS
);
43 call
->fStream
.AddUInt(NFS_VERSION
);
44 call
->fStream
.AddUInt(proc
);
46 call
->fStream
.Append(creds
->Stream());
49 call
->fStream
.Append(ver
->Stream());
52 if (call
->fStream
.Error() != B_OK
) {
67 Call::SetXID(uint32 xid
)
69 fStream
.InsertUInt(fXIDPosition
, xid
);