Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var TermsharkOnly = []string{"--pass-thru", "--profile", "--log-tty", "--debug", "--tail"}
If args are passed through to tshark (e.g. stdout not a tty), then strip these out so tshark doesn't fail.
Functions ¶
func FlagIsTrue ¶
Types ¶
type PlatformSwitches ¶
type PlatformSwitches struct {
Tty string `long:"tty" description:"Display the UI on this terminal." value-name:"<tty>"`
}
Embedded in the CLI options struct.
func (PlatformSwitches) TtyValue ¶
func (p PlatformSwitches) TtyValue() string
type TailSwitch ¶
type TailSwitch struct{}
func (TailSwitch) TailFileValue ¶
func (t TailSwitch) TailFileValue() string
type Termshark ¶
type Termshark struct {
Ifaces []string `value-name:"<interfaces>" short:"i" description:"Interface(s) to read."`
Pcap flags.Filename `value-name:"<infile/fifo>" short:"r" description:"Pcap file/fifo to read. Use - for stdin."`
WriteTo flags.Filename `value-name:"<outfile>" short:"w" description:"Write raw packet data to outfile."`
DecodeAs []string `short:"d" description:"Specify dissection of layer type." value-name:"<layer type>==<selector>,<decode-as protocol>"`
PrintIfaces bool `short:"D" optional:"true" optional-value:"true" description:"Print a list of the interfaces on which termshark can capture."`
DisplayFilter string `short:"Y" description:"Apply display filter." value-name:"<displaY filter>"`
CaptureFilter string `short:"f" description:"Apply capture filter." value-name:"<capture filter>"`
TimestampFormat string `` /* 239-byte string literal not displayed */
PlatformSwitches
Profile string `long:"profile" short:"C" description:"Start with this configuration profile." value-name:"<profile>"`
PassThru string `` /* 179-byte string literal not displayed */
LogTty bool `long:"log-tty" optional:"true" optional-value:"true" choice:"true" choice:"false" description:"Log to the terminal."`
Debug TriState `` /* 158-byte string literal not displayed */
Help bool `long:"help" short:"h" optional:"true" optional-value:"true" description:"Show this help message."`
Version []bool `long:"version" short:"v" optional:"true" optional-value:"true" description:"Show version information."`
Args struct {
FilterOrPcap string `value-name:"<filter-or-file>" description:"Filter (capture for iface, display for pcap), or pcap to read."`
} `positional-args:"yes"`
}
Termshark's own command line arguments. Used if we don't pass through to tshark.
type Tshark ¶
type Tshark struct {
PassThru string `` /* 204-byte string literal not displayed */
Profile string `long:"profile" short:"C" description:"Start with this configuration profile." value-name:"<profile>"`
PrintIfaces bool `short:"D" optional:"true" optional-value:"true" description:"Print a list of the interfaces on which termshark can capture."`
TailSwitch
}
Used to determine if we should run tshark instead e.g. stdout is not a tty
Click to show internal directories.
Click to hide internal directories.