summaryrefslogtreecommitdiff
path: root/op-mode-definitions/nhrp.xml.in
blob: 9e746cc3529ea604cd980660da46de0e57157f9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?xml version="1.0" encoding="UTF-8"?>
<interfaceDefinition>
  <node name="reset">
    <children>
      <node name="nhrp">
        <properties>
          <help>Clear/Purge NHRP entries</help>
        </properties>
        <children>
          <node name="flush">
            <properties>
              <help>Clear all non-permanent entries</help>
            </properties>
            <children>
              <tagNode name="tunnel">
                <properties>
                  <help>Clear all non-permanent entries</help>
                </properties>
                <command>sudo opennhrpctl flush dev $5 || echo OpenNHRP is not running.</command>
              </tagNode>
            </children>
            <command>sudo opennhrpctl flush || echo OpenNHRP is not running.</command>
          </node>
          <node name="purge">
            <properties>
              <help>Purge entries from NHRP cache</help>
            </properties>
            <children>
              <tagNode name="tunnel">
                <properties>
                  <help>Purge all entries from NHRP cache</help>
                </properties>
                <command>sudo opennhrpctl purge dev $5 || echo OpenNHRP is not running.</command>
              </tagNode>
            </children>
            <command>sudo opennhrpctl purge || echo OpenNHRP is not running.</command>
          </node>
        </children>
      </node>
    </children>
  </node>
  <node name="show">
    <children>
      <node name="nhrp">
        <properties>
          <help>Show NHRP info</help>
        </properties>
        <children>
          <leafNode name="interface">
            <properties>
              <help>Show NHRP interface connection information</help>
            </properties>
            <command>if [ -f /var/run/opennhrp.pid ]; then sudo opennhrpctl interface show; else echo OpenNHRP is not running.; fi</command>
          </leafNode>
          <leafNode name="tunnel">
            <properties>
              <help>Show NHRP tunnel connection information</help>
            </properties>
            <command>if [ -f /var/run/opennhrp.pid ]; then sudo opennhrpctl show ; else echo OpenNHRP is not running.; fi</command>
          </leafNode>
        </children>
      </node>
    </children>
  </node>
</interfaceDefinition>