header

package
v0.0.0-...-663be50 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangeTimestampDate

func ChangeTimestampDate(packet gopacket.Packet, iDiffYear, iDiffMonth, iDiffDay int)

----------------------------------------------------------------------------- ChangeTimestampDate() ----------------------------------------------------------------------------- This function will adjust the day, month, or year of the timestamp This change will be made regardless of packet type as it is done on the pcap header not the packet itself

func ChangeTimestampTimeOfDay

func ChangeTimestampTimeOfDay(packet gopacket.Packet, sTime string)

----------------------------------------------------------------------------- ChangeTimestampTimeOfDay() ----------------------------------------------------------------------------- This function will adjust the time of day of the timestamp This change will be made regardless of packet type as it is done on the pcap header not the packet itself

func ComputeNeededPacketDateChange

func ComputeNeededPacketDateChange(year, month, day int, pcapStartTimestamp time.Time) (iDiffYear, iDiffMonth, iDiffDay int)

----------------------------------------------------------------------------- ComputeNeededPacketDateChange() ----------------------------------------------------------------------------- Figure out if there is a change needed for the date of each packet. We will compute the difference between what is in the first packet and what was passed in via the command line arguments.

func GetFirstPacketTimestamp

func GetFirstPacketTimestamp(sFilename string) time.Time

----------------------------------------------------------------------------- GetFirstPacketTimestamp ----------------------------------------------------------------------------- We need to open the pcap file and read the timestamp from the first packet so that we can figure out an offset for all future packets. This will address the problem of the pcap spanning multiple days, months, years as we will always add the same amount of offset to each packet.

Types

This section is empty.

Jump to

Keyboard shortcuts

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