Documentation ¶
Overview ¶
Package streamwidget provides a very specific stream reassembly termshark widget. This is probably not much use generally, but is separated out to ease testing. It is intended to render as mostly full screen, with a title bar, the main view showing the reassembled stream, and controls at the bottom.
Index ¶
- Variables
- func MakeConvMenu(opener menu.IOpener) (*holder.Widget, *menu.Widget)
- type ConversationFilter
- type Data
- type DisplayFormat
- type IChunkClicked
- type IFilterOut
- type IOnError
- type Options
- type ViewData
- type Widget
- func (w *Widget) AddChunkEntire(ch streams.IChunk, app gowid.IApp)
- func (w *Widget) AddHeader(hdr streams.FollowHeader, app gowid.IApp)
- func (w *Widget) DisplayFilter() string
- func (w *Widget) Finished() bool
- func (w *Widget) GoToMiddle(app gowid.IApp)
- func (w *Widget) MapChunkToTableRow(chunk int) (int, error)
- func (w *Widget) NumChunks() int
- func (w *Widget) PreviousFilter() string
- func (w *Widget) SetCurrentRow(row table.Position)
- func (w *Widget) SetFinished(f bool)
- func (w *Widget) SetFocusOnChunksIfPossible(app gowid.IApp)
- func (w *Widget) String() string
- func (w *Widget) TrackPayloadPacket(packet int)
- func (w *Widget) UserInput(ev interface{}, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var PacketRowNotLoadedError = fmt.Errorf("The packet is not yet loaded.")
Functions ¶
Types ¶
type ConversationFilter ¶
type ConversationFilter int
const ( Entire ConversationFilter = 0 ClientOnly ConversationFilter = iota ServerOnly ConversationFilter = iota )
type Data ¶
type Data struct {
// contains filtered or unexported fields
}
Represents all the streamed data
type DisplayFormat ¶
type DisplayFormat int
const ( Hex DisplayFormat = 0 Ascii DisplayFormat = iota Raw DisplayFormat = iota )
type IChunkClicked ¶
type IChunkClicked interface { OnPacketClicked(pkt int, app gowid.IApp) error HandleError(row table.RowId, err error, app gowid.IApp) }
Supplied by user of widget - what UI changes to make when packet is clicked
type IFilterOut ¶
type Options ¶
type Options struct { DefaultDisplay func() DisplayFormat // Start in ascii, hex, raw FilterOutFunc func(IFilterOut, gowid.IApp) // UI changes to run when user clicks "filter out" button PreviousFilter string // so if we filter out, we can do "Previous and (! tcp.stream eq 0)" ChunkClicker IChunkClicked // UI changes to make when stream chunk in table is clicked ErrorHandler IOnError // UI action to take on error CopyModeWidget gowid.IWidget // What to display when copy-mode is started. MenuOpener menu.IOpener // For integrating with UI app - the menu needs to be told what's underneath when opened }
type ViewData ¶
type ViewData struct {
// contains filtered or unexported fields
}
Represents the view of the data from either both sides, client side or server side
type Widget ¶
type Widget struct { gowid.IWidget Proto streams.Protocol // TCP, UDP // contains filtered or unexported fields }
func (*Widget) DisplayFilter ¶
func (*Widget) GoToMiddle ¶
func (*Widget) PreviousFilter ¶
func (*Widget) SetCurrentRow ¶
func (*Widget) SetFinished ¶
func (*Widget) SetFocusOnChunksIfPossible ¶
func (*Widget) TrackPayloadPacket ¶
Click to show internal directories.
Click to hide internal directories.