Documentation ¶
Index ¶
- Constants
- func NewClientCodec(conn io.ReadWriteCloser, table []ProcEntry) rpc.ClientCodec
- func NewServerCodec(conn io.ReadWriteCloser, table []ProcEntry) rpc.ServerCodec
- func ReadFullRecord(conn io.Reader) ([]byte, error)
- func WriteFullRecord(conn io.Writer, data []byte) (int64, error)
- type AcceptStat
- type AcceptedReply
- type AuthFlavor
- type AuthStat
- type CallBody
- type ErrProgMismatch
- type ErrRPCMismatch
- type MismatchReply
- type MsgType
- type OpaqueAuth
- type ProcEntry
- type RPCMsg
- type RejectStat
- type RejectedReply
- type ReplyBody
- type ReplyStat
Constants ¶
View Source
const RPCProtocolVersion = 2
Variables ¶
This section is empty.
Functions ¶
func NewClientCodec ¶
func NewClientCodec(conn io.ReadWriteCloser, table []ProcEntry) rpc.ClientCodec
func NewServerCodec ¶
func NewServerCodec(conn io.ReadWriteCloser, table []ProcEntry) rpc.ServerCodec
Types ¶
type AcceptStat ¶
type AcceptStat int32
const ( Success AcceptStat = iota // RPC executed successfully ProgMismatch // Remote can't support version number GarbageArgs // Procedure can't decode params SystemErr // Other errors )
type AcceptedReply ¶
type AcceptedReply struct { Verf OpaqueAuth Stat AcceptStat `xdr:"union"` MismatchInfoP MismatchReply `xdr:"unioncase=1"` // ProgUnavail MismatchInfoV MismatchReply `xdr:"unioncase=2"` // ProgMismatch }
type AuthFlavor ¶
type AuthFlavor int32
const ( AuthNone AuthFlavor = iota // No authentication AuthSys // Unix style AuthShort AuthDh AuthKerb AuthRSA RPCsecGss )
type CallBody ¶
type CallBody struct { RPCVersion uint32 // must be equal to 2 Program uint32 Version uint32 Procedure uint32 Cred OpaqueAuth Verf OpaqueAuth }
type ErrProgMismatch ¶
type ErrRPCMismatch ¶
type MismatchReply ¶
type OpaqueAuth ¶
type OpaqueAuth struct { Flavor AuthFlavor Body []byte }
type RejectStat ¶
type RejectStat int32
const ( RPCMismatch RejectStat = 0 // RPC version number != 2 AuthError RejectStat = 1 // Remote can't authenticate caller )
type RejectedReply ¶
type RejectedReply struct { Stat RejectStat `xdr:"union"` MismatchInfo MismatchReply `xdr:"unioncase=0"` // RPCMismatch AuthStat AuthStat `xdr:"unioncase=1"` // AuthError }
type ReplyBody ¶
type ReplyBody struct { Stat ReplyStat `xdr:"union"` Areply AcceptedReply `xdr:"unioncase=0"` Rreply RejectedReply `xdr:"unioncase=1"` }
Click to show internal directories.
Click to hide internal directories.