I need to know the C function which checks the range of instances. For example, I’ve got 9 instances of FastEthernet with mtu leaf:
(cli)(config)# interface FastEthernet/1-9
(cli)(config-interface-FastEthernet/1-9)# mtu 1400
If I’ll type “FastEthernet/9-1” instead of “FastEthernet/1-9”, an error will occur smth like “No entries found.”, everything is ok.
However, if I try to “FastEthernet/1-999”, smth strange happens:
(cli)(config)# interface FastEthernet/1-999
(cli)(config-interface-FastEthernet/1-999)# mtu 1400
There is no error occurs, and all of my 9 interfaces get “mtu 1400”.
So here my question comes. I want to change Confd’s C code to handle this “out of bounds” range.
In addition I’d like to know how to keep my current number of instances or where could I get that variable?
P.S. I’ve read confd_types manual and I’ve seen all of examples about range in “examples.confd”. And in “/examples.confd/cli/ranges/README” written next “Note that integer keys are automatically recognized as having range capabilities. Other types need an explicit declaration in the clispec file.” I don’t have any user-defined-ranges.