Versions in this module Expand all Collapse all v2 v2.4.0 Jul 11, 2022 Changes in this version + var Goroutinewg *sync.WaitGroup + var OpsChan chan gowid.RunFunction + func CanRestart(src IPacketSource) bool + func HandleBegin(code HandlerCode, app gowid.IApp, cb interface{}) bool + func HandleEnd(code HandlerCode, app gowid.IApp, cb interface{}) bool + func HandleError(code HandlerCode, app gowid.IApp, err error, cb interface{}) bool + func HandleUnpack(code HandlerCode, cb interface{}, handler unpackedHandlerFunc, app gowid.IApp) bool + func MakeUsefulError(cmd IBasicCommand, err error) gowid.KeyValueError + func SnappyMe(p interface{}, w io.Writer) + func SourcesNames(srcs []IPacketSource) []string + func SourcesString(srcs []IPacketSource) string + func TempPcapFile(tokens ...string) string + func UIName(src IPacketSource) string + func UnsnappyMe(res interface{}, r io.Reader) + type CacheEntry struct + Pcap [][]byte + PcapComplete bool + Pdml []IPdmlPacket + PdmlComplete bool + func (c CacheEntry) Complete() bool + type Command struct + func (c *Command) Close() error + func (c *Command) Kill() error + func (c *Command) Pid() int + func (c *Command) PutInNewGroupOnUnix() + func (c *Command) SetStdout(w io.Writer) + func (c *Command) Start() error + func (c *Command) StderrSummary() []string + func (c *Command) StdoutReader() (io.ReadCloser, error) + func (c *Command) String() string + func (c *Command) Wait() error + type Commands struct + Args []string + Color bool + DecodeAs []string + PdmlArgs []string + PsmlArgs []string + func MakeCommands(decodeAs []string, args []string, pdml []string, psml []string, color bool) Commands + func (c Commands) Iface(ifaces []string, captureFilter string, tmpfile string) IBasicCommand + func (c Commands) Pcap(pcap string, displayFilter string) IPcapCommand + func (c Commands) Pdml(pcap string, displayFilter string) IPcapCommand + func (c Commands) Psml(pcap interface{}, displayFilter string) IPcapCommand + func (c Commands) Tail(tmpfile string) ITailCommand + type FifoSource struct + Filename string + func (p FifoSource) IsFifo() bool + func (p FifoSource) IsFile() bool + func (p FifoSource) IsInterface() bool + func (p FifoSource) IsPipe() bool + func (p FifoSource) Name() string + func (p FifoSource) String() string + type FileSource struct + Filename string + func (p FileSource) IsFifo() bool + func (p FileSource) IsFile() bool + func (p FileSource) IsInterface() bool + func (p FileSource) IsPipe() bool + func (p FileSource) Name() string + func (p FileSource) String() string + type GzippedPdmlPacket struct + Data bytes.Buffer + func (p GzippedPdmlPacket) Packet() PdmlPacket + func (p GzippedPdmlPacket) Uncompress() PdmlPacket + type HandlerCode int + const CapinfoCode + const ConvCode + const IfaceCode + const NoneCode + const PdmlCode + const PsmlCode + const StreamCode + const TailCode + type HandlerList []interface + func (h HandlerList) Unpack() []interface{} + type IAfterEnd interface + AfterEnd func(code HandlerCode, app gowid.IApp) + type IBasicCommand interface + Kill func() error + Pid func() int + Start func() error + StderrSummary func() []string + Wait func() error + type IBeforeBegin interface + BeforeBegin func(code HandlerCode, app gowid.IApp) + type IClear interface + OnClear func(code HandlerCode, app gowid.IApp) + type ILoaderCmds interface + Iface func(ifaces []string, captureFilter string, tmpfile string) IBasicCommand + Pcap func(pcap string, displayFilter string) IPcapCommand + Pdml func(pcap string, displayFilter string) IPcapCommand + Psml func(pcap interface{}, displayFilter string) IPcapCommand + Tail func(tmpfile string) ITailCommand + var PcapCmds ILoaderCmds + type IMainRunner interface + Run func(fn gowid.RunFunction) + type INewSource interface + OnNewSource func(code HandlerCode, app gowid.IApp) + type IOnError interface + OnError func(code HandlerCode, app gowid.IApp, err error) + type IPacketSource interface + IsFifo func() bool + IsFile func() bool + IsInterface func() bool + IsPipe func() bool + Name func() string + func FileSystemSources(srcs []IPacketSource) []IPacketSource + type IPcapCommand interface + StdoutReader func() (io.ReadCloser, error) + type IPdmlPacket interface + Packet func() PdmlPacket + func GzipPdmlPacket(p PdmlPacket) IPdmlPacket + func SnappyPdmlPacket(p PdmlPacket) IPdmlPacket + type IPsmlHeader interface + OnPsmlHeader func(code HandlerCode, app gowid.IApp) + type ISourceRemover interface + Remove func() error + type ITailCommand interface + Close func() error + SetStdout func(io.Writer) + type IUnpack interface + Unpack func() []interface{} + type InterfaceLoader struct + func (c *InterfaceLoader) IsLoading() bool + type InterfaceSource struct + Iface string + func (p InterfaceSource) IsFifo() bool + func (p InterfaceSource) IsFile() bool + func (p InterfaceSource) IsInterface() bool + func (p InterfaceSource) IsPipe() bool + func (p InterfaceSource) Name() string + func (p InterfaceSource) String() string + type LoadPcapSlice struct + CancelCurrent bool + Jump int + Row int + func ProcessPdmlRequests(requests []LoadPcapSlice, mloader *ParentLoader, loader *PdmlLoader, ...) []LoadPcapSlice + func (m LoadPcapSlice) String() string + type LoaderState bool + const Loading + const NotLoading + func (t LoaderState) String() string + type Options struct + CacheSize int + PacketsPerLoad int + var PcapOpts Options + type PacketColors struct + BG gowid.IColor + FG gowid.IColor + type PacketLoader struct + func (c *PacketLoader) ClearPcap(cb interface{}) + func (c *PacketLoader) LoadInterfaces(psrcs []IPacketSource, captureFilter string, displayFilter string, ...) error + func (c *PacketLoader) LoadPcap(pcap string, displayFilter string, cb interface{}, app gowid.IApp) + func (c *PacketLoader) Reload(filter string, cb interface{}, app gowid.IApp) + func (c *PacketLoader) Renew() + type ParentLoader struct + func NewPcapLoader(cmds ILoaderCmds, runner IMainRunner, opts ...Options) *ParentLoader + func (c *ParentLoader) CloseMain() + func (c *ParentLoader) Empty() bool + func (c *ParentLoader) Interfaces() []string + func (c *ParentLoader) Pcap() string + func (c *ParentLoader) RenewIfaceLoader() + func (c *ParentLoader) RenewPdmlLoader() + func (c *ParentLoader) RenewPsmlLoader() + func (c *ParentLoader) StopLoadPsmlAndIface(cb interface{}) + func (c *ParentLoader) String() string + func (p *ParentLoader) CaptureFilter() string + func (p *ParentLoader) Commands() ILoaderCmds + func (p *ParentLoader) Context() context.Context + func (p *ParentLoader) DisplayFilter() string + func (p *ParentLoader) InterfaceFile() string + func (p *ParentLoader) LoadWasCancelled() bool + func (p *ParentLoader) LoadingAnything() bool + func (p *ParentLoader) MainRun(fn gowid.RunFunction) + func (p *ParentLoader) PacketSources() []IPacketSource + func (p *ParentLoader) PsmlStoppedDeliberately() bool + func (p *ParentLoader) TailStoppedDeliberately() bool + func (p *ParentLoader) TurnOffPipe() + type PdmlLoader struct + KillAfterReadingThisMany int + PcapPcap string + PcapPdml string + PcapPid int + PdmlPid int + Stage2FinishedChan chan struct{} + func (c *PdmlLoader) IsLoading() bool + func (c *PdmlLoader) LoadIsVisible() bool + func (c *PdmlLoader) LoadingRow() int + type PdmlPacket struct + Content []byte + XMLName xml.Name + func (p PdmlPacket) Packet() PdmlPacket + type PipeSource struct + Descriptor string + Fd int + func (p PipeSource) Close() error + func (p PipeSource) IsFifo() bool + func (p PipeSource) IsFile() bool + func (p PipeSource) IsInterface() bool + func (p PipeSource) IsPipe() bool + func (p PipeSource) Name() string + func (p PipeSource) String() string + type ProcessNotStarted struct + Command *exec.Cmd + func (e ProcessNotStarted) Error() string + type ProcessState int + const NotStarted + const Started + const Terminated + func (p ProcessState) String() string + type PsmlLoader struct + PacketCache *lru.Cache + PacketNumberMap map[int]int + PacketNumberOrder map[int]int + PcapPsml interface{} + PsmlCmd IPcapCommand + PsmlFinishedChan chan struct{} + func (c *PsmlLoader) CacheAt(row int) (CacheEntry, bool) + func (c *PsmlLoader) DoWithPsmlData(fn func([][]string)) + func (c *PsmlLoader) IsLoading() bool + func (c *PsmlLoader) NumLoaded() int + func (c *PsmlLoader) PacketCacheFn() *lru.Cache + func (c *PsmlLoader) ReadingFromFifo() bool + func (c *PsmlLoader) StartStage2ChanFn() chan struct{} + func (p *PsmlLoader) LengthOfPcapCacheEntry(row int) (int, error) + func (p *PsmlLoader) LengthOfPdmlCacheEntry(row int) (int, error) + func (p *PsmlLoader) PacketsPerLoad() int + func (p *PsmlLoader) PsmlAverageLengths() []gwutil.IntOption + func (p *PsmlLoader) PsmlColors() []PacketColors + func (p *PsmlLoader) PsmlData() [][]string + func (p *PsmlLoader) PsmlHeaders() []string + func (p *PsmlLoader) PsmlMaxLengths() []int + type RunFn func() + type Runner struct + func (a *Runner) Run(fn gowid.RunFunction) + type SnappiedPdmlPacket struct + Data bytes.Buffer + func (p SnappiedPdmlPacket) Packet() PdmlPacket + func (p SnappiedPdmlPacket) Uncompress() PdmlPacket + type TemporaryFileSource struct + func (p TemporaryFileSource) Remove() error + func (p TemporaryFileSource) String() string