Documentation
¶
Index ¶
- Variables
- func HandleKeepalive(ipAddr, raddr string, svc *Server) error
- func Run(cCtx *cli.Context) error
- type EpEntry
- type Server
- func (svc *Server) CreateClientForAddr(addr *net.UDPAddr, conn *net.UDPConn, username string) (*UClient, error)
- func (svc *Server) GetRouteEntries() map[string]string
- func (svc *Server) GetRouteStreams() []byte
- func (svc *Server) GetRoutes() string
- func (svc *Server) HandleSignal(sigChan chan os.Signal)
- func (svc *Server) IPForUser(username string) (net.IP, error)
- func (svc *Server) IPFromIdx(idx int) net.IP
- func (svc *Server) IPIdxInPool(idx int) bool
- func (svc *Server) IPInPool(ip net.IP) bool
- func (svc *Server) IdxFromIP(ip net.IP) int
- func (svc *Server) InitRoutes()
- func (svc *Server) ListenAndServe() error
- func (svc *Server) MulticastRoutes() error
- func (svc *Server) OfferIPToClient(conn *net.UDPConn, ip string, raddr *net.UDPAddr) error
- func (svc *Server) ParseDHCPRange() error
- func (svc *Server) PopIPFromPool() (net.IP, error)
- func (svc *Server) ReleaseIP(ip net.IP)
- func (svc *Server) SendResponse(conn *net.UDPConn, code uint16, raddr *net.UDPAddr)
- func (svc *Server) SetupLan() error
- func (svc *Server) Teardown()
- func (svc *Server) UpdateRoutes(nexthop, ip string)
- type UClient
Constants ¶
This section is empty.
Variables ¶
View Source
var UPool map[string]*UClient
Functions ¶
func HandleKeepalive ¶
Types ¶
type Server ¶
type Server struct { *config.ServerConfig UsedIP []int IPStart net.IP IPCount int MLock sync.Mutex Routes map[string]string // Nexthop username as key, user ipv4 addr as value // contains filtered or unexported fields }
func (*Server) CreateClientForAddr ¶
func (*Server) GetRouteEntries ¶
func (*Server) GetRouteStreams ¶
func (*Server) HandleSignal ¶
func (*Server) IPIdxInPool ¶
func (*Server) InitRoutes ¶
func (svc *Server) InitRoutes()
func (*Server) ListenAndServe ¶
func (*Server) MulticastRoutes ¶
func (*Server) OfferIPToClient ¶
func (*Server) ParseDHCPRange ¶
func (*Server) SendResponse ¶
func (*Server) UpdateRoutes ¶
Click to show internal directories.
Click to hide internal directories.