YANG models

This section shows the content of all the YANG files.

sixwind-router

module sixwind-router {
  namespace "urn:6wind:router";
  prefix router;

  organization "6WIND";
  description
    "6WIND router data model";
  contact
    "support@6wind.com";

  revision "2017-12-04" {
    description
      "Initial revision.";
  }

  container monitoring {
     config false;
     description
       "6WIND monitoring data model.";
  }
}

fp

module fp {
  namespace "urn:6wind:router:monitoring:fp";
  prefix fp;

  include fp-cpu-usage;
  include fp-ctx-switch-stats;
  include fp-exception-queue-stats;
  include fp-filling;
  include fp-filling-cg-nat;
  include fp-cg-nat-stats;
  include fp-ports-stats;
  include fp-exceptions-stats;
  include fp-global-stats;
  include fp-gre-stats;
  include fp-ip-stats;
  include fp-ipsec-stats;
  include fp-l2-stats;
  include fp-vxlan-stats;

  import sixwind-router {
    prefix sixwind-router;
  }

  description
    "This module provides support for showing fp information.";

  revision "2017-10-11" {
    description
      "Initial revision.";
  }

  augment /sixwind-router:monitoring {
    description
      "Fast path information.";
    container statistics {
    }
  }
}

fp-cpu-usage

submodule fp-cpu-usage {

  belongs-to fp {
    prefix fp;
  }
  import sixwind-router {
    prefix sixwind-router;
  }

  description
    "This submodule provides support for showing fp load information.";

  revision "2018-02-02" {
    description
      "Initial revision.";
  }

  augment /sixwind-router:monitoring {
    list fp-cpu-usage {
      key cpu;

      description
        "The list of busy percentage per CPU.";

      leaf cpu {
        type string;
        description
          "The CPU number.";
      }

      leaf busy {
        type uint16;
        description
          "The busy percentage.";
      }
    }

    container status {
      leaf text {
        type enumeration {
          enum ok;
          enum loaded;
          enum stopped;
          enum bad;
        }
        description
          "The Fast Path status in text.";
      }
      leaf value {
        type uint8;
        description
          "The Fast Path status in number.
           0 - ok, 1 - loaded, 2 - stopped, 3 - bad.";
      }
    }
  }
}

fp-ctx-switch-stats

submodule fp-ctx-switch-stats {

  belongs-to fp {
    prefix fp;
  }

  import sixwind-router {
    prefix sixwind-router;
  }

  description
    "This submodule provides support for showing fp context switch stats
     information.";

  revision "2017-10-11" {
    description
      "Initial revision.";
  }

  augment /sixwind-router:monitoring/fp:statistics {
    list ctx-switch {
      key cpu;

      description
        "The list of context switch statistics per fast path core.";

      leaf cpu {
        type string;
        description
          "The CPU number.";
      }
      leaf voluntary {
        type uint64;
        description
          "Voluntary context switches.";
      }
      leaf nonvoluntary {
        type uint64;
        description
          "Nonvoluntary context switches.";
      }
    }
  }
}

fp-exception-queue-stats

submodule fp-exception-queue-stats {

  belongs-to fp {
    prefix fp;
  }
  import sixwind-router {
    prefix sixwind-router;
  }

  description
    "This submodule provides support for showing fp exception queues information.";

  revision "2018-02-02" {
    description
      "Initial revision.";
  }

  augment /sixwind-router:monitoring/fp:statistics {
    list exception-queue {
      key ring;

      description
        "The list of exception queue statistics per ring.";

      leaf ring {
        type string;
        description "The ring ID.";
      }
      leaf dequeue {
        type uint64;
        description
          "Number of packets dequeued by Linux from rx-ring or fast path from
           tx-ring.";
      }
      leaf dequeue-copy-errors {
        type uint64;
        description
          "Number of packets dropped due to copy error on dequeue operation
           (Linux only).";
      }
      leaf enqueue {
        type uint64;
        description
          "Number of packets enqueued by Linux to tx-ring or by fast path to
           rx-ring.";
      }
      leaf enqueue-cp-kept {
        type uint64;
        description
          "Number of recognized control plane packets kept when the ring is more
           than half full.";
      }
      leaf enqueue-dp-drop {
        type uint64;
        description
          "Number of data plane packets dropped when the ring is more than
           half full.";
      }
      leaf enqueue-errors {
        type uint64;
        description
          "Number of packets dropped due to error on enqueue operation.";
      }
    }
  }
}

fp-exceptions-stats

submodule fp-exceptions-stats {

  belongs-to fp {
    prefix fp;
  }
  import sixwind-router {
    prefix sixwind-router;
  }

  description
    "This submodule provides support for showing fp exception information.";

  revision "2018-02-06" {
    description
      "Initial revision.";
  }

  augment /sixwind-router:monitoring/fp:statistics {

    container exceptions {
      leaf FPTUN_IPV6_OUTPUT_EXCEPT {
        type uint64;
        description
          "Number of FPTUN exception packets for Linux IPv6 output.";
      }
      leaf FPTUN_IPV6_IPSECDONE_OUTPUT_EXCEPT {
        type uint64;
        description
          "Number of FPTUN exception packets for Linux IPv6 output after IPsec
           processing.";
      }
      leaf FPTUN_ETH_INPUT_EXCEPT {
        type uint64;
        description
          "Number of FPTUN exception packets for Linux ethernet input processing.";
      }
      leaf FPTUN_BASIC_EXCEPT {
        type uint64;
        description
          "Number of basic exception packets for Linux reception processing.";
      }
      leaf FPTUN_IPV6_IPSECDONE_INPUT_EXCEPT {
        type uint64;
        description
          "Number of FPTUN exception packets for Linux IPv6 input after IPsec
           processing.";
      }
      leaf FPTUN_IPV4_NATDONE_INPUT_EXCEPT {
        type uint64;
        description
          "Number of FPTUN exception packets for Linux IPv4 input after NAT
           processing.";
      }
      leaf FPTUN_IPV4_IPSECDONE_OUTPUT_EXCEPT {
        type uint64;
        description
          "Number of FPTUN exception packets for Linux IPv4 output after IPsec
           processing.";
      }
      leaf FPTUN_IPV4_OUTPUT_EXCEPT {
        type uint64;
        description
          "Number of FPTUN exception packets for Linux IPv6 output.";
      }
      leaf FPTUN_ETH_NOVNB_INPUT_EXCEPT {
        type uint64;
        description
          "Number of FPTUN exception packets for Linux processing skipping VNB.";
      }
      leaf FPTUN_VNB2VNB_LINUX_TO_FP_EXCEPT {
        type uint64;
        description
          "Number of FPTUN exception packets for Linux VNB processing.";
      }
      leaf FPTUN_IPV4_IPSECDONE_INPUT_EXCEPT {
        type uint64;
        description
          "Number of FPTUN exception packets for Linux IPv4 input after IPsec
           processing.";
      }
      leaf FPTUN_IFACE_INPUT_EXCEPT {
        type uint64;
        description
          "Number of FPTUN exception packets for Linux VNB iface processing.";
      }
      leaf FPTUN_TAP {
        type uint64;
        description
          "Number of FPTUN exception packets for Linux TAP (tcpdump).";
      }
      leaf FPTUN_OUTPUT_EXCEPT {
        type uint64;
        description
          "Number of FPTUN exception packets for Linux interface output
           processing.";
      }
      leaf FPTUN_VNB2VNB_FP_TO_LINUX_EXCEPT {
        type uint64;
        description
          "Number of FPTUN VNB exception packets for Linux VNB input processing.";
      }
      leaf FPTUN_ETH_SP_OUTPUT_REQ {
        type uint64;
        description
          "Number of FPTUN exception packets from Linux for fast path ethernet
           processing.";
      }
      leaf FPTUN_IPSEC_SP_OUTPUT_REQ {
        type uint64;
        description
          "Number of FPTUN exception packets from Linux for fast path IPsec
           processing.";
      }
      leaf FPTUN_IPV4_SP_OUTPUT_REQ {
        type uint64;
        description
          "Number of FPTUN exception packets from Linux for fast path IPv4
           processing.";
      }
      leaf FPTUN_IPV6_SP_OUTPUT_REQ {
        type uint64;
        description
          "Number of FPTUN exception packets from Linux for fast path IPv6
           processing.";
      }
      leaf FPTUN_RFPS_UPDATE {
        type uint64;
        description
          "Number of FPTUN exception packets for fast path statistics processing.";
      }
      leaf FPTUN_TRAFFIC_GEN_MSG {
        type uint64;
        description
          "Number of FPTUN exception packets for fast path traffic generator
           processing.";
      }
      leaf ExcpDroppedFpToLinuxAddMarkFailure {
        type uint64;
        description
          "Number of exception packets to Linux dropped due to a tag addition
           failure.";
      }
      leaf ExcpDroppedFpToLinuxNoIPv4RouteLocal {
        type uint64;
        description
          "Number of exception packets to Linux dropped due to a failure to find
           the IPv4 route.";
      }
      leaf ExcpDroppedFpToLinuxNoIPv6RouteLocal {
        type uint64;
        description
          "Number of exception packets to Linux dropped due to a failure to find
           the IPv6 route.";
      }
      leaf ExcpDroppedFpToLinuxPrependFailure {
        type uint64;
        description
          "Number of exception packets to Linux dropped due to a prepend failure.";
      }
      leaf ExcpDroppedLinuxToFpGenericCommandFailure {
        type uint64;
        description
          "Number of packets from Linux dropped due to a FPTUN internal error.";
      }
      leaf ExcpDroppedLinuxToFpIPv4PullupFailure {
        type uint64;
        description
          "Number of packets from Linux dropped due to a failure when getting the
           IPv4 header of the FPTUN message.";
      }
      leaf ExcpDroppedLinuxToFpIPv6PullupFailure {
        type uint64;
        description
          "Number of packets from Linux dropped due to a failure when getting the
           IPv6 header of the FPTUN message.";
      }
      leaf ExcpDroppedLinuxToFpInvalidPortId {
        type uint64;
        description
          "Number of packets from Linux dropped due to a reception of a FPTUN
           message on an unexpected port.";
      }
      leaf ExcpDroppedLinuxToFpInvalidVersion {
        type uint64;
        description
          "Number of packets from Linux dropped due to an invalid FPTUN version.";
      }
      leaf ExcpDroppedLinuxToFpMsgTooShort {
        type uint64;
        description
          "Number of packets from Linux dropped due to an incomplete FPTUN
           message.";
      }
      leaf ExcpDroppedLinuxToFpNoOutputFunction {
        type uint64;
        description
          "Number of packets from Linux dropped because no TX function has been
           registered.";
      }
      leaf ExcpDroppedLinuxToFpOtherHost {
        type uint64;
        description
          "Number of packets from Linux dropped due to a reception of a FPTUN
           message marked as PACKET_OTHERHOST.";
      }
      leaf ExcpDroppedLinuxToFpOutOperative {
        type uint64;
        description
          "Number of packets from Linux dropped because the destination interface
           is down.";
      }
      leaf ExcpDroppedLinuxToFpUnknownCommand {
        type uint64;
        description
          "Number of packets from Linux dropped due to an invalid FPTUN command.";
      }
      leaf ExcpDroppedLinuxToFpUnknownIfUid {
        type uint64;
        description
          "Number of packets from Linux dropped due to an invalid interface id for
           FPTUN.";
      }
    }
  }
}

fp-filling

submodule fp-filling {

  belongs-to fp {
    prefix fp;
  }
  import sixwind-router {
    prefix sixwind-router;
  }

  description
    "This submodule provides support for showing fp filling information.";

  revision "2018-02-02" {
    description
      "Initial revision.";
  }

  augment /sixwind-router:monitoring {
    container filling {
      leaf interfaces-current {
        type uint64;
        description
          "Current number of interfaces in the fast path.";
      }
      leaf interfaces-max {
        type uint64;
        description
          "Maximum number of interfaces in the fast path.";
      }
      leaf neighbors-ipv4-current {
        type uint64;
        description
          "Current number of IPv4 neighbors in the fast path.";
      }
      leaf neighbors-ipv4-max {
        type uint64;
        description
          "Maximum number of IPv4 neighbors in the fast path.";
      }
      leaf routes-ipv4-current {
        type uint64;
        description
          "Current number of IPv4 routes in the fast path.";
      }
      leaf routes-ipv4-max {
        type uint64;
        description
          "Maximum number of IPv4 routes in the fast path.";
      }
      leaf vrf-current {
        type uint64;
        description
          "Current number of VRFs (Virtual Routing Functions) in the fast path.";
      }
      leaf vrf-max {
        type uint64;
        description
          "Maximum number of VRFs (Virtual Routing Functions) in the fast path.";
      }
      leaf routing-tree-subtables-current {
        type uint64;
        description
          "Current number of routing tree subtables in the fast path.";
      }
      leaf routing-tree-subtables-max {
        type uint64;
        description
          "Maximum number of routing tree subtables in the fast path.";
      }
      leaf routing-tree-entries-current {
        type uint64;
        description
          "Current number of routing tree entries in the fast path.";
      }
      leaf routing-tree-entries-max {
        type uint64;
        description
          "Maximum number of routing tree entries in the fast path.";
      }
      leaf pbr-rules-current {
        type uint64;
        description
          "Current number of PBR (policy based routing) rules in the fast path.";
      }
      leaf pbr-rules-max {
        type uint64;
        description
          "Maximum number of PBR (policy based routing) rules in the fast path.";
      }
      leaf neighbors-ipv6-current {
        type uint64;
        description
          "Current number of IPv6 neighbors in the fast path.";
      }
      leaf neighbors-ipv6-max {
        type uint64;
        description
          "Maximum number of IPv6 neighbors in the fast path.";
      }
      leaf routes-ipv6-current {
        type uint64;
        description
          "Current number of IPv6 routes in the fast path.";
      }
      leaf routes-ipv6-max {
        type uint64;
        description
          "Maximum number of IPv6 routes in the fast path.";
      }
      leaf ipsec-sa-current {
        type uint64;
        description
          "Current number of IPsec Security Associations in the fast path.";
      }
      leaf ipsec-sa-max {
        type uint64;
        description
          "Maximum number of IPsec Security Associations in the fast path.";
      }
      leaf ipsec-sp-current {
        type uint64;
        description
          "Current number of IPsec Security Policies in the fast path.";
      }
      leaf ipsec-sp-max {
        type uint64;
        description
          "Maximum number of IPsec Security Policies in the fast path.";
      }
      leaf svti-interfaces-current {
        type uint64;
        description
          "Current number of SVTI interfaces in the fast path.";
      }
      leaf svti-interfaces-max {
        type uint64;
        description
          "Maximum number of SVTI interfaces in the fast path.";
      }
      leaf vxlan-port-current {
        type uint64;
        description
          "Current number of VXLAN UDP ports configured in the fast path.";
      }
      leaf vxlan-port-max {
        type uint64;
        description
          "Maximum number of VXLAN UDP ports configured in the fast path.";
      }
      leaf vxlan-interfaces-current {
        type uint64;
        description
          "Current number of VXLAN interfaces in the fast path.";
      }
      leaf vxlan-interfaces-max {
        type uint64;
        description
          "Maximum number of VXLAN interfaces in the fast path.";
      }
      leaf vxlan-fdb-current {
        type uint64;
        description
          "Current number of entries in VXLAN FDB (forwarding database) in the
           fast path.";
      }
      leaf vxlan-fdb-max {
        type uint64;
        description
          "Maximum number of entries in VXLAN FDB (forwarding database) in the
           fast path.";
      }
      leaf gre-interfaces-current {
        type uint64;
        description
          "Current number of GRE interfaces in the fast path.";
      }
      leaf gre-interfaces-max {
        type uint64;
        description
          "Maximum number of GRE interfaces in the fast path.";
      }
      leaf vlan-interfaces-current {
        type uint64;
        description
          "Current number of VLAN interfaces in the fast path.";
      }
      leaf vlan-interfaces-max {
        type uint64;
        description
          "Maximum number of VLAN interfaces in the fast path.";
      }
      leaf macvlan-interfaces-current {
        type uint64;
        description
          "Current number of MACVLAN interfaces in the fast path.";
      }
      leaf macvlan-interfaces-max {
        type uint64;
        description
          "Maximum number of MACVLAN interfaces in the fast path.";
      }
      leaf lag-interfaces-current {
        type uint64;
        description
          "Current number of LAG interfaces in the fast path.";
      }
      leaf lag-interfaces-max {
        type uint64;
        description
          "Maximum number of LAG interfaces in the fast path.";
      }
      leaf lag-slave-interfaces-current {
        type uint64;
        description
          "Current number of LAG slave interfaces in the fast path.";
      }
      leaf lag-slave-interfaces-max {
        type uint64;
        description
          "Maximum number of LAG slave interfaces in the fast path.";
      }
      leaf bridge-ports-current {
        type uint64;
        description
          "Current number of bridge ports in the fast path.";
      }
      leaf bridge-ports-max {
        type uint64;
        description
          "Maximum number of bridge ports in the fast path.";
      }
      leaf bridge-interfaces-current {
        type uint64;
        description
          "Current number of bridges in the fast path.";
      }
      leaf bridge-interfaces-max {
        type uint64;
        description
          "Maximum number of bridges in the fast path.";
      }
      leaf bridge-fdb-current {
        type uint64;
        description
          "Current number of entries in bridge FDB (forwarding database) in the
           fast path.";
      }
      leaf bridge-fdb-max {
        type uint64;
        description
          "Maximum number of entries in bridge FDB (forwarding database) in the
           fast path.";
      }
      leaf filterbridge-rules-current {
        type uint64;
        description
          "Current number of filter bridge rules in the fast path.";
      }
      leaf filterbridge-rules-max {
        type uint64;
        description
          "Maximum number of filter bridge rules in the fast path.";
      }
      leaf filter-ipv4-rules-current {
        type uint64;
        description
          "Current number of IPv4 filter rules in the fast path.";
      }
      leaf filter-ipv4-rules-max {
        type uint64;
        description
          "Maximum number of IPv4 filter rules in the fast path.";
      }
      leaf filter-ipv6-rules-current {
        type uint64;
        description
          "Current number of IPv6 filter rules in the fast path.";
      }
      leaf filter-ipv6-rules-max {
        type uint64;
        description
          "Maximum number of IPv6 filter rules in the fast path.";
      }
      leaf conntracks-ipv4-current {
        type uint64;
        description
          "Current number of IPv4 conntracks in the fast path.";
      }
      leaf conntracks-ipv4-max {
        type uint64;
        description
          "Maximum number of IPv4 conntracks in the fast path.";
      }
      leaf conntracks-ipv6-current {
        type uint64;
        description
          "Current number of IPv6 conntracks in the fast path.";
      }
      leaf conntracks-ipv6-max {
        type uint64;
        description
          "Maximum number of IPv6 conntracks in the fast path.";
      }
      leaf ipsets-current {
        type uint64;
        description
          "Current number of ipsets in the fast path.";
      }
      leaf ipsets-max {
        type uint64;
        description
          "Maximum number of ipsets in the fast path.";
      }
      leaf fp-vswitch-ports-current {
        type uint64;
        description
          "Current number of fp-vswitch ports in the fast path.";
      }
      leaf fp-vswitch-ports-max {
        type uint64;
        description
          "Maximum number of fp-vswitch ports in the fast path.";
      }
      leaf fp-vswitch-flows-current {
        type uint64;
        description
          "Current number of fp-vswitch flows in the fast path.";
      }
      leaf fp-vswitch-flows-max {
        type uint64;
        description
          "Maximum number of fp-vswitch flows in the fast path.";
      }
      leaf fp-vswitch-masks-current {
        type uint64;
        description
          "Current number of fp-vswitch masks in the fast path.";
      }
      leaf fp-vswitch-masks-max {
        type uint64;
        description
          "Maximum number of fp-vswitch masks in the fast path.";
      }
      leaf qos-sched-current {
        type uint64;
        description
          "Current number of QoS schedulers in the fast path.";
      }
      leaf qos-sched-max {
        type uint64;
        description
          "Maximum number of QoS schedulers in the fast path.";
      }
      leaf qos-class-current {
        type uint64;
        description
          "Current number of QoS classes in the fast path.";
      }
      leaf qos-class-max {
        type uint64;
        description
          "Maximum number of QoS classes in the fast path.";
      }
      leaf qos-filter-current {
        type uint64;
        description
          "Current number of QoS filters in the fast path.";
      }
      leaf qos-filter-max {
        type uint64;
        description
          "Maximum number of QoS filters in the fast path.";
      }
      leaf qos-meter-current {
        type uint64;
        description
          "Current number of QoS meters in the fast path.";
      }
      leaf qos-meter-max {
        type uint64;
        description
          "Maximum number of QoS meters in the fast path.";
      }
    }
  }

}

fp-filling-cg-nat

submodule fp-filling-cg-nat {

  belongs-to fp {
    prefix fp;
  }
  import sixwind-router {
    prefix sixwind-router;
  }

  description
    "This module provides support for showing fp cg-nat filling information.";

  revision "2019-07-03" {
    description
      "Initial revision.";
  }

  augment /sixwind-router:monitoring/fp:filling {
    leaf cgnat-conntracks-current {
      type uint64;
      description
	"Current number of conntracks for the cg-nat module.";
    }
    leaf cgnat-conntracks-max {
      type uint64;
      description
	"Maximum number of conntracks for the cg-nat module.";
    }
    leaf cgnat-nats-current {
      type uint64;
      description
	"Current number of nat entries for the cg-nat module.";
    }
    leaf cgnat-nats-max {
      type uint64;
      description
	"Maximum number of nat entries for the cg-nat module.";
    }
    leaf cgnat-cpes-current {
      type uint64;
      description
	"Current number of CPEs for the cg-nat module.";
    }
    leaf cgnat-cpes-max {
      type uint64;
      description
	"Maximum number of CPEs for the cg-nat module.";
    }
    leaf cgnat-blocks-current {
      type uint64;
      description
	"Current number of blocks for the cg-nat module.";
    }
    leaf cgnat-blocks-max {
      type uint64;
      description
	"Maximum number of blocks for the cg-nat module.";
    }
  }
}

fp-global-stats

submodule fp-global-stats {

  belongs-to fp {
    prefix fp;
  }
  import sixwind-router {
    prefix sixwind-router;
  }

  description
    "This submodule provides support for showing fp global information.";

  revision "2018-02-02" {
    description
      "Initial revision.";
  }

  augment /sixwind-router:monitoring/fp:statistics {

    container global {
      leaf fp_dropped {
        type uint64;
        description
          "Number of packets dropped by fast path.";
      }
      leaf fp_dropped_arp {
        type uint64;
        description
          "Number of packets dropped by fast path in ARP.";
      }
      leaf fp_dropped_bonding {
        type uint64;
        description
          "Number of packets dropped by fast path in bonding.";
      }
      leaf fp_dropped_bridge {
        type uint64;
        description
          "Number of packets dropped by fast path in bridge.";
      }
      leaf fp_dropped_ebpf {
        type uint64;
        description
          "Number of packets dropped by fast path in enhanced BPF (Berkeley
           Packet Filtering).";
      }
      leaf fp_dropped_ebtables {
        type uint64;
        description
          "Number of packets dropped by fast path in layer 2 filtering.";
      }
      leaf fp_dropped_ether {
        type uint64;
        description
          "Number of packets dropped by fast path at the generic ethernet layer.";
      }
      leaf fp_dropped_excp {
        type uint64;
        description
          "Number of packets dropped by fast path in exception path.";
      }
      leaf fp_dropped_gre {
        type uint64;
        description
          "Number of packets dropped by fast path in GRE.";
      }
      leaf fp_dropped_ib_roce {
        type uint64;
        description
          "Number of packets dropped by fast path in RDMA over Converged
           Ethernet.";
      }
      leaf fp_dropped_ip {
        type uint64;
        description
          "Number of packets dropped by fast path in generic IPv4.";
      }
      leaf fp_dropped_ipsec {
        type uint64;
        description
          "Number of packets dropped by fast path in IPv4 IPsec.";
      }
      leaf fp_dropped_ipsec6 {
        type uint64;
        description
          "Number of packets dropped by fast path in IPv6 IPsec.";
      }
      leaf fp_dropped_ipv6 {
        type uint64;
        description
          "Number of packets dropped by fast path in generic IPv6.";
      }
      leaf fp_dropped_macvlan {
        type uint64;
        description
          "Number of packets dropped by fast path in MACVLAN.";
      }
      leaf fp_dropped_mcast {
        type uint64;
        description
          "Number of packets dropped by fast path in IPv4 multicast.";
      }
      leaf fp_dropped_mcast6 {
        type uint64;
        description
          "Number of packets dropped by fast path in IPv6 multicast.";
      }
      leaf fp_dropped_mpls {
        type uint64;
        description
          "Number of packets dropped by fast path in MultiProtocol Label
           Switching.";
      }
      leaf fp_dropped_netfilter {
        type uint64;
        description
          "Number of packets dropped by fast path in IPv4 filtering.";
      }
      leaf fp_dropped_netfilter6 {
        type uint64;
        description
          "Number of packets dropped by fast path in IPv6 filtering.";
      }
      leaf fp_dropped_npf {
        type uint64;
        description
          "Number of packets dropped by fast path in Network Address Translation
           and Carrier-grade NAT.";
      }
      leaf fp_dropped_ovs {
        type uint64;
        description
          "Number of packets dropped by fast path in Open vSwitch.";
      }
      leaf fp_dropped_plugins {
        type uint64;
        description
          "Number of packets dropped by fast path in plugin.";
      }
      leaf fp_dropped_qos {
        type uint64;
        description
          "Number of packets dropped by fast path in QoS.";
      }
      leaf fp_dropped_reasm {
        type uint64;
        description
          "Number of packets dropped by fast path in IPv4 reassembly.";
      }
      leaf fp_dropped_reasm6 {
        type uint64;
        description
          "Number of packets dropped by fast path in IPv6 reassembly.";
      }
      leaf fp_dropped_system {
        type uint64;
        description
          "Number of packets dropped by fast path in internal processing.";
      }
      leaf fp_dropped_tc {
        type uint64;
        description
          "Number of packets dropped by fast path in generic traffic
           conditioning.";
      }
      leaf fp_dropped_tc_erl {
        type uint64;
        description
          "Number of packets dropped by fast path in traffic conditioning by
           exception rate limitation.";
      }
      leaf fp_dropped_tgen {
        type uint64;
        description
          "Number of packets dropped by fast path in traffic generator.";
      }
      leaf fp_dropped_tunnel {
        type uint64;
        description
          "Number of packets dropped by fast path in IPinIP tunnel.";
      }
      leaf fp_dropped_vlan {
        type uint64;
        description
          "Number of packets dropped by fast path in VLAN.";
      }
      leaf fp_dropped_vnb {
        type uint64;
        description
          "Number of packets dropped by fast path in VNB.";
      }
      leaf fp_dropped_vxlan {
        type uint64;
        description
          "Number of packets dropped by fast path in VXLAN.";
      }
      leaf fp_exception_bonding {
        type uint64;
        description
          "Number of packets send in exception in bonding.";
      }
      leaf fp_exception_bridge {
        type uint64;
        description
          "Number of packets send in exception in bridge.";
      }
      leaf fp_exception_ebtables {
        type uint64;
        description
          "Number of packets send in exception in layer 2 filtering.";
      }
      leaf fp_exception_ether {
        type uint64;
        description
          "Number of packets send in exception in generic layer 2.";
      }
      leaf fp_exception_gre {
        type uint64;
        description
          "Number of packets send in exception in GRE.";
      }
      leaf fp_exception_ifnet {
        type uint64;
        description
          "Number of packets send in exception by a virtual interface.";
      }
      leaf fp_exception_ip {
        type uint64;
        description
          "Number of packets send in exception in generic IPv4.";
      }
      leaf fp_exception_ipsec {
        type uint64;
        description
          "Number of packets send in exception in IPv4 IPsec.";
      }
      leaf fp_exception_ipsec6 {
        type uint64;
        description
          "Number of packets send in exception in IPv6 IPsec.";
      }
      leaf fp_exception_ipv6 {
        type uint64;
        description
          "Number of packets send in exception in generic IPv6.";
      }
      leaf fp_exception_macvlan {
        type uint64;
        description
          "Number of packets send in exception in MACVLAN.";
      }
      leaf fp_exception_mcast {
        type uint64;
        description
          "Number of packets send in exception by IPv4 multicast.";
      }
      leaf fp_exception_mcast6 {
        type uint64;
        description
          "Number of packets send in exception by IPv6 multicast.";
      }
      leaf fp_exception_mpls {
        type uint64;
        description
          "Number of packets send in exception in MPLS.";
      }
      leaf fp_exception_netfilter {
        type uint64;
        description
          "Number of packets send in exception in IPv4 filtering.";
      }
      leaf fp_exception_netfilter6 {
        type uint64;
        description
          "Number of packets send in exception in IPv6 filtering.";
      }
      leaf fp_exception_netfpc {
        type uint64;
        description
          "Number of packets send in exception in netfpc. This case can occur
           with some cli commands.";
      }
      leaf fp_exception_npf {
        type uint64;
        description
          "Number of packets send in exception in NPF.";
      }
      leaf fp_exception_ovs {
        type uint64;
        description
          "Number of packets send in exception in Open vSwitch.";
      }
      leaf fp_exception_packet_steer {
        type uint64;
        description
          "Number of packets send in exception in packet steering";
      }
      leaf fp_exception_reass {
        type uint64;
        description
          "Number of packets send in exception in IPv4 reassembly.";
      }
      leaf fp_exception_syslog {
        type uint64;
        description
          "Number of packets send in exception for logging (for system
           without syslog).";
      }
      leaf fp_exception_tap {
        type uint64;
        description
          "Number of packets send in exception in eBPF (Enhanced Berkeley
           Packet Filtering), typically when there is a tcpdump or sflow.";
      }
      leaf fp_exception_tunnel {
        type uint64;
        description
          "Number of packets send in exception in IPinIP tunnel.";
      }
      leaf fp_exception_vnb {
        type uint64;
        description
          "Number of packets send in exception in VNB.";
      }
      leaf fp_exception_vxlan {
        type uint64;
        description
          "Number of packets send in exception in VXLAN.";
      }
    }
  }
}

fp-gre-stats

submodule fp-gre-stats {

  belongs-to fp {
    prefix fp;
  }
  import sixwind-router {
    prefix sixwind-router;
  }

  description
    "This submodule provides support for showing fp gre information.";

  revision "2018-02-06" {
    description
      "Initial revision.";
  }

  augment /sixwind-router:monitoring/fp:statistics {

    container gre {
      leaf GREDroppedInIPv4Operative {
        type uint64;
        description
          "Number of input packets dropped in GRE because the incoming interface
           is down.";
      }
      leaf GREDroppedInIPv6Operative {
        type uint64;
        description
          "Number of input packets dropped in GRE6 because the incoming interface
           is down.";
      }
      leaf GREDroppedInitGreIPv4HeaderFailure {
        type uint64;
        description
          "Number of output packets dropped in GRE due to a failure to add the
           GRE header.";
      }
      leaf GREDroppedInitGreIPv6HeaderFailure {
        type uint64;
        description
          "Number of output packets dropped in GRE6 due to a failure to add the
           GRE header.";
      }
      leaf GREDroppedInitIPv4HeaderFailure {
        type uint64;
        description
          "Number of output packets dropped in GRE due to a failure to add the
           IPv4 header.";
      }
      leaf GREDroppedInitIPv6HeaderFailure {
        type uint64;
        description
          "Number of output packets dropped in GRE due to a failure to add the
           IPv4 header.";
      }
      leaf GREDroppedMissingChecksum {
        type uint64;
        description
          "Number of input packets dropped in GRE due to a missing checksum.";
      }
      leaf GREDroppedOutOperative {
        type uint64;
        description
          "Number of output packets dropped in GRE because the outgoing interface
           is down.";
      }
      leaf GREDroppedParseIPv4HeaderFailure {
        type uint64;
        description
          "Number of input packets dropped in GRE due to failure to parse
           IPv4 header.";
      }
      leaf GREDroppedParseIPv6HeaderFailure {
        type uint64;
        description
          "Number of input packets dropped in GRE due to failure to parse
           IPv6 header.";
      }
      leaf GREDroppedPullupIPv4HeaderFailure {
        type uint64;
        description
          "Number of input packets dropped in IPv4 GRE due to pullup failure on
           gre header.";
      }
      leaf GREDroppedPullupIPv6HeaderFailure {
        type uint64;
        description
          "Number of input packets dropped in IPv6 GRE due to pullup failure on
           gre header.";
      }
      leaf GREDroppedUnexpectedChecksum {
        type uint64;
        description
          "Number of input packets dropped in GRE due to an unexpected checksum.";
      }
      leaf GREDroppedWrongChecksum {
        type uint64;
        description
          "Number of input packets dropped in GRE due to an incorrect checksum.";
      }
      leaf GREExceptionIPv4Route {
        type uint64;
        description
          "Number of output packets sent to exception by GRE due to specific route
           (for IPv4 packet).";
      }
      leaf GREExceptionIPv4SourceSelectFailed {
        type uint64;
        description
          "Number of output packets sent to exception by GRE due to no src address
           can be set (for IPv4 packet).";
      }
      leaf GREExceptionIPv6Route {
        type uint64;
        description
          "Number of output packets sent to exception by GRE due to specific route
           (for IPv6 packet).";
      }
      leaf GREExceptionInputUnsupportedProtocol {
        type uint64;
        description
          "Number of input packets sent to exception by GRE due to unsupported
           GRE protocol.";
      }
      leaf GREExceptionOutputUnsupportedProtocol {
        type uint64;
        description
          "Number of output packets sent to exception by GRE due to unsupported
           GRE protocol.";
      }
      leaf GREExceptionUnknownIface {
        type uint64;
        description
          "Number of output packets sent to exception by GRE due to an invalid
           GRE interface id.";
      }
      leaf GREExceptionUnsupportedEtherType {
        type uint64;
        description
          "Number of output packets sent to exception by GRE due to unsupported
           ethernet type.";
      }
      leaf GREExceptionUnsupportedFamily {
        type uint64;
        description
          "Number of output packets sent to exception by GRE due to unsupported
           IP family (case of IPv6 with no support of IPv6 by fastpath).";
      }
      leaf GREInvalidHeader {
        type uint64;
        description
          "Number of input packets not managed by GRE due to routing flags set
           (see rfc 1701) or version number different to 0. The packet can be
           dropped or sent to exception later in other fast path processing part.";
      }
      leaf GRETAPDroppedInOperative {
        type uint64;
        description
          "Number of input packets dropped in GRETAP because the incoming
           interface is down.";
      }
      leaf GRETAPDroppedOutOperative {
        type uint64;
        description
          "Number of output packets dropped in GRETAP because the outgoing
           interface is down.";
      }
      leaf GRETAPExceptionUnknownIface {
        type uint64;
        description
          "Number of output packets sent to exception by GRETAP due to an invalid
           GRE interface id.";
      }
    }
  }
}

fp-ip-stats

submodule fp-ip-stats {

  belongs-to fp {
    prefix fp;
  }
  import sixwind-router {
    prefix sixwind-router;
  }

  description
    "This submodule provides support for showing fp ip information.";

  revision "2018-02-06" {
    description
      "Initial revision.";
  }

  augment /sixwind-router:monitoring/fp:statistics {

    container ip {
      leaf IpForwDatagrams {
        type uint64;
        description
          "Number of IP packets forwarded.";
      }
      leaf IpInReceives {
        type uint64;
        description
          "Number of IP packets received.";
      }
      leaf IpInDelivers {
        type uint64;
        description
          "Number of IP packets delivered to user-protocols.";
      }
      leaf IpInHdrErrors {
        type uint64;
        description
          "Number of IP packets discarded due to errors in header.";
      }
      leaf IpDroppedForwarding {
        type uint64;
        description
          "Number of IP packets discarded due to forwarding being disabled.";
      }
      leaf IpInAddrErrors {
        type uint64;
        description
          "Number of IP packets discarded due to invalid IP address.";
      }
      leaf IpInTruncatedPkts {
        type uint64;
        description
          "Number of IP packets discarded due to a truncate IP header.";
      }
      leaf IpCsumErrors {
        type uint64;
        description
          "Number of IP packets discarded due to an invalid checksum.";
      }
      leaf IpDroppedNoMemory {
        type uint64;
        description
          "Number of IP packets discarded due to memory allocation errors.";
      }
      leaf IpDroppedNoArp {
        type uint64;
        description
          "Number of IP packets discarded due to missing ARP resolution.";
      }
      leaf IpDroppedIPsec {
        type uint64;
        description
          "Number of IP packets discarded by IPsec processing.";
      }
      leaf IpDroppedBlackhole {
        type uint64;
        description
          "Number of IP packets discarded due to matching blackhole route.";
      }
      leaf IpDroppedRouteException {
        type uint64;
        description
          "Number of IP packets sent to exception due to specific route";
      }
      leaf IpReasmOKs {
        type uint64;
        description
          "Number of IP packets successfully reassembled.";
      }
      leaf IpDroppedInvalidInterface {
        type uint64;
        description
          "Number of IP packets discarded due to invalid outgoing interface.";
      }
      leaf IPDroppedOutOperative {
        type uint64;
        description
          "Number of IP packets discarded because the outgoing interface is down.";
      }
      leaf IpDroppedNetfilter {
        type uint64;
        description
          "Number of IP packets discarded by filtering processing.";
      }
      leaf IpReasmTimeout {
        type uint64;
        description
          "Number of IP packets discarded due to timeout in reassembly
           processing.";
      }
      leaf IpReasmReqds {
        type uint64;
        description
          "Number of IP fragments packets submitted to reassembly processing.";
      }
      leaf IpReasmFails {
        type uint64;
        description
          "Number of IP packets discarded due to failures during reassembly
           processing.";
      }
      leaf IpReasmExceptions {
        type uint64;
        description
          "Number of IP fragment packets sent in exception path.";
      }
      leaf IpReasmErrorHeaderEncap {
        type uint64;
        description
          "Number of IP packets discarded during reassembly due to header
           encapsulation error.";
      }
      leaf IpReasmErrorIPOptionUnsupported {
        type uint64;
        description
          "Number of IP packets discarded during reassembly due to unsupported
           IP option.";
      }
      leaf IpReasmErrorLastAlreadyReceived {
        type uint64;
        description
          "Number of IP packets discarded during reassembly due to receive twice
           the last fragment.";
      }
      leaf IpReasmErrorOffsetTooLarge {
        type uint64;
        description
          "Number of IP packets discarded during reassembly with offset due to an
           offset too big.";
      }
      leaf IpReasmErrorOverlapNext {
        type uint64;
        description
          "Number of IP packets discarded during reassembly due to receive
           overlapping fragment with next one.";
      }
      leaf IpReasmErrorOverlapPrevious {
        type uint64;
        description
          "Number of IP packets discarded during reassembly due to receive
           overlapping fragment with previous one.";
      }
      leaf IpReasmErrorPacketTooShort {
        type uint64;
        description
          "Number of IP packets discarded during reassembly due to reception of
           a too short fragment.";
      }
      leaf IpReasmErrorQueueAlloc {
        type uint64;
        description
          "Number of IP packets discarded during reassembly due to reassembly
           queue allocation failure.";
      }
      leaf IpReasmErrorQueueFull {
        type uint64;
        description
          "Number of IP packets discarded during reassembly due to reassembly
           queue full (too many fragments have been received).";
      }
      leaf IpReasmErrorSizeExceed {
        type uint64;
        description
          "Number of IP packets discarded during reassembly due to total received
           bytes greater than the maximal authorized value (65535).";
      }
      leaf IpReasmErrorSizeOverflow {
        type uint64;
        description
          "Number of IP packets discarded during reassembly due to total received
           bytes greater than the expected value.";
      }
      leaf IpReasmErrorTooManySegments {
        type uint64;
        description
          "Number of IP packets discarded during reassembly due to too many
           segments in IP packets.";
      }
      leaf IpFragCreates {
        type uint64;
        description
          "Number of IP fragment packets created on fragmentation processing.";
      }
      leaf IpFragOKs {
        type uint64;
        description
          "Number of IP fragment packets sent successfully.";
      }
      leaf IpFragFails {
        type uint64;
        description
          "Number of IP packets discarded due to failures during fragmentation
           processing.";
      }
    }

    container ip6 {
      leaf IpForwDatagrams {
        type uint64;
        description
          "Number of IPv6 packets forwarded.";
      }
      leaf IpInReceives {
        type uint64;
        description
          "Number of IPv6 packets received.";
      }
      leaf IpInDelivers {
        type uint64;
        description
          "Number of IPv6 packets delivered to user-protocols.";
      }
      leaf IpInHdrErrors {
        type uint64;
        description
          "Number of IPv6 packets discarded due to errors in header.";
      }
      leaf IpDroppedForwarding {
        type uint64;
        description
          "Number of IPv6 packets discarded due to forwarding being disabled.";
      }
      leaf IpInAddrErrors {
        type uint64;
        description
          "Number of IPv6 packets discarded due to invalid IPv6 address.";
      }
      leaf IpInTruncatedPkts {
        type uint64;
        description
          "Number of IPv6 packets discarded due to a truncate IP header.";
      }
      leaf IpDroppedNoMemory {
        type uint64;
        description
          "Number of IPv6 packets discarded due to memory allocation errors.";
      }
      leaf IpDroppedNoArp {
        type uint64;
        description
          "Number of IPv6 packets discarded due to missing ARP resolution.";
      }
      leaf IpDroppedIPsec {
        type uint64;
        description
          "Number of IPv6 packets discarded by IPsec processing.";
      }
      leaf IpDroppedBlackhole {
        type uint64;
        description
          "Number of IPv6 packets discarded due to matching blackhole route.";
      }
      leaf IpDroppedRouteException {
        type uint64;
        description
          "Number of IPv6 packets sent to exception due to specific route";
      }
      leaf IpReasmOKs {
        type uint64;
        description
          "Number of IPv6 packets successfully reassembled.";
      }
      leaf IpDroppedInvalidInterface {
        type uint64;
        description
          "Number of IPv6 packets discarded due to invalid outgoing interface.";
      }
      leaf IPDroppedOutOperative {
        type uint64;
        description
          "Number of IP packets discarded because the outgoing interface is down.";
      }
      leaf IpDroppedNetfilter {
        type uint64;
        description
          "Number of IPv6 packets discarded by filtering processing.";
      }
      leaf IpReasmTimeout {
        type uint64;
        description
          "Number of IPv6 packets discarded due to timeout in reassembly
           processing.";
      }
      leaf IpReasmReqds {
        type uint64;
        description
          "Number of IPv6 fragments packets submitted to reassembly processing.";
      }
      leaf IpReasmFails {
        type uint64;
        description
          "Number of IPv6 packets discarded due to failures during reassembly
           processing.";
      }
      leaf IpReasmExceptions {
        type uint64;
        description
          "Number of IPv6 fragment packets sent in exception path.";
      }
      leaf IpReasmErrorFragmentHeader {
        type uint64;
        description
          "Number of IPv6 packets discarded during reassembly due to header
           reading error.";
      }
      leaf IpReasmErrorHeaderEncap {
        type uint64;
        description
          "Number of IPv6 packets discarded during reassembly due to header
           encapsulation error.";
      }
      leaf IpReasmErrorIPOptionTooLarge {
        type uint64;
        description
          "Number of IPv6 packets discarded during reassembly due to IPv6 option
           too large.";
      }
      leaf IpReasmErrorLastAlreadyReceived {
        type uint64;
        description
          "Number of IPv6 packets discarded during reassembly due to receive
           twice the last fragment.";
      }
      leaf IpReasmErrorOffsetTooLarge {
        type uint64;
        description
          "Number of IPv6 packets discarded during reassembly with offset due to
           an offset too big.";
      }
      leaf IpReasmErrorOverlapNext {
        type uint64;
        description
          "Number of IPv6 packets discarded during reassembly due to receive
           overlapping fragment with next one.";
      }
      leaf IpReasmErrorOverlapPrevious {
        type uint64;
        description
          "Number of IPv6 packets discarded during reassembly due to receive
           overlapping fragment with previous one.";
      }
      leaf IpReasmErrorPacketTooShort {
        type uint64;
        description
          "Number of IPv6 packets discarded during reassembly due to reception
           of a too short fragment.";
      }
      leaf IpReasmErrorQueueAlloc {
        type uint64;
        description
          "Number of IPv6 packets discarded during reassembly due to reassembly
           queue allocation failure.";
      }
      leaf IpReasmErrorQueueFull {
        type uint64;
        description
          "Number of IPv6 packets discarded during reassembly due to reassembly
           queue full (too many fragments have been received).";
      }
      leaf IpReasmErrorSizeExceed {
        type uint64;
        description
          "Number of IPv6 packets discarded during reassembly due to total
           received bytes greater than the maximal authorized value (65535).";
      }
      leaf IpReasmErrorSizeOverflow {
        type uint64;
        description
          "Number of IPv6 packets discarded during reassembly due to total
           received bytes greater than the expected value.";
      }
      leaf IpReasmErrorTooManySegments {
        type uint64;
        description
          "Number of IPv6 packets discarded during reassembly due to too many
           segments in IP packets.";
      }
      leaf IpFragCreates {
        type uint64;
        description
          "Number of IPv6 fragment packets created on fragmentation processing.";
      }
      leaf IpFragOKs {
        type uint64;
        description
          "Number of IPv6 fragment packets sent successfully.";
      }
      leaf IpFragFails {
        type uint64;
        description
          "Number of IPv6 packets discarded due to failures during fragmentation
           processing.";
      }
    }
  }
}

fp-ipsec-stats

submodule fp-ipsec-stats {

  belongs-to fp {
    prefix fp;
  }
  import sixwind-router {
    prefix sixwind-router;
  }

  description
    "This submodule provides support for showing fp ipsec information.";

  revision "2018-02-06" {
    description
      "Initial revision.";
  }

  augment /sixwind-router:monitoring/fp:statistics {

    container ipsec {
      leaf IpsecDroppedInError  {
        type uint64;
        description
          "Number of input packets dropped in IPv4 IPsec due to a generic error.";
      }
      leaf IpsecDroppedInHdrError  {
        type uint64;
        description
          "Number of input packets dropped in IPv4 IPsec due to an header error.";
      }
      leaf IpsecDroppedInNoPols  {
        type uint64;
        description
          "Number of input packets dropped in IPv4 IPsec because no policy is
           found for states (i.e. Inbound SAs are correct but no SP is found).";
      }
      leaf IpsecDroppedInNoStates  {
        type uint64;
        description
          "Number of input packets dropped in IPv4 IPsec because no state is found
           (i.e. Either inbound SPI, address, or IPsec protocol at SA is wrong).";
      }
      leaf IpsecDroppedInPolBlock  {
        type uint64;
        description
          "Number of input packets dropped in IPv4 IPsec due to a policy discard.";
      }
      leaf IpsecDroppedInPolError  {
        type uint64;
        description
          "Number of input packets dropped in IPv4 IPsec due to a policy error.";
      }
      leaf IpsecDroppedInStateModeError  {
        type uint64;
        description
          "Number of input packets dropped in IPv4 IPsec due to a transformation
           mode specific error.";
      }
      leaf IpsecDroppedInStateSeqError  {
        type uint64;
        description
          "Number of input packets dropped in IPv4 IPsec due to a sequence error
           (i.e. Sequence number is out of window).";
      }
      leaf IpsecDroppedOutError  {
        type uint64;
        description
          "Number of output packets dropped in IPv4 IPsec due to a generic error.";
      }
      leaf IpsecDroppedOutNoStates  {
        type uint64;
        description
          "Number of output packets dropped in IPv4 IPsec because no state is
           found (i.e. Either outbound SPI, address, or IPsec protocol at
           SA is wrong).";
      }
      leaf IpsecDroppedOutPolDead  {
        type uint64;
        description
          "Number of output packets dropped in IPv4 IPsec because policy is dead.";
      }
      leaf IpsecDroppedOutPolError  {
        type uint64;
        description
          "Number of output packets dropped in IPv4 IPsec due to a policy error.";
      }
      leaf IpsecDroppedOutStateModeError  {
        type uint64;
        description
          "Number of output packets dropped in IPv4 IPsec due to a transformation
           mode specific error.";
      }
      leaf IpsecDroppedOutStateSeqError  {
        type uint64;
        description
          "Number of output packets dropped in IPv4 IPsec due to a sequence error
           (i.e. Sequence number is out of window).";
      }
      leaf IpsecExceptionUnsupportedMode {
        type uint64;
        description
          "Number of packets sent to exception due to unsupported SA mode.";
      }
    }

    container ipsec6 {
      leaf Ipsec6DroppedInError {
        type uint64;
        description
          "Number of input packets dropped in IPv6 IPsec due to a generic error.";
      }
      leaf Ipsec6DroppedInHdrError {
        type uint64;
        description
          "Number of input packets dropped in IPv6 IPsec due to an header error.";
      }
      leaf Ipsec6DroppedInNoPols {
        type uint64;
        description
          "Number of input packets dropped in IPv6 IPsec because no policy is
           found for states (i.e. Inbound SAs are correct but no SP is found).";
      }
      leaf Ipsec6DroppedInNoStates {
        type uint64;
        description
          "Number of input packets dropped in IPv6 IPsec because no state is found
           (i.e. Either inbound SPI, address, or IPsec protocol at SA is wrong).";
      }
      leaf Ipsec6DroppedInPolBlock {
        type uint64;
        description
          "Number of input packets dropped in IPv6 IPsec due to a policy discard.";
      }
      leaf Ipsec6DroppedInPolError {
        type uint64;
        description
          "Number of input packets dropped in IPv6 IPsec due to a policy error.";
      }
      leaf Ipsec6DroppedInStateModeError {
        type uint64;
        description
          "Number of input packets dropped in IPv6 IPsec due to a transformation
           mode specific error.";
      }
      leaf Ipsec6DroppedInStateSeqError {
        type uint64;
        description
          "Number of input packets dropped in IPv6 IPsec due to a sequence error
           (i.e. Sequence number is out of window).";
      }
      leaf Ipsec6DroppedOutError {
        type uint64;
        description
          "Number of output packets dropped in IPv6 IPsec due to a generic error.";
      }
      leaf Ipsec6DroppedOutNoStates {
        type uint64;
        description
          "Number of output packets dropped in IPv6 IPsec because no state is
           found (i.e. Either outbound SPI, address, or IPsec protocol at SA is
           wrong).";
      }
      leaf Ipsec6DroppedOutPolDead {
        type uint64;
        description
          "Number of output packets dropped in IPv6 IPsec because policy is dead.";
      }
      leaf Ipsec6DroppedOutPolError {
        type uint64;
        description
          "Number of output packets dropped in IPv6 IPsec due to a policy error.";
      }
      leaf Ipsec6DroppedOutStateModeError {
        type uint64;
        description
          "Number of output packets dropped in IPv6 IPsec due to a transformation
           mode specific error.";
      }
      leaf Ipsec6DroppedOutStateSeqError {
        type uint64;
        description
          "Number of output packets dropped in IPv6 IPsec due to a sequence error
           (i.e. Sequence number is out of window).";
      }
      leaf Ipsec6ExceptionUnsupportedMode {
        type uint64;
        description
          "Number of packets sent to exception due to unsupported SA mode.";
      }
    }
  }
}

fp-l2-stats

submodule fp-l2-stats {

  belongs-to fp {
    prefix fp;
  }
  import sixwind-router {
    prefix sixwind-router;
  }

  description
    "This submodule provides support for showing fp l2 information.";

  revision "2018-02-06" {
    description
      "Initial revision.";
  }

  augment /sixwind-router:monitoring/fp:statistics {

    container bridge {
      leaf BridgeDroppedFwdInvalid {
        type uint64;
        description
          "Number of output packets dropped in bridge due to forbidden forwarding
           (forwarding disable or originating port).";
      }
      leaf BridgeDroppedInputLookupError {
        type uint64;
        description
          "Number of input packets dropped in bridge due to a lookup error.";
      }
      leaf BridgeDroppedInvalidOutPort {
        type uint64;
        description
          "Number of output packets dropped in bridge because output port index
           is invalid.";
      }
      leaf BridgeDroppedInvalidSrc {
        type uint64;
        description
          "Number of input packets dropped in bridge due to invalid mac source.";
      }
      leaf BridgeDroppedInvalidState {
        type uint64;
        description
          "Number of input packets dropped in bridge due to invalid state (not
           learning or forwarding) of the bridge.";
      }
      leaf BridgeDroppedLearning {
        type uint64;
        description
          "Number of output packets dropped in bridge while it is in learning
           state.";
      }
      leaf BridgeDroppedMtuExceeded {
        type uint64;
        description
          "Number of output packets dropped in bridge due to MTU greater than
           the authorized one.";
      }
      leaf BridgeDroppedNoOutputPort {
        type uint64;
        description
          "Number of output packets dropped in bridge due to no valid output.";
      }
      leaf BridgeDroppedOutOperative {
        type uint64;
        description
          "Number of output packets dropped in bridge because the outgoing
           interface is down.";
      }
      leaf BridgeDroppedOutputLookupError {
        type uint64;
        description
          "Number of output packets dropped in bridge due to a lookup error.";
      }
      leaf BridgeDroppedOutputUnknown {
        type uint64;
        description
          "Number of output packets dropped in bridge due to an unknown output.";
      }
      leaf BridgeDroppedPauseFrame {
        type uint64;
        description
          "Number of input packets dropped in bridge because it is a pause frame.";
      }
      leaf BridgeDroppedUnknownIface {
        type uint64;
        description
          "Number of input packets dropped in bridge due to an invalid interface.";
      }
      leaf L2ForwFrames {
        type uint64;
        description
          "Number of packets forwarded at layer 2 (bridging processing).";
      }
    }

    container ebtables {
      leaf L2FilterDroppedHeaderTooShort {
        type uint64;
        description
          "Number of packets dropped in L2 filtering due to a too short ethernet
           frame.";
      }
      leaf L2FilterDroppedIpInvalid {
        type uint64;
        description
          "Number of packets dropped in L2 filtering due to an invalid
           IPv4 header.";
      }
      leaf L2FilterDroppedIpv6Invalid {
        type uint64;
        description
          "Number of packets dropped in L2 filtering due to an invalid
           IPv6 header.";
      }
      leaf L2FilterDroppedPrependFailure {
        type uint64;
        description
          "Number of packets dropped in L2 filtering due to a failure to restore
           ethernet frame.";
      }
      leaf L2FilterDroppedVerdict {
        type uint64;
        description
          "Number of packets dropped in L2 filtering due to L2 drop filter rule.";
      }
    }

    container vlan {
      leaf VlanDroppedInOperative {
        type uint64;
        description
          "Number of input packets dropped in VLAN because the incoming interface
           is down.";
      }
      leaf VlanDroppedInputUnknownIf {
        type uint64;
        description
          "Number of input packets dropped in VLAN due to unknown interface.";
      }
      leaf VlanDroppedInvalidTag {
        type uint64;
        description
          "Number of input packets dropped in VLAN due to an invalid tag.";
      }
      leaf VlanDroppedOutOperative {
        type uint64;
        description
          "Number of output packets dropped in VLAN because the outgoing interface
           is down.";
      }
      leaf VlanDroppedOutputUnknownIf {
        type uint64;
        description
          "Number of output packets dropped in VLAN due to unknown interface.";
      }
      leaf VlanDroppedPrependFailure {
        type uint64;
        description
          "Number of output packets dropped in VLAN due to a failure to add
           VLAN tag.";
      }
      leaf VlanUnknownTag {
        type uint64;
        description
          "Number of packets with unknown VLAN tag.";
      }
    }
  }
}

fp-cg-nat-stats

submodule fp-cg-nat-stats {

  belongs-to fp {
    prefix fp;
  }
  import sixwind-router {
    prefix sixwind-router;
  }

  description
    "This module provides support for showing fp cg-nat information.";

  revision 2019-06-12 {
    description
      "Rename npf to cg-nat.";
  }
  revision "2018-02-02" {
    description
      "Initial revision.";
  }

  augment /sixwind-router:monitoring/fp:statistics {
    container cg-nat {
      leaf default-passed-packets {
        type uint64;
        description
          "Number of packets passed because it matches the default rule.";
      }
      leaf ruleset-passed-packets {
        type uint64;
        description
          "Number of packets passed because it matches a rule.";
      }
      leaf state-passed-packets {
        type uint64;
        description
          "Number of packets passed because it matches a conntrack.";
      }
      leaf default-blocked-packets {
        type uint64;
        description
          "Number of packets dropped because it matches the default rule.";
      }
      leaf ruleset-blocked-packets {
        type uint64;
        description
          "Number of packets dropped because it matches a rule.";
      }
      leaf state-allocations {
        type uint64;
        description
          "Number of conntrack allocations.";
      }
      leaf state-allocation-failures {
        type uint64;
        description
          "Number of conntrack allocation failures. It happens when there are no
           conntracks available in the pool.";
      }
      leaf state-reverse {
        type uint64;
        description
          "Number of reversed conntracks.";
      }
      leaf state-destructions {
        type uint64;
        description
          "Number of conntrack destructions.";
      }
      leaf nat-allocations {
        type uint64;
        description
          "Number of nat allocations";
      }
      leaf nat-allocation-failures {
        type uint64;
        description
          "Number of nat allocation failures. It happens when there are no
           nat entry available in the pool.";
      }
      leaf nat-destructions {
        type uint64;
        description
          "Number of nat destructions.";
      }
      leaf nat-port-allocation-failures {
        type uint64;
        description
          "Number of nat port allocation failures.";
      }
      leaf cpe-allocations {
        type uint64;
        description
          "Number of CPE allocations.";
      }
      leaf cpe-destructions {
        type uint64;
        description
          "Number of CPE destructions.";
      }
      leaf cpe-allocation-failures {
        type uint64;
        description
          "Number of CPE allocation failures. It happens when there are no
           CPE available in the pool.";
      }
      leaf block-allocations {
        type uint64;
        description
          "Number of block allocations.";
      }
      leaf block-allocation-failures {
        type uint64;
        description
          "Number of block allocation failures. It happens when there are no
           blocks available in the pool.";
      }
      leaf block-destructions {
        type uint64;
        description
          "Number of block destructions.";
      }
      leaf no-public-ip-errors {
        type uint64;
        description
          "Number of CPE allocation failures because all the public ips are used.";
      }
      leaf full-public-ip-errors {
        type uint64;
        description
          "Number of block allocation failures because there are no port blocks
           available in the public ip of the CPE.";
      }
      leaf invalid-total-packet-states {
        type uint64;
        description
           "Number of total dropped packets because they have an invalid state.";
     }
     leaf invalid-first-tcp-packet-states {
        type uint64;
        description
           "Number of TCP conntrack we failed to create because packet is not a
           SYN one.";
     }
     leaf invalid-transition-tcp-packet-states {
        type uint64;
        description
           "Number of TCP packets dropped because there are no valid transitions
            between the current TCP state and the packet (i.e. TCP state machine
            is updated in function of the packet's TCP flags).";
     }
     leaf invalid-rst-tcp-packet-states {
        type uint64;
        description
           "Number of out-of-order TCP rst packets dropped (See RFC 5961).";
     }
     leaf invalid-tcp-case1-packet-states {
        type uint64;
        description
           "Number of TCP packets dropped because it is out of the TCP window
           (upper boundary).";
     }
     leaf invalid-tcp-case2-packet-states {
        type uint64;
        description
           "Number of TCP packets dropped because it is out of the TCP window
           (lower boundary).";
     }
     leaf invalid-tcp-case3-packet-states {
        type uint64;
        description
           "Number of ACK TCP packets dropped because it acknowledges a packet
           not sent.";
     }
     leaf cpe-creation-races {
        type uint64;
        description
          "Number of CPE creation race. It happens when a cpu try to create a
           new CPE. But, this CPE has already been created by an other cpu in the
           meantime. In this case, new CPE is dropped, current one is used.";
      }
      leaf cpe-association-races {
        type uint64;
        description
          "Number of CPE association race. This race happens when it is not
           possible take a reference on a CPE. It means that the CPE has been
           released by other cpu or the maximun of references (i.e. maximun of
           ports that can be nated) is reached.";
      }
      leaf nat-association-races {
        type uint64;
        description
          "Number of nat association race. It happens when we try to associate a
           nat object to a connection object. But, this one has been already
           associated by on other cpu in the meantime.";
      }
      leaf duplicate-state-races {
        type uint64;
        description
          "Number of duplicate conntracks. It happens when we try to create a
           conntrack. But, this one has been already created by on other cpu in
           the meantime.";
      }
      leaf hairpinning-packets {
        type uint64;
        description
          "Number of hairpinning packets. Number of packets forwarded between
          two hosts behind the same NAT device.";
      }
      leaf loop-hairpinning-packets {
        type uint64;
        description
          "Number of hairpinning packets dropped because a routing loop has been
          detected.";
      }
      leaf self-hairpinning-packets {
        type uint64;
        description
          "Number of hairpinning packets dropped because an host tries to send
          packets on its own NATed address.";
      }
      leaf nat64-invalid-udp-null-checksum {
        type uint64;
        description
          "Number of IPv4 udp null checksum packets dropped. In IPv6, null
          checksum are not allowed for UDP. When nating from IPv4 to IPv6, if
          UDP checksum is NULL, it can not be mangled. Thus, in this case, it's
          dropped. It's possible to compute a full checksum by changing an
          an option for NAT64";
      }
    }
  }
}

fp-ports-stats

submodule fp-ports-stats {

  belongs-to fp {
    prefix fp;
  }
  import sixwind-router {
    prefix sixwind-router;
  }

  description
    "This submodule provides support for showing fp port information.";

  revision "2018-02-02" {
    description
      "Initial revision.";
  }

  augment /sixwind-router:monitoring/fp:statistics {
    list control-plane-protection {
      key "name vrf";

      description
        "The control plane protection module statistics per network interface.";

      leaf name {
        type string;
        description
          "The interface name.";
      }

      leaf vrf {
        type string;
        description
          "The interface vrf.";
      }

      leaf rx_cp_kept {
        type uint64;
        description
          "When the Rx ring filling reaches a threshold, packets are inspected
           by the Control Plane Protection mechanism. This statistic is incremented
           for packets recognized as CP packets, which are kept and processed by
           the stack.";
      }

      leaf rx_cp_overrun {
        type uint64;
        description
          "When CPU consumption used by Control Plane Protection exceeds a
           threshold, this system is disabled. This statistic is incremented for
           each Rx packet not analyzed by Control Plane Protection due to CPU
           overload.";
      }

      leaf rx_cp_passthrough {
        type uint64;
        description
          "When Control Plane Protection is enabled, this statistic is
           incremented for each packet received when machine is not
           overloaded. These packets are processed normally.";
      }

      leaf rx_dp_drop {
        type uint64;
        description
          "When the Rx ring filling reaches a threshold, packets are inspected
           by the Control Plane Protection mechanism. This statistic is
           incremented for packets recognized as DP packets, which are dropped.";
      }

      leaf tx_cp_kept {
        type uint64;
        description
          "When the Tx ring filling reaches a threshold, packets are inspected
           by the Control Plane Protection mechanism. This statistic is
           incremented for packets recognized as CP packets, which are sent on
           the wire.";
      }

      leaf tx_cp_overrun {
        type uint64;
        description
          "When CPU consumption used by Control Plane Protection exceeds a
           threshold, this system is disabled. This statistic is incremented for
           each Tx packet not analyzed by Control Plane Protection due to CPU
           overload.";
      }

      leaf tx_cp_passthrough {
        type uint64;
        description
          "When Control Plane Protection is enabled, this statistic is
           incremented for each packet transmitted on a link that is not
           overloaded. These packets are sent normally.";
      }

      leaf tx_dp_drop {
        type uint64;
        description
          "When the Tx ring filling reaches a threshold, packets are inspected
           by the Control Plane Protection mechanism. This statistic is incremented
           for packets recognized as DP packets, which are dropped.";
      }
    }

    container dpvi {
     leaf kernel_tx_handoff {
        type uint64;
        description
          "Hand off on another CPU.";
      }

      leaf kernel_tx_enqueue_fail {
        type uint64;
        description
          "Data ring entry is NULL.";
      }

      leaf kernel_tx_fail {
        type uint64;
        description
          "Cannot send dpvi message.";
      }

      leaf kernel_rx_invalid_msg {
        type uint64;
        description
          "Invalid dpvi message.";
      }

      leaf kernel_rx_fp_timeout {
        type uint64;
        description
          "No Answer from FP.";
      }

      leaf kernel_rx_fp_error {
        type uint64;
        description
          "FP returned an error.";
      }

      leaf rx_data {
        type uint64;
        description
          "Data dpvi pkt (delegated tx) received.";
      }

      leaf rx_ctrl {
        type uint64;
        description
          "Control dpvi pkt (delegated tx) received.";
      }

      leaf rx_other {
        type uint64;
        description
          "Non-dpvi pkt (soft input) received.";
      }

      leaf tx {
        type uint64;
        description
          "Send to linux (exceptions).";
      }

      leaf mem_err {
        type uint64;
        description
          "Memory error (ex: not enough mbuf).";
      }

      leaf invalid_pkt {
        type uint64;
        description
          "Malformed dpvi packet.";
      }

      leaf unsupported_cmd {
        type uint64;
        description
          "Dpvi command not implemented.";
      }
    }

    list ports {
      key "name vrf";

      description
        "The list of fpn statistics per network interface.";

      leaf name {
        type string;
        description
          "The interface name.";
      }

      leaf vrf {
        type string;
        description
          "The interface vrf.";
      }

      list stat {
        key name;

        description
          "The key/value list of fpn statistics for one interface.";

        leaf name {
          type string;
          description
            "The statistic name.";
        }
        leaf value {
          type uint64;
          description
            "The statistic value.";
        }
      }
    }

    list gro {
      key "name vrf";

      description
        "The GRO module statistics per network interface.";

      leaf name {
        type string;
        description
          "The interface name.";
      }

      leaf vrf {
        type string;
        description
          "The interface vrf.";
      }

      leaf ctx_curr {
        type uint64;
        description
          "The current number of GRO contexts in processing.";
      }

      leaf ctx_flush {
        type uint64;
        description
          "The number of GRO contexts flushed before timeout.";
      }

      leaf ctx_timeout {
        type uint64;
        description
          "The number of GRO contexts flushed by timeout.";
      }

      leaf done {
        type uint64;
        description
          "The number of packets merged by GRO module.";
      }

      leaf in {
        type uint64;
        description
          "The number of packets entering GRO module.";
      }

      leaf out {
        type uint64;
        description
          "The number of packets exiting GRO module.";
      }

      leaf per_reass {
        type uint64;
        description
          "The mean of packets per GRO reassembly.";
      }
    }
  }
}

fp-vxlan-stats

submodule fp-vxlan-stats {

  belongs-to fp {
    prefix fp;
  }
  import sixwind-router {
    prefix sixwind-router;
  }

  description
    "This submodule provides support for showing fp vxlan information.";

  revision "2018-02-06" {
    description
      "Initial revision.";
  }

  augment /sixwind-router:monitoring/fp:statistics {

    container vxlan {
      leaf VxlanDroppedHeaderTooShort {
        type uint64;
        description
          "Number of input packets dropped in VXLAN due to a VXLAN header too
           short.";
      }
      leaf VxlanDroppedIPv4NoDst {
        type uint64;
        description
          "Number of output packets dropped in IPv4 VXLAN due to a null
           destination address.";
      }
      leaf VxlanDroppedIPv6NoDst {
        type uint64;
        description
          "Number of output packets dropped in IPv6 VXLAN due to a null
           destination address.";
      }
      leaf VxlanDroppedInOperative {
        type uint64;
        description
          "Number of input packets dropped in VXLAN because the incoming
           interface is down.";
      }
      leaf VxlanDroppedInvalidIPv4Csum {
        type uint64;
        description
          "Number of input packets dropped in IPv4 VXLAN due to an invalid
           checksum.";
      }
      leaf VxlanDroppedInvalidIPv4Header {
        type uint64;
        description
          "Number of input packets dropped in IPv4 VXLAN due to a failure to get
           the VXLAN header.";
      }
      leaf VxlanDroppedInvalidIPv6Csum {
        type uint64;
        description
          "Number of input packets dropped in IPv4 VXLAN due to an invalid
           checksum.";
      }
      leaf VxlanDroppedInvalidIPv6Header {
        type uint64;
        description
          "Number of input packets dropped in IPv6 VXLAN due to a failure to get
           the VXLAN header.";
      }
      leaf VxlanDroppedInvalidIpFamily {
        type uint64;
        description
          "Number of output packets dropped in VXLAN due to a failure to get the
           VXLAN header.";
      }
      leaf VxlanDroppedOvsNoDst {
        type uint64;
        description
          "Number of output packets dropped in OVS VXLAN due to a null
           destination address.";
      }
      leaf VxlanDroppedPrependIPv4Failure {
        type uint64;
        description
          "Number of output packets dropped in IPv4 VXLAN due to add IP header.";
      }
      leaf VxlanDroppedPrependIPv6Failure {
        type uint64;
        description
          "Number of output packets dropped in IPv6 VXLAN due to add IP header.";
      }
      leaf VxlanDroppedPrependOvsFailure {
        type uint64;
        description
          "Number of output packets dropped in OVS VXLAN due to add IP header.";
      }
      leaf VxlanDroppedUnknownIface {
        type uint64;
        description
          "Number of input packets dropped in VXLAN due to an invalid interface.";
      }
      leaf VxlanDroppedUnknownVNI {
        type uint64;
        description
          "Number of input packets dropped in VXLAN due to an invalid VNI.";
      }
      leaf VxlanExceptionIFlagNotSet {
        type uint64;
        description
          "Number of input packets sent to exception by VXLAN due a I flags not
           set (see rfc 7348).";
      }
      leaf VxlanExceptionIPv4MtuExceeded {
        type uint64;
        description
          "Number of output packets sent to exception by IPv4 VXLAN due a MTU
           exceeded the authorized value.";
      }
      leaf VxlanExceptionIPv4NoMcastSrc {
        type uint64;
        description
          "Number of output packets sent to exception by IPv4 VXLAN due to no
           valid src address found for a multicast packet.";
      }
      leaf VxlanExceptionIPv4Route {
        type uint64;
        description
          "Number of output packets sent to exception by IPv4 VXLAN due to
           specific route.";
      }
      leaf VxlanExceptionIPv6MtuExceeded {
        type uint64;
        description
          "Number of output packets sent to exception by IPv6 VXLAN due a MTU
           exceeded the authorized value.";
      }
      leaf VxlanExceptionIPv6NoMcastSrc {
        type uint64;
        description
          "Number of output packets sent to exception by IPv6 VXLAN due to no
           valid src address found for a multicast packet.";
      }
      leaf VxlanExceptionIPv6Route {
        type uint64;
        description
          "Number of output packets sent to exception by IPv6 VXLAN due to
           specific route.";
      }
      leaf VxlanExceptionNoInputFdb {
        type uint64;
        description
          "Number of input packets sent to exception by VXLAN due to no valid
           fdb found.";
      }
      leaf VxlanExceptionNoOutputFdb {
        type uint64;
        description
          "Number of output packets sent to exception by VXLAN due to no valid
           fdb found.";
      }
      leaf VxlanExceptionNoRemote {
        type uint64;
        description
          "Number of output packets sent to exception by VXLAN due to no remote
           found.";
      }
      leaf VxlanExceptionOvsMtuExceeded {
        type uint64;
        description
          "Number of output packets sent to exception by Ovs VXLAN due a MTU
           exceeded the authorized value.";
      }
      leaf VxlanExceptionOvsRoute {
        type uint64;
        description
          "Number of output packets sent to exception by Ovs VXLAN due to
           specific route.";
      }
      leaf VxlanExceptionTooManyFlags {
        type uint64;
        description
          "Number of input packets sent to exception by VXLAN due to a presence
           of an unsupported flag (neither I and G ones, see rfc 7348).";
      }
      leaf VxlanFdbForwDuplicateError {
        type uint64;
        description
          "Number of failure to duplicate a packet for fdb forwarding.";
      }
    }
  }
}

network

module network {
  namespace "urn:6wind:router:monitoring:network";
  prefix network;

  import sixwind-router {
    prefix sixwind-router;
  }

  description
    "This module provides support for showing network information.";

  revision "2017-11-14" {
    description "Initial revision.";
  }

  augment /sixwind-router:monitoring {
    container interfaces {

      list hardware-information {
        key "name vrf";

        description
          "The list of network interface hardware information.";

        leaf name {
          type string;
          description
            "The interface name.";
        }

        leaf vrf {
          type string;
          description
            "The interface vrf.";
        }

        leaf driver {
          type string;
          description
            "The interface driver used.";
        }

        leaf description {
          type string;
          description
            "The user-defined interface alias.";
        }

        leaf model {
          type string;
          description
            "The interface model.";
        }

        leaf pci-address {
          type string;
          description
            "The interface pci address.";
        }

        leaf speed {
          type uint64;
          description
            "The interface capacity in bytes.";
        }
      }

      list traffic-stats {
        key "name vrf";

        description
          "The list of traffic statistics per network interface.";

        leaf name {
          type string;
          description
            "The interface name.";
        }
        leaf vrf {
          type string;
          description
            "The interface vrf.";
        }
        leaf bytes-sent {
          type uint64;
          description
            "Number of bytes sent.";
        }
        leaf bytes-recv {
          type uint64;
          description
            "Number of bytes received.";
        }
        leaf pkts-sent {
          type uint64;
          description
            "Number of packets sent.";
        }
        leaf pkts-recv {
          type uint64;
          description
            "Number of packets received.";
        }
      }

      list eth-stats {
        key "name vrf";

        description
          "The list of eth statistics per network interface.";

        leaf name {
          type string;
          description
            "The interface name.";
        }
        leaf vrf {
          type string;
          description
            "The interface vrf.";
        }

        list stat {
          key name;

          description
            "The key/value list of eth statistics for one interface.";

          leaf name {
            type string;
            description
              "The statistic name.";
          }
          leaf value {
            type uint64;
            description
              "The statistic value.";
          }
        }
      }
    }
  }
}

product

module product {
  namespace "urn:6wind:router:monitoring:product";
  prefix product;

  import sixwind-router {
    prefix sixwind-router;
  }

  description
    "This module provides support for showing product information.";

  revision "2017-11-14" {
    description
      "Initial revision.";
  }

  augment /sixwind-router:monitoring {

    leaf version {
      type string;
      description
        "The product version.";
    }

    container license {
      description
        "The license detailed info.";

      leaf enabled {
        type boolean;
        description
          "True if the license daemon is enabled on the system.";
      }

      leaf valid {
        type boolean;
        description
          "True if the license is valid.";
      }

      leaf short-license-type {
        type enumeration {
          enum evaluation {
            description
              "The license is an evaluation.";
          }
          enum perpetual {
            description
              "The license is perpetual.";
          }
          enum subscription {
            description
              "The license is a subscription.";
          }
        }
        description
          "A shorter version of the license type.";
      }

      leaf support-end-date {
        type string;
        description
          "The support end date.";
      }

      leaf remaining-days {
        type union {
          type string;
          type enumeration {
            enum unset {
              description
                "The end date is not set.";
            }
            enum expired {
              description
                "The date has expired.";
            }
          }
        }
        description
          "The number of days remaining.";
      }

      leaf throughput-allowed {
        description
          "The allowed throughput.";
        type decimal64 {
          fraction-digits 2;
        }
        units "Gb";
      }

      leaf throughput-used {
        description
          "The throughput currently in use.";
        type decimal64 {
          fraction-digits 2;
        }
        units "Gb";
      }

      leaf cgnat-conntracks-allowed {
        type uint32;
        description
          "The number of CG-NAT conntracks allowed.";
      }

      leaf cgnat-conntracks-used {
        type uint32;
        description
          "The number of CG-NAT conntracks currently in use.";
      }

      leaf ipsec-tunnels-allowed {
        type uint32;
        description
          "The number of IPsec tunnels allowed.";
      }

      leaf ipsec-tunnels-used {
        type uint32;
        description
          "The number of IPsec tunnels currently in use.";
      }
    }
  }
}

system

module system {
  namespace "urn:6wind:router:monitoring:system";
  prefix system;

  import sixwind-router {
    prefix sixwind-router;
  }

  description
    "This module provides support for showing system information.";

  revision "2017-11-14" {
    description
      "Initial revision.";
  }

  augment /sixwind-router:monitoring {

    list cpu-usage {
      key cpu;

      description
        "The list of busy percentage per CPU.";

      leaf cpu {
        type string;
        description
          "The CPU number.";
      }
      leaf busy {
        type uint16;
        description
          "The busy percentage.";
      }
    }

    list disk-usage {
      key disk;

      description
        "The disk usage information per device.";

      leaf disk {
        type string;
        description
          "The disk name.";
      }

      leaf total {
        type uint64;
        description
          "The disk total size.";
      }

      leaf free {
        type uint64;
        description
          "The disk free size.";
      }
    }

    container memory {
      description
        "The total and available memory.";

      leaf available {
        type uint64;
        description
          "The memory that can be given instantly to processes without the system
           going into swap.";
      }

      leaf total {
        type uint64;
        description
          "The total physical memory.";
      }
    }

    list numa-stats {
      key node;

      description
        "The list of NUMA statistics per node.";

      leaf node {
        type string;
        description
          "The node ID.";
      }
      leaf numa-hit {
        type uint64;
        description
          "Memory successfully allocated on this node as intended.";
      }
      leaf numa-miss {
        type uint64;
        description
          "Memory allocated on this node despite the process preferring some
           different node.";
      }
      leaf numa-foreign {
        type uint64;
        description
          "Memory intended for this node but actually allocated on some different
           node.";
      }
      leaf interleave-hit {
        type uint64;
        description
          "Interleaved memory successfully allocated on this node as intended.";
      }
      leaf local-node {
        type uint64;
        description
          "Memory allocated on this node while a process was running on it.";
      }
      leaf other-node {
        type uint64;
        description
          "Memory allocated on this node while a process was running on some
           other node.";
      }
    }

    list processes {
      key name;

      description
        "The list of monitored processes on the system.";

      leaf name {
        type string;
        description
          "The name of the process.";
      }

      leaf fds {
        type uint32;
        description
          "The number of file descriptors opened by this process.";
      }

      leaf memory {
        type uint64;
        description
          "The memory used by this process.";
      }

      leaf busy {
        type uint16;
        description
          "The busy percentage for this process.";
      }
    }

    leaf uptime {
      type string;
      description
        "The system uptime.";
    }

    leaf user-count {
      type uint16;
      description
        "The number of logged users.";
    }

    list users {
      key terminal;

      description
        "The list of logged users on the system.";

      leaf terminal {
        type string;
        description
          "The terminal name.";
      }

      leaf user {
        type string;
        description
          "The user.";
      }

      leaf source {
        type string;
        description
          "The host from where the user logged in.";
      }

      leaf started {
        type string;
        description
          "The date at which the connection was started.";
      }
    }

    list soft-interrupts-stats {
      key cpu;

      description
        "The list of soft interrupts statistics per CPU.";

      leaf cpu {
        type string;
        description
          "The CPU number.";
      }
      leaf hi {
        type uint64;
        description
          "Number of high priority tasklets.";
      }
      leaf timer {
        type uint64;
        description
          "Number of timer interrupts.";
      }
      leaf net-tx {
        type uint64;
        description
          "Number of interrupts for transmitting packets to network cards.";
      }
      leaf net-rx {
        type uint64;
        description
          "Number of interrupts for receiving packets from network cards.";
      }
      leaf block {
        type uint64;
        description
          "Number of block-device I/O interrupts.";
      }
      leaf tasklet {
        type uint64;
        description
          "Number of regular tasklets interrupts.";
      }
      leaf sched {
        type uint64;
        description
          "Number of scheduling interrupts.";
      }
      leaf rcu {
        type uint64;
        description
          "Number of read-copy-update interrupts.";
      }
    }
  }
}