Documentation ¶
Overview ¶
nolint
nolint
Index ¶
- Constants
- Variables
- type Header
- type NegotiateReq
- type NegotiateRes
- type Options
- type Session
- func (s *Session) Close()
- func (s *Session) Debug(msg string, err error)
- func (s *Session) NegotiateProtocol() error
- func (s *Session) NewNegotiateReq() NegotiateReq
- func (s *Session) NewSessionSetup1Req() (SessionSetup1Req, error)
- func (s *Session) NewSessionSetup2Req() (SessionSetup2Req, error)
- func (s *Session) NewTreeConnectReq(name string) (TreeConnectReq, error)
- func (s *Session) NewTreeDisconnectReq(treeId uint32) (TreeDisconnectReq, error)
- func (s *Session) TreeConnect(name string) error
- func (s *Session) TreeDisconnect(name string) error
- type SessionSetup1Req
- type SessionSetup1Res
- type SessionSetup2Req
- type SessionSetup2Res
- type TreeConnectReq
- type TreeConnectRes
- type TreeDisconnectReq
- type TreeDisconnectRes
Constants ¶
View Source
const ( CommandNegotiate uint16 = iota CommandSessionSetup CommandLogoff CommandTreeConnect CommandTreeDisconnect CommandCreate CommandClose CommandFlush CommandRead CommandWrite CommandLock CommandIOCtl CommandCancel CommandEcho CommandQueryDirectory CommandChangeNotify CommandQueryInfo CommandSetInfo CommandOplockBreak )
View Source
const ( SecurityModeSigningEnabled uint16 SecurityModeSigningRequired )
View Source
const ()
View Source
const ()
View Source
const ()
View Source
const DialectSmb2_ALL = 0x02FF
View Source
const DialectSmb_2_0_2 = 0x0202
View Source
const DialectSmb_2_1 = 0x0210
View Source
const DialectSmb_3_0 = 0x0300
View Source
const DialectSmb_3_0_2 = 0x0302
View Source
const DialectSmb_3_1_1 = 0x0311
View Source
const ProtocolSmb = "\xFFSMB"
View Source
const ProtocolSmb2 = "\xFESMB"
View Source
const StatusInvalidParameter = 0xc000000d
View Source
const StatusLogonFailure = 0xc000006d
View Source
const StatusMoreProcessingRequired = 0xc0000016
View Source
const StatusOk = 0x00000000
View Source
const StatusUserSessionDeleted = 0xc0000203
Variables ¶
View Source
var StatusMap = map[uint32]string{ StatusOk: "OK", StatusMoreProcessingRequired: "More Processing Required", StatusInvalidParameter: "Invalid Parameter", StatusLogonFailure: "Logon failed", StatusUserSessionDeleted: "User session deleted", }
Functions ¶
This section is empty.
Types ¶
type NegotiateReq ¶
type NegotiateRes ¶
type NegotiateRes struct { Header StructureSize uint16 SecurityMode uint16 DialectRevision uint16 Reserved uint16 ServerGuid []byte `smb:"fixed:16"` Capabilities uint32 MaxTransactSize uint32 MaxReadSize uint32 MaxWriteSize uint32 SystemTime uint64 ServerStartTime uint64 SecurityBufferOffset uint16 `smb:"offset:SecurityBlob"` SecurityBufferLength uint16 `smb:"len:SecurityBlob"` Reserved2 uint32 SecurityBlob *gss.NegTokenInit }
func NewNegotiateRes ¶
func NewNegotiateRes() NegotiateRes
type Session ¶
type Session struct { IsSigningRequired bool IsAuthenticated bool // contains filtered or unexported fields }
func (*Session) NegotiateProtocol ¶
func (*Session) NewNegotiateReq ¶
func (s *Session) NewNegotiateReq() NegotiateReq
func (*Session) NewSessionSetup1Req ¶
func (s *Session) NewSessionSetup1Req() (SessionSetup1Req, error)
func (*Session) NewSessionSetup2Req ¶
func (s *Session) NewSessionSetup2Req() (SessionSetup2Req, error)
func (*Session) NewTreeConnectReq ¶
func (s *Session) NewTreeConnectReq(name string) (TreeConnectReq, error)
NewTreeConnectReq creates a new TreeConnect message and accepts the share name as input.
func (*Session) NewTreeDisconnectReq ¶
func (s *Session) NewTreeDisconnectReq(treeId uint32) (TreeDisconnectReq, error)
func (*Session) TreeConnect ¶
func (*Session) TreeDisconnect ¶
type SessionSetup1Req ¶
type SessionSetup1Res ¶
type SessionSetup1Res struct { Header StructureSize uint16 Flags uint16 SecurityBufferOffset uint16 `smb:"offset:SecurityBlob"` SecurityBufferLength uint16 `smb:"len:SecurityBlob"` SecurityBlob *gss.NegTokenResp }
func NewSessionSetup1Res ¶
func NewSessionSetup1Res() (SessionSetup1Res, error)
type SessionSetup2Req ¶
type SessionSetup2Res ¶
type SessionSetup2Res struct { Header StructureSize uint16 Flags uint16 SecurityBufferOffset uint16 `smb:"offset:SecurityBlob"` SecurityBufferLength uint16 `smb:"len:SecurityBlob"` SecurityBlob *gss.NegTokenResp }
func NewSessionSetup2Res ¶
func NewSessionSetup2Res() (SessionSetup2Res, error)
type TreeConnectReq ¶
type TreeConnectRes ¶
type TreeConnectRes struct { Header StructureSize uint16 Reserved byte Capabilities uint32 MaximalAccess uint32 }
func NewTreeConnectRes ¶
func NewTreeConnectRes() (TreeConnectRes, error)
type TreeDisconnectReq ¶
type TreeDisconnectRes ¶
func NewTreeDisconnectRes ¶
func NewTreeDisconnectRes() (TreeDisconnectRes, error)
Click to show internal directories.
Click to hide internal directories.