ntp

package
v0.0.0-...-013e1f0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLayers

func GetLayers(packet gopacket.Packet) (*layers.IPv4, *layers.UDP)

GetLayers gets the IP and the UDP layers of the packet.

func ParseNTPRecord

func ParseNTPRecord(udp *layers.UDP) (bool, int)

ParseNTPRecord validates that the incoming UDP packet is an NTP packet based on NTP protocol headers.

func ShouldIgnoreIP

func ShouldIgnoreIP(ip net.IP) bool

ShouldIgnore IP checks if the IP address is from the router or localhost.

Types

type FileManager

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

func (*FileManager) LogNTPPacket

func (fm *FileManager) LogNTPPacket(packet gopacket.Packet, ipString string)

func (*FileManager) RotateFileIfNeeded

func (fm *FileManager) RotateFileIfNeeded(identifier string, prefixes *[]*net.IPNet) error

Jump to

Keyboard shortcuts

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