identd

package
v0.0.0-...-6682903 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RpcClient

type RpcClient struct {
	AppName string
	Conn    *net.Conn
}

func MakeRpcClient

func MakeRpcClient(appName string) *RpcClient

func (*RpcClient) AddIdent

func (rpc *RpcClient) AddIdent(lport int, rport int, username string, iface string)

func (*RpcClient) Connect

func (rpc *RpcClient) Connect(serverAddress string) error

func (*RpcClient) ConnectAndReconnect

func (rpc *RpcClient) ConnectAndReconnect(serverAddress string)

func (*RpcClient) RemoveIdent

func (rpc *RpcClient) RemoveIdent(lport int, rport int, username string, iface string)

func (*RpcClient) Write

func (rpc *RpcClient) Write(line string) error

type Server

type Server struct {
	Entries     map[string]string
	EntriesLock sync.Mutex
}

Server - An IdentD server

func NewIdentdServer

func NewIdentdServer() Server

NewIdentdServer - Create a new IdentdServer instance

func (*Server) AddIdent

func (i *Server) AddIdent(localPort, remotePort int, ident string, iface string)

AddIdent - Add an ident to be looked up

func (*Server) ListenForRequests

func (i *Server) ListenForRequests(serverSocket *net.Listener)

ListenForRequests - Listen on a net.Listener for ident lookups

func (*Server) RemoveIdent

func (i *Server) RemoveIdent(localPort, remotePort int, iface string)

RemoveIdent - Remove an ident from being looked up

func (*Server) Run

func (i *Server) Run() error

Run - Start listening for ident lookups

Jump to

Keyboard shortcuts

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