rpc

package
v0.0.0-...-b3f7bda Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PmapPort = 111
	PmapVers = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AcceptStatus

type AcceptStatus uint32
const (
	Success AcceptStatus = iota
	ProgUnavail
	ProgMismatch
	ProcUnavail
	GarbageArgs
	SystemErr
)

type Auth

type Auth struct {
	Flavor uint32
	Body   []byte
}
var AuthNull Auth

type Base

type Base struct {
	Xid        uint32
	CurMsgType MessageType
}

type MessageType

type MessageType uint32
const (
	RpcCall  MessageType = 0
	RpcReply MessageType = 1
)

func (MessageType) String

func (self MessageType) String() string

type MountProcedure

type MountProcedure uint32

MountProcedure is the valid RPC calls for the mount service.

const (
	MountProcNull MountProcedure = iota
	MountProcMount
	MountProcDump
	MountProcUmnt
	MountProcUmntAll
	MountProcExport
)

MountProcedure Codes

func (MountProcedure) String

func (m MountProcedure) String() string

type MountStat3

type MountStat3 uint32
const (
	MNT3_OK             MountStat3 = iota   // success
	MNT3ERR_PERM                            // Not owner
	MNT3ERR_NOENT                           // No such file or directory
	MNT3ERR_IO          MountStat3 = 5      // I/O error
	MNT3ERR_ACCES       MountStat3 = 12     // Permission denied
	MNT3ERR_NOTDIR      MountStat3 = 13     // Not a directory
	MNT3ERR_INVAL       MountStat3 = 22     // Invalid argument
	MNT3ERR_NAMETOOLONG MountStat3 = 63     // Filename too long
	MNT3ERR_NOTSUPP     MountStat3 = 10004  // Operation not supported
	MNT3ERR_SERVERFAULT MountStat3 = 100006 // A failure on the server

)

type NfsVersion

type NfsVersion uint32
const (
	NfsV2 NfsVersion = 2
	NfsV3 NfsVersion = 3
	NfsV4 NfsVersion = 4
)

func (NfsVersion) String

func (self NfsVersion) String() string

type PortmapProcedure

type PortmapProcedure uint32
const (
	PortmapProcNull    PortmapProcedure = 0
	PortmapProcGetPort PortmapProcedure = 3
)

PortmapProcedure

func (PortmapProcedure) String

func (m PortmapProcedure) String() string

type ProgramType

type ProgramType uint32
const (
	PortmapID      ProgramType = 100000
	NfsServiceID   ProgramType = 100003
	MountServiceID ProgramType = 100005
)

func (ProgramType) String

func (p ProgramType) String() string

type RepHeader

type RepHeader struct {
	State  uint32
	Verf   Auth
	Status AcceptStatus
}

type ReqHeader

type ReqHeader struct {
	Rpcvers   uint32      // rpc版本号,固定为2
	Program   ProgramType // 类型
	ProgVers  uint32      //
	Procedure uint32
	Cred      Auth
	Verf      Auth
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL