wiredhostapd

package
v0.0.0-...-683b059 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2022 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Overview

Package wiredhostapd contains utilities for establishing a hostapd server for use with 'driver=wired' (i.e., Ethernet or similar).

Index

Constants

View Source
const (
	STAStatusAuthSuccess = "dot1xAuthAuthSuccessesWhileAuthenticating"
	STAStatusAuthLogoff  = "dot1xAuthAuthEapLogoffWhileAuthenticated"
)

STA status definitions (i.e., expectation values for Server.ExpectSTAStatus).

Variables

This section is empty.

Functions

This section is empty.

Types

type EAPConf

type EAPConf struct {
	OuterAuth string
	InnerAuth string
	Identity  string
	Password  string

	// Cert holds certificate information for hostapd's EAP server.
	Cert *certificate.CertStore
}

EAPConf holds configuration information for creating hostapd's internal EAP server.

type Server

type Server struct {
	// Iface is the name of the network interface which hostapd should manage.
	Iface string

	// OutDir is the path to which output logs should be written.
	OutDir string

	EAP *EAPConf
	// contains filtered or unexported fields
}

Server holds information about a started hostapd server, primarily for the 'driver=wired' variant.

func (*Server) ExpectSTAStatus

func (s *Server) ExpectSTAStatus(ctx context.Context, staAddr, key, val string) error

ExpectSTAStatus retrieves the status for the station at 'staAddr', logs it to a file in OutDir, and verifies if the expected status 'key=val' entry is found.

func (*Server) Start

func (s *Server) Start(ctx context.Context) (retErr error)

Start starts up a hostapd instance, for wired authentication. The caller should call Server.Stop() when finished.

func (*Server) StartEAPOL

func (s *Server) StartEAPOL(ctx context.Context) error

StartEAPOL tells the Server to initiate EAPOL with nearby links (multicast).

func (*Server) Stop

func (s *Server) Stop(ctx context.Context) error

Stop cleans up any resources and kills the hostapd server.

Jump to

Keyboard shortcuts

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