Documentation
¶
Overview ¶
Package smb provides a set of interfaces for SMB versions 2 and 3.
Index ¶
Constants ¶
View Source
const MaxSeqNum = ^SeqNum(0)
MaxSeqNum is the maximum valid sequence number.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn interface {
// Create returns a new message of the requested length.
Create(length int) Message
// Send sends a message to the connection.
//
// TODO: Support deadlines and/or cancellation.
Send(Message) error
// Receive receives a message from the connection.
//
// TODO: Support deadlines and/or cancellation.
Receive() (Message, error)
// Close closes the connection.
// Any blocked Receive or Send operations will be unblocked and return
// errors.
Close() error
// LocalAddr returns the local network address.
LocalAddr() Addr
// RemoteAddr returns the remote network address.
RemoteAddr() Addr
}
Conn is an SMB connection.
type Listener ¶
type Listener interface {
// Accept waits for and returns the next connection to the listener.
Accept() (Conn, error)
// Close closes the listener.
// Any blocked Accept operations will be unblocked and return errors.
Close() error
// Addr returns the listener's network address.
Addr() Addr
}
A Listener is capable of listening for SMB connections over some underlying transport protocol.
type Message ¶
type Message interface {
// Length returns the length of the message in bytes.
Length() int
// Bytes returns a slice of bytes from the message.
Bytes() []byte
// Close releases any resources consumed by the message. If the message
// came from a message pool it returns the message to the pool.
Close() error
}
Message is a buffered SMB message that can be sent and received by a connection.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
smbserve
command
|
|
|
Package msgpool provides a pool of SMB messages that can be reused.
|
Package msgpool provides a pool of SMB messages that can be reused. |
|
Package smbcap defines SMB capability flags.
|
Package smbcap defines SMB capability flags. |
|
Package smbcommand defines command codes for the SMB protocol.
|
Package smbcommand defines command codes for the SMB protocol. |
|
Package smbcompression defines structures and identifiers for SMB compression.
|
Package smbcompression defines structures and identifiers for SMB compression. |
|
Package smbdialect defines SMB dialect revision numbers.
|
Package smbdialect defines SMB dialect revision numbers. |
|
Package smbencryption defines structures and identifiers for SMB encryption.
|
Package smbencryption defines structures and identifiers for SMB encryption. |
|
Package smbintegrity defines structures and identifiers for SMB data integrity.
|
Package smbintegrity defines structures and identifiers for SMB data integrity. |
|
Package smbmultiproto supports multi-protocol negotiation of SMB 2 dialects over SMB 1 connections.
|
Package smbmultiproto supports multi-protocol negotiation of SMB 2 dialects over SMB 1 connections. |
|
Package smbnego facilitates SMB version 2 protocol negotiation.
|
Package smbnego facilitates SMB version 2 protocol negotiation. |
|
Package smbpacket facilitates serialization and deserialization of SMB packets.
|
Package smbpacket facilitates serialization and deserialization of SMB packets. |
|
Package smbsecmode defines SMB2 security modes.
|
Package smbsecmode defines SMB2 security modes. |
|
Package smbsequencer provides an smbserver.Sequencer implementation that relies on a non-allocating circular bitmask.
|
Package smbsequencer provides an smbserver.Sequencer implementation that relies on a non-allocating circular bitmask. |
|
Package smbserver provides an SMB version 2 and 3 server implementation.
|
Package smbserver provides an SMB version 2 and 3 server implementation. |
|
Package smbtcp implements SMB 2 and 3 connections over TCP.
|
Package smbtcp implements SMB 2 and 3 connections over TCP. |
|
Package smbtype provides type conversion for basic SMB protocol types.
|
Package smbtype provides type conversion for basic SMB protocol types. |
Click to show internal directories.
Click to hide internal directories.