nbt
import "github.com/TheManticoreProject/Manticore/network/netbios/nbt"
Index
- type NBTTransport
- func NewNBTTransport() *NBTTransport
- func (n *NBTTransport) Close() error
- func (n *NBTTransport) Connect(ipaddr net.IP, port int) error
- func (n *NBTTransport) IsConnected() bool
- func (n *NBTTransport) Receive() ([]byte, error)
- func (n *NBTTransport) Send(data []byte) (int, error)
- func (n *NBTTransport) SetTimeout(d time.Duration)
type NBTTransport
NBTTransport implements the Transport interface for NetBIOS over TCP Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cifs/45170055-a0cd-4910-9228-801d5bf7ac84
type NBTTransport struct {
// contains filtered or unexported fields
}
func NewNBTTransport
func NewNBTTransport() *NBTTransport
NewNBTTransport creates a new NetBIOS over TCP transport
func (*NBTTransport) Close
func (n *NBTTransport) Close() error
Close terminates the NetBIOS over TCP connection
func (*NBTTransport) Connect
func (n *NBTTransport) Connect(ipaddr net.IP, port int) error
Connect establishes a NetBIOS over TCP connection
func (*NBTTransport) IsConnected
func (n *NBTTransport) IsConnected() bool
IsConnected returns whether the NetBIOS transport is currently connected
func (*NBTTransport) Receive
func (n *NBTTransport) Receive() ([]byte, error)
Receive reads data from the NetBIOS over TCP connection, handling the NetBIOS header
func (*NBTTransport) Send
func (n *NBTTransport) Send(data []byte) (int, error)
Send transmits data over the NetBIOS over TCP connection with proper NetBIOS header
func (*NBTTransport) SetTimeout
func (n *NBTTransport) SetTimeout(d time.Duration)
SetTimeout bounds Connect and each subsequent Receive: Connect fails if the TCP connection cannot be established within d, and Receive fails if a frame does not arrive within d. A non-positive d removes the bound (blocking I/O).