Documentation
¶
Index ¶
Constants ¶
View Source
const VersionCode = 0x05
Variables ¶
View Source
var ( ErrTooManyAuthMethods = errors.New("too many auth methods") ErrHostnameTooLong = errors.New("hostname too long") ErrInvalidVersion = errors.New("invalid version") ErrInvalidAddrType = errors.New("invalid address type") ErrNonZeroReservedField = errors.New("reserved field has a non-zero value") )
Functions ¶
This section is empty.
Types ¶
type AuthMethod ¶
type AuthMethod byte
const ( AuthNone AuthMethod = 0x00 AuthNotAcceptable AuthMethod = 0xff )
func (AuthMethod) MarshalText ¶
func (m AuthMethod) MarshalText() ([]byte, error)
func (AuthMethod) String ¶
func (m AuthMethod) String() string
type Greeting ¶
type Greeting struct {
AuthMethods []AuthMethod
}
type GreetingReply ¶
type GreetingReply struct {
AuthMethod AuthMethod
}
func ReadGreetingReply ¶
func ReadGreetingReply(r *bufio.Reader) (*GreetingReply, error)
type Status ¶
type Status byte
const ( StatusOK Status = 0x00 StatusGeneralFailure Status = 0x01 StatusConnectionNotAllowed Status = 0x02 StatusNetworkUnreachable Status = 0x03 StatusHostUnreachable Status = 0x04 StatusConnectionRefused Status = 0x05 StatusTTLExpired Status = 0x06 StatusCommandNotSupported Status = 0x07 StatusAddrTypeNotSupported Status = 0x08 )
func (Status) MarshalText ¶
Click to show internal directories.
Click to hide internal directories.