summaryrefslogtreecommitdiff
path: root/op-mode-definitions
diff options
context:
space:
mode:
Diffstat (limited to 'op-mode-definitions')
-rw-r--r--op-mode-definitions/lldp.xml.in17
-rw-r--r--op-mode-definitions/traffic-dump.xml.in55
2 files changed, 25 insertions, 47 deletions
diff --git a/op-mode-definitions/lldp.xml.in b/op-mode-definitions/lldp.xml.in
index 985262a89..dc1331cc8 100644
--- a/op-mode-definitions/lldp.xml.in
+++ b/op-mode-definitions/lldp.xml.in
@@ -13,6 +13,12 @@
</properties>
<command>${vyos_op_scripts_dir}/lldp.py show_neighbors</command>
<children>
+ <node name="detail">
+ <properties>
+ <help>Show extended detail for LLDP neighbors</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/lldp.py show_neighbors --detail</command>
+ </node>
<tagNode name="interface">
<properties>
<help>Show LLDP for specified interface</help>
@@ -21,6 +27,17 @@
</completionHelp>
</properties>
<command>${vyos_op_scripts_dir}/lldp.py show_neighbors --interface $5</command>
+ <children>
+ <node name="detail">
+ <properties>
+ <help>Show detailed LLDP for specified interface</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces</script>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/lldp.py show_neighbors --interface $5 --detail</command>
+ </node>
+ </children>
</tagNode>
</children>
</node>
diff --git a/op-mode-definitions/traffic-dump.xml.in b/op-mode-definitions/traffic-dump.xml.in
index 76e3ddce5..e86e69736 100644
--- a/op-mode-definitions/traffic-dump.xml.in
+++ b/op-mode-definitions/traffic-dump.xml.in
@@ -8,7 +8,7 @@
</properties>
<children>
<tagNode name="interface">
- <command>sudo tcpdump -i $4</command>
+ <command>${vyos_op_scripts_dir}/tcpdump.py $4</command>
<properties>
<help>Monitor traffic dump from an interface</help>
<completionHelp>
@@ -16,54 +16,15 @@
</completionHelp>
</properties>
<children>
- <node name="verbose">
- <command>sudo tcpdump -vvv -ne -i $4</command>
+ <leafNode name="node.tag">
<properties>
- <help>Provide more detailed packets for each monitored traffic</help>
+ <help>Traffic capture options</help>
+ <completionHelp>
+ <script>${vyos_op_scripts_dir}/tcpdump.py --get-options-nested "${COMP_WORDS[@]}"</script>
+ </completionHelp>
</properties>
- <children>
- <tagNode name="filter">
- <command>sudo tcpdump -vvv -ne -i $4 "${@:6}"</command>
- <properties>
- <help>Monitor traffic matching filter conditions</help>
- </properties>
- </tagNode>
- <tagNode name="save">
- <command>sudo tcpdump -vvv -ne -i $4 -w $6</command>
- <properties>
- <help>Save traffic dump from an interface to a file</help>
- </properties>
- <children>
- <tagNode name="filter">
- <command>sudo tcpdump -vvv -ne -i $4 -w $6 "${@:8}"</command>
- <properties>
- <help>Save a dump of traffic matching filter conditions to a file</help>
- </properties>
- </tagNode>
- </children>
- </tagNode>
- </children>
- </node>
- <tagNode name="filter">
- <command>sudo tcpdump -n -i $4 "${@:6}"</command>
- <properties>
- <help>Monitor traffic matching filter conditions</help>
- </properties>
- </tagNode>
- <tagNode name="save">
- <command>sudo tcpdump -n -i $4 -w $6</command>
- <properties>
- <help>Save traffic dump from an interface to a file</help>
- </properties>
- <children>
- <tagNode name="filter">
- <command>sudo tcpdump -n -i $4 -w $6 "${@:8}"</command>
- <properties>
- <help>Save a dump of traffic matching filter conditions to a file</help>
- </properties>
- </tagNode>
- </children>
- </tagNode>
+ <command>${vyos_op_scripts_dir}/tcpdump.py "${@:4}"</command>
+ </leafNode>
</children>
</tagNode>
</children>