Documentation ¶
Index ¶
- Constants
- func WriteAuthRequest(writer io.Writer, request AuthRequest) error
- func WriteAuthResponse(writer io.Writer, response AuthResponse) error
- func WriteRequest(writer io.Writer, request Request) error
- func WriteResponse(writer io.Writer, response Response) error
- func WriteUsernamePasswordAuthRequest(writer io.Writer, request UsernamePasswordAuthRequest) error
- func WriteUsernamePasswordAuthResponse(writer io.Writer, response UsernamePasswordAuthResponse) error
- type AuthRequest
- type AuthResponse
- type Request
- type Response
- type UsernamePasswordAuthRequest
- type UsernamePasswordAuthResponse
Constants ¶
View Source
const ( Version byte = 5 AuthTypeNotRequired byte = 0x00 AuthTypeGSSAPI byte = 0x01 AuthTypeUsernamePassword byte = 0x02 AuthTypeNoAcceptedMethods byte = 0xFF UsernamePasswordStatusSuccess byte = 0x00 UsernamePasswordStatusFailure byte = 0x01 CommandConnect byte = 0x01 CommandBind byte = 0x02 CommandUDPAssociate byte = 0x03 ReplyCodeSuccess byte = 0 ReplyCodeFailure byte = 1 ReplyCodeNotAllowed byte = 2 ReplyCodeNetworkUnreachable byte = 3 ReplyCodeHostUnreachable byte = 4 ReplyCodeConnectionRefused byte = 5 ReplyCodeTTLExpired byte = 6 ReplyCodeUnsupported byte = 7 ReplyCodeAddressTypeUnsupported byte = 8 )
Variables ¶
This section is empty.
Functions ¶
func WriteAuthRequest ¶
func WriteAuthRequest(writer io.Writer, request AuthRequest) error
func WriteAuthResponse ¶
func WriteAuthResponse(writer io.Writer, response AuthResponse) error
func WriteUsernamePasswordAuthRequest ¶
func WriteUsernamePasswordAuthRequest(writer io.Writer, request UsernamePasswordAuthRequest) error
func WriteUsernamePasswordAuthResponse ¶
func WriteUsernamePasswordAuthResponse(writer io.Writer, response UsernamePasswordAuthResponse) error
Types ¶
type AuthRequest ¶
type AuthRequest struct {
Methods []byte
}
func ReadAuthRequest ¶
func ReadAuthRequest(reader io.Reader) (request AuthRequest, err error)
func ReadAuthRequest0 ¶
func ReadAuthRequest0(reader io.Reader) (request AuthRequest, err error)
type AuthResponse ¶
type AuthResponse struct {
Method byte
}
func ReadAuthResponse ¶
func ReadAuthResponse(reader io.Reader) (response AuthResponse, err error)
type UsernamePasswordAuthRequest ¶
func ReadUsernamePasswordAuthRequest ¶
func ReadUsernamePasswordAuthRequest(reader io.Reader) (request UsernamePasswordAuthRequest, err error)
type UsernamePasswordAuthResponse ¶
type UsernamePasswordAuthResponse struct {
Status byte
}
func ReadUsernamePasswordAuthResponse ¶
func ReadUsernamePasswordAuthResponse(reader io.Reader) (response UsernamePasswordAuthResponse, err error)
Click to show internal directories.
Click to hide internal directories.