Skip to main content

Module cmdtree

Module cmdtree 

Source

Structs§

Completion
what Tab does
Mode
a mode of the command line
NoNames
no names at all
Parsed
a parsed command line
Tree
a tree of commands in modes

Enums§

Error
why a line does not parse
Help
the answer to “?”
Param
a typed parameter
Val
a value of a parsed command

Constants§

F_HIDDEN
not listed by help and completion (aliases, commands of the configuration file only)
F_NO
a command may be negated (“no shutdown”); set on its first word

Traits§

Names
the names a NAME parameter takes (interfaces of a device); “” in a name stands for a number (“Loopback”, “GigabitEthernet0/0/0.*”)

Functions§

parse_ipv4
“10.1.2.3” -> [10, 1, 2, 3] (four decimal parts of at most 255, no signs)
parse_ipv6
an IPv6 address in any RFC 4291 text form: eight groups of up to four hex digits, “::” once for a run of zero groups, the last 32 bits as dotted decimal (“::ffff:10.0.0.1”); hex digits in either case
parse_mac
“aabb.ccdd.eeff”, “aa:bb:cc:dd:ee:ff” or “aa-bb-cc-dd-ee-ff”
parse_mask
the length of a contiguous dotted netmask (“255.255.255.0” -> 24)

Type Aliases§

ModeId
the index of a mode
NodeId
the index of a node of a tree