Documentation ¶
Overview ¶
Package cfg defines the ID numbers as well as descriptions of config arguments used in the extcap configuration dialogs.
Please keep in mind that the ID numbers control the order in which the configuration arguments will be presented in Wireshark's configuration UI.
Index ¶
Constants ¶
const ( ProxyOff = 600 HTTPProxy = 666 HTTPSProxy = 667 NoProxy = 668 )
Shared "Proxy" tab controls; please node that the control IDs were randomly chosen, see also https://xkcd.com/221/ for the algorithm used.
const ( Containers = 10 ContainerNifs = 20 ShowPods = 30 ShowStandaloneContainers = 31 ShowProcs = 32 ShowEmptyNetNS = 33 NoProm = 40 )
Shared "Standard" tab controls, except for the packetflix extcap network interface. These IDs do not start at 1 (or 0 fwiw) in order to give head space to extcap interface-specific configuration controls.
const ( DockerHostURL = 1 SkipVerify = 2 )
Configuration UI controls identifiers for the Docker capture "Standard" tab controls; please note that these go first in the rendered dialog, as these are the most important ones.
const (
ClusterContext = 1
)
Kubernetes capture "Standard" tab controls
const (
PacketflixURL = 10
)
Packetflix configuration "Standard" tab controls
const ProxyTabName = "Proxy"
ProxyTabName specifies the tab name for proxy configuration options.
Variables ¶
var CommonArgValues = map[int][]string{
ContainerNifs: {"{value=any}{display=all}{default=true}"},
}
CommonArgValues defines the initial configuration values common to all extcap nifs (except packetflix)
var CommonArgs = map[int]string{}
CommonArgs are the configuration args common to all extcap nifs of this plugin, except the packetflix nif (which lacks the Standard tab common args completely).
var CommonOtherTabArgs = map[int]string{ ProxyOff: "{group=" + ProxyTabName + "}{call=--proxyoff}{type=boolflag}{default=yes}" + "{display=Disable proxies}{tooltip=disables proxies completely}", HTTPProxy: "{group=" + ProxyTabName + "}{call=--httpproxy}{type=string}" + "{display=HTTP proxy}{placeholder=http://poxyproxy.acme.com:1234}", HTTPSProxy: "{group=" + ProxyTabName + "}{call=--httpsproxy}{type=string}" + "{display=HTTPS proxy}{placeholder=http://poxyproxy.acme.com:1234}", NoProxy: "{group=" + ProxyTabName + "}{call=--noproxy}{type=string}" + "{display=No proxy}{placeholder=destinations where no proxy should be used}", }
CommonOtherTabArgs defines the configuration args common to all config tabs, except the "Standard" tab.
var CommonStdArgs = map[int]string{
Containers: "{call=--container}{type=selector}{reload=true}" +
"{display=Containers}{placeholder=refresh}",
ContainerNifs: "{call=--nif}{type=selector}{reload=true}" +
"{display=Interfaces}{placeholder=refresh}",
ShowPods: "{call=--showpods}{type=boolflag}" +
"{display=Show pods}",
ShowStandaloneContainers: "{call=--showcontainers}{type=boolflag}" +
"{display=Show standalone containers}",
ShowProcs: "{call=--showprocs}{type=boolflag}" +
"{display=Show processes}{default=false}",
ShowEmptyNetNS: "{call=--showemptynetns}{type=boolflag}" +
"{display=Show process-less IP stacks}{default=false}",
NoProm: "{call=--noprom}{type=boolflag}" +
"{display=No promiscuous mode}{default=false}",
}
CommonStdArgs defines the configuration args in the Standard tab, common to all extcap nifs except the packetflix nif.
Functions ¶
func DumpConfigArgValues ¶
DumpConfigArgValues dumps the values for configuration arguments. Here, order does not matter on the level of the config args, but only for the value set for a single config arg.
func DumpConfigArgs ¶
DumpConfigArgs dumps all configuration "args" to a writer, sorted by their arg numbers. This allows us to assemble the configuration args from common and additional elements without having to ensure that they are already in the correct order. Instead, we just now bring our configuration args into order, sorted by their arg numbers. This is necessary, as Wireshark has some quirks in the way it generates the extcap configuration Qt UI dialog. In particular, while it sorts the args by their numbers, it places the initial focus on the first config arg seen in a group, not the first one by its number.
Types ¶
type ArgVal ¶
type ArgVal struct { Display string // text displayed in selector Container string // container JSON data }
ArgVal represents a single config argument value for the container list selector.