ident

package module
v0.0.0-...-830550b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2020 License: MIT Imports: 5 Imported by: 0

README

RFC 1413 (Identification Protocol) client

This package provides a client for the Identification Protocol.


GoDoc Go Report Card


Installation

go get github.com/DanielOaks/go-ident

Documentation

Documentation can be found at godoc.org.

Documentation

Overview

Package ident implements an RFC 1413 client

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProtocolError

type ProtocolError struct {
	Line string
}

ProtocolError indicates that an error occurred with the protocol itself, that the response could not be successfully parsed or was malformed.

func (ProtocolError) Error

func (e ProtocolError) Error() string

type Response

type Response struct {
	OS         string
	Charset    string
	Identifier string
}

Response is a successful answer to our query to the identd server.

func Query

func Query(ip string, portOnServer, portOnClient int, timeout time.Duration) (response Response, err error)

Query makes an Ident query, if timeout is >0 the query is timed out after that many seconds.

type ResponseError

type ResponseError struct {
	Type string
}

ResponseError indicates that the identd server returned an error rather than an identifying string.

func (ResponseError) Error

func (e ResponseError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL