module ietf-tcp-server {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-tcp-server";
prefix tcps;
import ietf-inet-types {
prefix inet;
reference
"RFC 6991: Common YANG Data Types";
}
organization
"IETF NETCONF (Network Configuration) Working Group";
contact
"WG Web:
WG List:
Author: Kent Watsen ";
description
"This module defines reusable groupings for TCP servers that
can be used as a basis for specific TCP server instances.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
are to be interpreted as described in BCP 14 [RFC2119]
[RFC8174] when, and only when, they appear in all
capitals, as shown here.
Copyright (c) 2019 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject
to the license terms contained in, the Simplified BSD
License set forth in Section 4.c of the IETF Trust's
Legal Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX; see
the RFC itself for full legal notices.";
revision 2019-03-09 {
description
"Initial version";
reference
"RFC XXXX: YANG Groupings for TCP Clients and TCP Servers";
}
// Features
feature tcp-server-keepalives {
description
"Per socket TCP keepalive parameters are configurable for
TCP servers on the server implementing this feature.";
}
// Groupings
grouping tcp-server-grouping {
description
"A reusable grouping for configuring a TCP server.";
uses ip-params-grouping;
uses keepalives-grouping;
}
grouping ip-params-grouping {
description
"A reusable grouping for configuring TCP server IP level
parameters.";
leaf local-address {
type inet:ip-address;
mandatory true;
description
"The local IP address to listen on for incoming TCL
client connections. INADDR_ANY (0.0.0.0) or INADDR6_ANY
(0:0:0:0:0:0:0:0 a.k.a. ::) MUST be used when the server
is to listen on all IPv4 or IPv6 addresses, respectively.";
}
leaf local-port {
type inet:port-number;
default "0";
description
"The local port number to listen on for incoming TCP client
connections. An invalid default value (0) is used (instead
of 'mandatory true') so that a application level data model
may 'refine' it with an application specific default port
number value.";
}
}
grouping keepalives-grouping {
description
"A reusable grouping for configuring TCP server keepalive
parameters.";
container tcp-keepalives {
if-feature "tcp-server-keepalives";
description
"Configures the keep-alive policy, to proactively test the
aliveness of the TCP client. Not all servers will use
all the values, based on capabilities of the underlying
operating system. An unresponsive TCP client is dropped
after approximately (idle-time * 60) + (max-probes *
probe-interval) seconds.";
leaf idle-time {
type uint16 {
range "1..max";
}
units "minutes";
description
"Sets the amount of time in minutes after which if no data
has been received from the TCP client, a TCP-level probe
message will be sent to test the aliveness of the TCP
client. When 'idle-time' is not configured (the default)
TCP keep-alives are disabled.";
}
leaf max-probes {
type uint16 {
range "1..max";
}
description
"Sets the maximum number of sequential keep-alive probes
that can fail to obtain a response from the TCP client
before assuming the TCP client is no longer alive. If
no value is specified, then the operating system provided
default value is used.";
}
leaf probe-interval {
type uint16 {
range "1..max";
}
units "seconds";
description
"Sets the time interval between failed probes. If no value
is specified, then the operating system provided default
value is used.";
}
}
}
}