subnets

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

TTL Tracker monitors the differentials in TTL of packets matched to a given subnet by finding a common integer variance in them, it attempts to guess how many 'hops' the given downstream subnet is from the capturepoint network

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsViableSubnet

func IsViableSubnet(networkaddr net.IP, broadcastaddr net.IP) (*net.IPNet, bool)

Can the given pairing of addresses viably describe the network and broadcast address of a valid CIDR subnet?

Types

type Subnet

type Subnet struct {
	Base uint32 // Integer of the base IP Address of this Subnet
	Mask uint32 // base Integer for XOR masking matching packets to this subnet (ie the subnet Mask)

	ObservedCount int       // how many incoming packets have matched this Potential Subnet?
	Subnets       []*Subnet // Potential Subnets of this Subnet
}

func NewSubnet

func NewSubnet(ipNet *net.IPNet) (subnet *Subnet, err error)

func (Subnet) Match

func (s Subnet) Match() bool

does this packet's Address XOR match the given Base and Mask ?

func (Subnet) String

func (s Subnet) String()

write this subnet out in CIDR notation

Jump to

Keyboard shortcuts

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