disgo

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2021 License: MIT Imports: 7 Imported by: 0

README

disgo

mDNS/SSDP discovery with Go

Documentation

Index

Constants

View Source
const (

	// MDNSProtocolName name of the multicast protocol.
	MDNSProtocolName = "mDNS"
)
View Source
const (

	// SSDPProtocolName name of the multicast protocol.
	SSDPProtocolName = "SSDP"
)

Variables

This section is empty.

Functions

func MDNSListenMulticast

func MDNSListenMulticast(network string, iface net.Interface, out Reporter)

MDNSListenMulticast listens for mDNS multicast on the provided interface.

func MDNSScan

func MDNSScan(ifSockAddr net.UDPAddr, out Reporter)

MDNSScan queries and listens for mDNS multicast on the provided address.

func SSDPScan

func SSDPScan(ifSockAddr net.UDPAddr, reporter Reporter)

SSDPScan queries and listens for SSDP multicast on all interfaces.

Types

type Reporter

type Reporter struct {
	// contains filtered or unexported fields
}

Reporter provides custom printing to output channel

func NewReporter

func NewReporter(output chan string, protocol string) Reporter

NewReporter creates a new reporter.

func (Reporter) Print

func (r Reporter) Print(ip net.IP, msg string)

Print prints an IP + message to the reporter's output channel

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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