module Cisco-IOS-XR-ip-tcp-oper {
  namespace "http://cisco.com/ns/yang/Cisco-IOS-XR-ip-tcp-oper";
  prefix ip-tcp-oper;

  import Cisco-IOS-XR-types {
    prefix xr;
  }
  include Cisco-IOS-XR-ip-tcp-oper-sub5 {
    revision-date 2018-11-01;
  }
  include Cisco-IOS-XR-ip-tcp-oper-sub4 {
    revision-date 2018-11-01;
  }
  include Cisco-IOS-XR-ip-tcp-oper-sub3 {
    revision-date 2018-11-01;
  }
  include Cisco-IOS-XR-ip-tcp-oper-sub2 {
    revision-date 2018-11-01;
  }
  include Cisco-IOS-XR-ip-tcp-oper-sub1 {
    revision-date 2018-11-01;
  }

  organization
    "Cisco Systems, Inc.";
  contact
    "Cisco Systems, Inc.
     Customer Service
     
     Postal: 170 West Tasman Drive
     San Jose, CA 95134
     
     Tel: +1 800 553-NETS
     
     E-mail: cs-yang@cisco.com";
  description
    "This module contains a collection of YANG definitions
     for Cisco IOS-XR ip-tcp package operational data.
     
     This module contains definitions
     for the following management objects:
       tcp-connection: TCP connection operational data
       tcp: tcp
       tcp-nsr: tcp nsr
     
     Copyright (c) 2013-2018 by Cisco Systems, Inc.
     All rights reserved.";

  revision 2018-11-01 {
    description
      "Added socket async double free prevention count in tcp statistics summary";
  }
  revision 2018-02-14 {
    description
      "PCB_ID argument is passed in string format.";
  }
  revision 2018-02-14 {
    description
      "Added support for TCP-AO feature.";
  }
  revision 2017-05-01 {
    description
      "Fixing backward compatibility error in module.";
  }
  revision 2016-02-26 {
    description
      "Descriptions updated.";
  }
  revision 2015-11-09 {
    description
      "IOS XR 6.0 revision.";
  }

  typedef Show {
    type enumeration {
      enum "all" {
        value 0;
        description
          "To dispay all";
      }
      enum "static-policy" {
        value 1;
        description
          "To display static policy";
      }
      enum "interface-filter" {
        value 2;
        description
          "To display interface filter";
      }
      enum "packet-filter" {
        value 3;
        description
          "To display packet type filter";
      }
    }
    description
      "Show";
  }

  container tcp-connection {
    config false;
    description
      "TCP connection operational data";
    container nodes {
      description
        "Table of information about all nodes present on
         the system";
      list node {
        key "id";
        description
          "Information about a single node";
        container statistics {
          description
            "Statistics of all TCP connections";
          container clients {
            description
              "Table listing clients";
            list client {
              key "client-id";
              description
                "Describing Client ID";
              leaf client-id {
                type uint32 {
                  range "0..4294967295";
                }
                description
                  "Displaying client's aggregated statistics";
              }
              uses TRANSP-CLIENT-STATS-BAG;
            }
          }
          container pcbs {
            description
              "Table listing the TCP connections for which
               statistics are provided";
            list pcb {
              key "id";
              description
                "Protocol Control Block ID";
              leaf id {
                type xr:Cisco-ios-xr-string;
                description
                  "Displaying statistics associated with a
                   particular PCB";
              }
              uses TCP-SH-PCB-STATS-BAG;
            }
          }
          container summary {
            description
              "Summary statistics across all TCP connections";
            uses TCP-SH-STATS-BAG;
          }
        }
        container extended-information {
          description
            "Extended Filter related Information";
          container display-types {
            description
              "Table listing display types";
            list display-type {
              key "disp-type";
              description
                "Describing particular display type";
              leaf disp-type {
                type Show;
                description
                  "Specifying display type";
              }
              list connection-id {
                key "pcb-id";
                description
                  "Describing connection ID";
                leaf pcb-id {
                  type xr:Cisco-ios-xr-string;
                  description
                    "Displaying inforamtion based on selected
                     display type associatedwith a particular
                     PCB";
                }
                uses SHOW-PCB-INFO;
              }
            }
          }
        }
        container detail-informations {
          description
            "Table listing TCP connections for which
             detailed information is provided";
          list detail-information {
            key "pcb-id";
            description
              "Protocol Control Block ID";
            leaf pcb-id {
              type xr:Cisco-ios-xr-string;
              description
                "Detail information about TCP connection, put
                 null for all";
            }
            uses TCP-SH-TABLE-BAG;
          }
        }
        container keychains {
          description
            "Table listing keychains configured for TCP-AO.";
          list keychain {
            key "keychain-name";
            description
              "Details of a keychain";
            leaf keychain-name {
              type xr:Cisco-ios-xr-string;
              description
                "Keychain name";
            }
            uses TCP-SH-KEYCHAIN-BAG;
          }
        }
        container brief-informations {
          description
            "Table listing connections for which brief
             information is provided.Note that not all
             connections are listed in the brief table.";
          list brief-information {
            key "pcb-id";
            description
              "Brief information about a TCP connection";
            leaf pcb-id {
              type xr:Cisco-ios-xr-string;
              description
                "Protocol Control Block ID";
            }
            uses TCP-SH-BRIEF-BAG;
          }
        }
        leaf id {
          type xr:Node-id;
          description
            "Describing a location";
        }
      }
    }
  }
  container tcp {
    config false;
    description
      "tcp";
    container nodes {
      description
        "Node-specific TCP operational data";
      list node {
        key "node-name";
        description
          "TCP operational data for a particular node";
        container statistics {
          description
            "Statistical TCP operational data for a node";
          container ipv4-traffic {
            description
              "TCP Traffic statistics for IPv4";
            uses IP-TCP;
          }
          container ipv6-traffic {
            description
              "TCP Traffic statistics for IPv6";
            uses IP-TCP;
          }
        }
        leaf node-name {
          type xr:Node-id;
          description
            "Node name";
        }
      }
    }
  }
  container tcp-nsr {
    config false;
    description
      "tcp nsr";
    container nodes {
      description
        "Table of information about all nodes present on
         the system";
      list node {
        key "id";
        description
          "Information about a single node";
        container session {
          description
            "Information about TCP NSR Sessions";
          container brief-sessions {
            description
              "Information about TCP NSR Sessions";
            list brief-session {
              key "id";
              description
                "Brief information about NSR Sessions";
              leaf id {
                type xr:Hex-integer;
                description
                  "ID of NSR Sesison";
              }
              uses TCP-NSR-PCB-BRIEF-BAG;
            }
          }
          container detail-sessions {
            description
              "Table about TCP NSR Sessions details";
            list detail-session {
              key "id";
              description
                "showing detailed information of NSR Sessions";
              leaf id {
                type xr:Hex-integer;
                description
                  "ID of NSR Sesison";
              }
              uses TCP-NSR-PCB-DETAILED-BAG;
            }
          }
        }
        container client {
          description
            "Information about TCP NSR Client";
          container detail-clients {
            description
              "Table about TCP NSR Client details";
            list detail-client {
              key "id";
              description
                "showing detailed information of NSR Clients";
              leaf id {
                type xr:Hex-integer;
                description
                  "ID of NSR client";
              }
              uses TCP-NSR-CCB-DETAILED-BAG;
            }
          }
          container brief-clients {
            description
              "Information about TCP NSR Client";
            list brief-client {
              key "id";
              description
                "Brief information about NSR Client";
              leaf id {
                type xr:Hex-integer;
                description
                  "ID of NSR client";
              }
              uses TCP-NSR-CCB-BRIEF-BAG;
            }
          }
        }
        container session-set {
          description
            "Information about TCP NSR Session Sets";
          container detail-sets {
            description
              "Table about TCP NSR Session Sets details";
            list detail-set {
              key "id";
              description
                "showing detailed information of NSR Session
                 Sets";
              leaf id {
                type xr:Hex-integer;
                description
                  "ID of NSR Sesison Set";
              }
              uses TCP-NSR-SSCB-DETAILED-BAG;
            }
          }
          container brief-sets {
            description
              "Information about TCP NSR Session Sets";
            list brief-set {
              key "id";
              description
                "Brief information about NSR Session Sets";
              leaf id {
                type xr:Hex-integer;
                description
                  "ID of NSR Session Set";
              }
              uses TCP-NSR-SSCB-BRIEF-BAG;
            }
          }
        }
        container statistics {
          description
            "Statis Information about TCP NSR connections";
          container summary {
            description
              "Summary statistics across all NSR connections";
            uses TCP-NSR-SUMMARY-STATS-BAG;
          }
          container statistic-clients {
            description
              "Table listing NSR connections for which
               statistic information is provided";
            list statistic-client {
              key "id";
              description
                "showing statistic information of NSR Clients";
              leaf id {
                type xr:Hex-integer;
                description
                  "ID of NSR Client";
              }
              uses TCP-NSR-CCB-STATS-BAG;
            }
          }
          container statistic-sets {
            description
              "Table listing NSR connections for which
               statistic information is provided";
            list statistic-set {
              key "id";
              description
                "showing statistic information of NSR Session
                 Set";
              leaf id {
                type xr:Hex-integer;
                description
                  "ID of NSR Session Set";
              }
              uses TCP-NSR-SSCB-STATS-BAG;
            }
          }
          container statistic-sessions {
            description
              "Table listing NSR connections for which
               statistic information is provided";
            list statistic-session {
              key "id";
              description
                "showing statistic information of TCP
                 connections";
              leaf id {
                type xr:Hex-integer;
                description
                  "ID of TCP connection";
              }
              uses TCP-NSR-PCB-STATS-BAG;
            }
          }
        }
        leaf id {
          type xr:Node-id;
          description
            "Describing a location";
        }
      }
    }
  }
}
