inetdiager

package
v0.0.0-...-2036b99 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package inetdiager is the inetdiager go routine of the xtcp package

This does the heavy lifting of processing the netlink messages

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Inetdiager

func Inetdiager(id int, af *uint8, in <-chan netlinker.TimeSpecandInetDiagMessage, wg *sync.WaitGroup, hostname string, cliFlags cliflags.CliFlags, inetdiagerStaterCh chan<- inetdiagerstater.InetdiagerStatsWrapper)

Inetdiager is the worker which recieves the Inetdiag messages from the netlinker This functino does the heavy lifting in terms of parsing the inetdiag messages currently we don't need the netlinkerDone channel, but we will once this function passes downstream

func SwapUint16

func SwapUint16(n uint16) uint16

swapUint16 converts a uint16 to network byte order and back. Stolen from: https://github.com/tsuna/endian/blob/master/little.go This is used to avoid multiple binary reads for the tcp info, because the TCP port numbers are the only bigendian (network byte order) variables jammed in the middle of the struct This is used in inetdiager TODO - tests TODO - make this entire code endian correct on all platforms TODO Could switch this out to binary.Read binary.BigEndian

Types

This section is empty.

Jump to

Keyboard shortcuts

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