There are 2 lists.
list ip-v4 {
leaf ip {
type inet:ipv4-address;
}
leaf port {
type inet:port-number;
}
}
list ip-v6 {
leaf ip {
type inet:ipv6-address;
}
leaf port {
type inet:port-number;
}
}
I want to have ports in the list ip-v4
and ip-v6
as disjoint.
Example:
1. Valid case:
ip-v4 = [{ip:1.1.1.1, port:2000 },{ip:1.1.1.2, port:2001}]
ip-v6 = [{ip:1::1, port:2002},{ip:1::2, port:2003}]
Reason:
[2000,2001] and [2002,2003] are disjoint
2. Invalid case:
ip-v4 = [{ip:1.1.1.1, port:2000 },{ip:1.1.1.2, port:2001}]
ip-v6 = [{ip:1::1, port:2000},{ip:1::2, port:2003}]
Reason:
[2000,2001] and [2000,2003] are not disjoint
Can someone help me to solve this?