scanner

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ScanForLocalCameras

func ScanForLocalCameras(options *ScanOptions) ([]*configdb.Camera, error)
ScanForLocalCameras scans the local IPv4 network for cameras

options is optional.

func TryToContactCamera

func TryToContactCamera(host string, timeout time.Duration, scanMethods ScanMethod) (camera.CameraBrands, error)

Try to contact the camera, using whatever network heuristics you specify in scanMethods In this function CameraBrandUnknown means "no camera found"

Types

type ScanMethod

type ScanMethod int
const (
	ScanMethodHTTP ScanMethod = 1 << iota
	ScanMethodRTSP
)

type ScanOptions

type ScanOptions struct {
	Timeout    time.Duration // Timeout on connecting to each host
	OwnIP      net.IP        // The IP address of the local machine
	ExcludeIPs []net.IP      // A list of IP addresses to exclude from the scan
}

Any option, if left to the zero value, is ignored, and defaults are used instead.

Jump to

Keyboard shortcuts

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