openssh

package
v1.13.6 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2023 License: BSD-2-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package openssh implements the openssh secsh-filexfer extensions as described in https://github.com/openssh/openssh-portable/blob/master/PROTOCOL

Index

Constants

View Source
const (
	MountFlagsReadOnly = 0x1 // SSH_FXE_STATVFS_ST_RDONLY
	MountFlagsNoSUID   = 0x2 // SSH_FXE_STATVFS_ST_NOSUID
)

The values for the MountFlags field. https://github.com/openssh/openssh-portable/blob/master/PROTOCOL

Variables

This section is empty.

Functions

func ExtensionFStatVFS

func ExtensionFStatVFS() *sshfx.ExtensionPair

ExtensionFStatVFS returns an ExtensionPair suitable to append into an sshfx.InitPacket or sshfx.VersionPacket.

func ExtensionFSync

func ExtensionFSync() *sshfx.ExtensionPair

ExtensionFSync returns an ExtensionPair suitable to append into an sshfx.InitPacket or sshfx.VersionPacket.

func ExtensionHardlink() *sshfx.ExtensionPair

ExtensionHardlink returns an ExtensionPair suitable to append into an sshfx.InitPacket or sshfx.VersionPacket.

func ExtensionPOSIXRename added in v1.13.6

func ExtensionPOSIXRename() *sshfx.ExtensionPair

ExtensionPOSIXRename returns an ExtensionPair suitable to append into an sshfx.InitPacket or sshfx.VersionPacket.

func ExtensionStatVFS

func ExtensionStatVFS() *sshfx.ExtensionPair

ExtensionStatVFS returns an ExtensionPair suitable to append into an sshfx.InitPacket or sshfx.VersionPacket.

func RegisterExtensionFStatVFS

func RegisterExtensionFStatVFS()

RegisterExtensionFStatVFS registers the "[email protected]" extended packet with the encoding/ssh/filexfer package.

func RegisterExtensionFSync

func RegisterExtensionFSync()

RegisterExtensionFSync registers the "[email protected]" extended packet with the encoding/ssh/filexfer package.

func RegisterExtensionHardlink()

RegisterExtensionHardlink registers the "[email protected]" extended packet with the encoding/ssh/filexfer package.

func RegisterExtensionPOSIXRename added in v1.13.6

func RegisterExtensionPOSIXRename()

RegisterExtensionPOSIXRename registers the "[email protected]" extended packet with the encoding/ssh/filexfer package.

func RegisterExtensionStatVFS

func RegisterExtensionStatVFS()

RegisterExtensionStatVFS registers the "[email protected]" extended packet with the encoding/ssh/filexfer package.

Types

type FStatVFSExtendedPacket

type FStatVFSExtendedPacket struct {
	Path string
}

FStatVFSExtendedPacket defines the [email protected] extend packet.

func (*FStatVFSExtendedPacket) MarshalBinary

func (ep *FStatVFSExtendedPacket) MarshalBinary() ([]byte, error)

MarshalBinary encodes ep into the binary encoding of the [email protected] extended packet-specific data.

NOTE: This _only_ encodes the packet-specific data, it does not encode the full extended packet.

func (*FStatVFSExtendedPacket) MarshalInto

func (ep *FStatVFSExtendedPacket) MarshalInto(buf *sshfx.Buffer)

MarshalInto encodes ep into the binary encoding of the [email protected] extended packet-specific data.

func (*FStatVFSExtendedPacket) MarshalPacket

func (ep *FStatVFSExtendedPacket) MarshalPacket(reqid uint32, b []byte) (header, payload []byte, err error)

MarshalPacket returns ep as a two-part binary encoding of the full extended packet.

func (*FStatVFSExtendedPacket) Type

Type returns the SSH_FXP_EXTENDED packet type.

func (*FStatVFSExtendedPacket) UnmarshalBinary

func (ep *FStatVFSExtendedPacket) UnmarshalBinary(data []byte) (err error)

UnmarshalBinary decodes the [email protected] extended packet-specific data into ep.

func (*FStatVFSExtendedPacket) UnmarshalFrom

func (ep *FStatVFSExtendedPacket) UnmarshalFrom(buf *sshfx.Buffer) (err error)

UnmarshalFrom decodes the [email protected] extended packet-specific data into ep.

type FSyncExtendedPacket

type FSyncExtendedPacket struct {
	Handle string
}

FSyncExtendedPacket defines the [email protected] extend packet.

func (*FSyncExtendedPacket) MarshalBinary

func (ep *FSyncExtendedPacket) MarshalBinary() ([]byte, error)

MarshalBinary encodes ep into the binary encoding of the [email protected] extended packet-specific data.

NOTE: This _only_ encodes the packet-specific data, it does not encode the full extended packet.

func (*FSyncExtendedPacket) MarshalInto

func (ep *FSyncExtendedPacket) MarshalInto(buf *sshfx.Buffer)

MarshalInto encodes ep into the binary encoding of the [email protected] extended packet-specific data.

func (*FSyncExtendedPacket) MarshalPacket

func (ep *FSyncExtendedPacket) MarshalPacket(reqid uint32, b []byte) (header, payload []byte, err error)

MarshalPacket returns ep as a two-part binary encoding of the full extended packet.

func (*FSyncExtendedPacket) Type

Type returns the SSH_FXP_EXTENDED packet type.

func (*FSyncExtendedPacket) UnmarshalBinary

func (ep *FSyncExtendedPacket) UnmarshalBinary(data []byte) (err error)

UnmarshalBinary decodes the [email protected] extended packet-specific data into ep.

func (*FSyncExtendedPacket) UnmarshalFrom

func (ep *FSyncExtendedPacket) UnmarshalFrom(buf *sshfx.Buffer) (err error)

UnmarshalFrom decodes the [email protected] extended packet-specific data from buf.

type HardlinkExtendedPacket

type HardlinkExtendedPacket struct {
	OldPath string
	NewPath string
}

HardlinkExtendedPacket defines the [email protected] extend packet.

func (*HardlinkExtendedPacket) MarshalBinary

func (ep *HardlinkExtendedPacket) MarshalBinary() ([]byte, error)

MarshalBinary encodes ep into the binary encoding of the [email protected] extended packet-specific data.

NOTE: This _only_ encodes the packet-specific data, it does not encode the full extended packet.

func (*HardlinkExtendedPacket) MarshalInto

func (ep *HardlinkExtendedPacket) MarshalInto(buf *sshfx.Buffer)

MarshalInto encodes ep into the binary encoding of the [email protected] extended packet-specific data.

func (*HardlinkExtendedPacket) MarshalPacket

func (ep *HardlinkExtendedPacket) MarshalPacket(reqid uint32, b []byte) (header, payload []byte, err error)

MarshalPacket returns ep as a two-part binary encoding of the full extended packet.

func (*HardlinkExtendedPacket) Type

Type returns the SSH_FXP_EXTENDED packet type.

func (*HardlinkExtendedPacket) UnmarshalBinary

func (ep *HardlinkExtendedPacket) UnmarshalBinary(data []byte) (err error)

UnmarshalBinary decodes the [email protected] extended packet-specific data into ep.

func (*HardlinkExtendedPacket) UnmarshalFrom

func (ep *HardlinkExtendedPacket) UnmarshalFrom(buf *sshfx.Buffer) (err error)

UnmarshalFrom decodes the [email protected] extended packet-specific data from buf.

type POSIXRenameExtendedPacket added in v1.13.6

type POSIXRenameExtendedPacket struct {
	OldPath string
	NewPath string
}

POSIXRenameExtendedPacket defines the [email protected] extend packet.

func (*POSIXRenameExtendedPacket) MarshalBinary added in v1.13.6

func (ep *POSIXRenameExtendedPacket) MarshalBinary() ([]byte, error)

MarshalBinary encodes ep into the binary encoding of the [email protected] extended packet-specific data.

NOTE: This _only_ encodes the packet-specific data, it does not encode the full extended packet.

func (*POSIXRenameExtendedPacket) MarshalInto added in v1.13.6

func (ep *POSIXRenameExtendedPacket) MarshalInto(buf *sshfx.Buffer)

MarshalInto encodes ep into the binary encoding of the [email protected] extended packet-specific data.

func (*POSIXRenameExtendedPacket) MarshalPacket added in v1.13.6

func (ep *POSIXRenameExtendedPacket) MarshalPacket(reqid uint32, b []byte) (header, payload []byte, err error)

MarshalPacket returns ep as a two-part binary encoding of the full extended packet.

func (*POSIXRenameExtendedPacket) Type added in v1.13.6

Type returns the SSH_FXP_EXTENDED packet type.

func (*POSIXRenameExtendedPacket) UnmarshalBinary added in v1.13.6

func (ep *POSIXRenameExtendedPacket) UnmarshalBinary(data []byte) (err error)

UnmarshalBinary decodes the [email protected] extended packet-specific data into ep.

func (*POSIXRenameExtendedPacket) UnmarshalFrom added in v1.13.6

func (ep *POSIXRenameExtendedPacket) UnmarshalFrom(buf *sshfx.Buffer) (err error)

UnmarshalFrom decodes the [email protected] extended packet-specific data from buf.

type StatVFSExtendedPacket

type StatVFSExtendedPacket struct {
	Path string
}

StatVFSExtendedPacket defines the [email protected] extend packet.

func (*StatVFSExtendedPacket) MarshalBinary

func (ep *StatVFSExtendedPacket) MarshalBinary() ([]byte, error)

MarshalBinary encodes ep into the binary encoding of the [email protected] extended packet-specific data.

NOTE: This _only_ encodes the packet-specific data, it does not encode the full extended packet.

func (*StatVFSExtendedPacket) MarshalInto

func (ep *StatVFSExtendedPacket) MarshalInto(buf *sshfx.Buffer)

MarshalInto encodes ep into the binary encoding of the [email protected] extended packet-specific data.

func (*StatVFSExtendedPacket) MarshalPacket

func (ep *StatVFSExtendedPacket) MarshalPacket(reqid uint32, b []byte) (header, payload []byte, err error)

MarshalPacket returns ep as a two-part binary encoding of the full extended packet.

func (*StatVFSExtendedPacket) Type

Type returns the SSH_FXP_EXTENDED packet type.

func (*StatVFSExtendedPacket) UnmarshalBinary

func (ep *StatVFSExtendedPacket) UnmarshalBinary(data []byte) (err error)

UnmarshalBinary decodes the [email protected] extended packet-specific data into ep.

func (*StatVFSExtendedPacket) UnmarshalFrom

func (ep *StatVFSExtendedPacket) UnmarshalFrom(buf *sshfx.Buffer) (err error)

UnmarshalFrom decodes the [email protected] extended packet-specific data into ep.

type StatVFSExtendedReplyPacket

type StatVFSExtendedReplyPacket struct {
	BlockSize     uint64 /* f_bsize:   file system block size */
	FragmentSize  uint64 /* f_frsize:  fundamental fs block size / fagment size */
	Blocks        uint64 /* f_blocks:  number of blocks (unit f_frsize) */
	BlocksFree    uint64 /* f_bfree:   free blocks in filesystem */
	BlocksAvail   uint64 /* f_bavail:  free blocks for non-root */
	Files         uint64 /* f_files:   total file inodes */
	FilesFree     uint64 /* f_ffree:   free file inodes */
	FilesAvail    uint64 /* f_favail:  free file inodes for to non-root */
	FilesystemID  uint64 /* f_fsid:    file system id */
	MountFlags    uint64 /* f_flag:    bit mask of mount flag values */
	MaxNameLength uint64 /* f_namemax: maximum filename length */
}

StatVFSExtendedReplyPacket defines the extended reply packet for [email protected] and [email protected] requests.

func (*StatVFSExtendedReplyPacket) MarshalBinary

func (ep *StatVFSExtendedReplyPacket) MarshalBinary() ([]byte, error)

MarshalBinary encodes ep into the binary encoding of the (f)[email protected] extended reply packet-specific data.

NOTE: This _only_ encodes the packet-specific data, it does not encode the full extended reply packet.

func (*StatVFSExtendedReplyPacket) MarshalInto

func (ep *StatVFSExtendedReplyPacket) MarshalInto(buf *sshfx.Buffer)

MarshalInto encodes ep into the binary encoding of the (f)[email protected] extended reply packet-specific data.

func (*StatVFSExtendedReplyPacket) MarshalPacket

func (ep *StatVFSExtendedReplyPacket) MarshalPacket(reqid uint32, b []byte) (header, payload []byte, err error)

MarshalPacket returns ep as a two-part binary encoding of the full extended reply packet.

func (*StatVFSExtendedReplyPacket) Type

Type returns the SSH_FXP_EXTENDED_REPLY packet type.

func (*StatVFSExtendedReplyPacket) UnmarshalBinary

func (ep *StatVFSExtendedReplyPacket) UnmarshalBinary(data []byte) (err error)

UnmarshalBinary decodes the [email protected] extended reply packet-specific data into ep.

func (*StatVFSExtendedReplyPacket) UnmarshalFrom

func (ep *StatVFSExtendedReplyPacket) UnmarshalFrom(buf *sshfx.Buffer) (err error)

UnmarshalFrom decodes the [email protected] extended reply packet-specific data into ep.

func (*StatVFSExtendedReplyPacket) UnmarshalPacketBody

func (ep *StatVFSExtendedReplyPacket) UnmarshalPacketBody(buf *sshfx.Buffer) (err error)

UnmarshalPacketBody returns ep as a two-part binary encoding of the full extended reply packet.

Jump to

Keyboard shortcuts

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