module ietf-udp-client {
yang-version 1.1;
namespace
"urn:ietf:params:xml:ns:yang:ietf-udp-client";
prefix udpc;
import ietf-inet-types {
prefix inet;
reference
"RFC 9911: Common YANG Data Types";
}
organization "IETF NETCONF (Network Configuration) Working Group";
contact
"WG Web:
WG List:
Authors: Alex Huang Feng
Pierre Francois
";
description
"Defines a generic grouping for UDP-based client applications.
Copyright (c) 2025 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 Revised BSD License set forth in Section
4.c of the IETF Trust's Legal Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info).
All revisions of IETF and IANA published modules can be found
at the YANG Parameters registry group
(https://www.iana.org/assignments/yang-parameters).
This version of this YANG module is part of RFC XXXX; see
the RFC itself for full legal notices.
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 (RFC 2119) (RFC 8174) when, and only when,
they appear in all capitals, as shown here.";
revision 2025-12-16 {
description
"Initial revision";
reference
"RFC XXXX: YANG Groupings for UDP Clients and UDP Servers";
}
feature local-binding {
description
"Indicates that the UDP client supports configuring local
bindings (i.e., the local address and local port number)
for UDP clients.";
}
grouping udp-client {
description
"A reusable grouping for UDP clients.
Note that this grouping uses fairly typical descendant
node names such that a stack of 'uses' statements will
have name conflicts. It is intended that the consuming
data model will resolve the issue (e.g., by wrapping
the 'uses' statement in a container called
'udp-client-parameters'). This model purposely does
not do this itself so as to provide maximum flexibility
to consuming models.";
leaf remote-address {
type inet:host;
mandatory true;
description
"The IP address or hostname of the remote UDP server.";
}
leaf remote-port {
type inet:port-number;
description
"The port number of the remote UDP server.";
}
leaf local-address {
if-feature "local-binding";
type inet:ip-address;
description
"The local IP address to bind to when sending UDP
datagrams to the remote server. INADDR_ANY ('0.0.0.0') or
INADDR6_ANY ('0:0:0:0:0:0:0:0' a.k.a. '::') may be used
so that the client can bind to any IPv4 or IPv6 address.
In normal operation, the local and configured
remote addresses SHOULD be from the same address family.
Differences between address families may occur in
abnormal or error conditions and are therefore allowed to
be reported.";
}
leaf local-port {
if-feature "local-binding";
type inet:port-number;
default "0";
description
"The local port number to bind to when sending UDP
datagrams to the remote server. The port number '0',
which is the default value, indicates that any available
local port number may be used.";
}
}
}