This PR adds two extra fields to snabb-softwire-v2.yang: next-hop-macaddr-v4 and next-hop-macaddr-v6. Both values can be queried using snabb config get-state and using snabb top.
Some thoughts about the PR:
Perhaps is worth to set an interval of time for updating the next hop mac address values.
Counters are always of uint64_t type. That's fine for MAC addresses, however in the YANG model I wanted the mac address fields to be of type yang:mac-address. This required me to do modify lib.yang.value's macaddr type and handle the case in tostring where val might be an uint64_t value (uint8_t is expected). I didn't find a more elegant way of implementing this.
This PR adds two extra fields to
snabb-softwire-v2.yang
:next-hop-macaddr-v4
andnext-hop-macaddr-v6
. Both values can be queried usingsnabb config get-state
and usingsnabb top
.Some thoughts about the PR:
uint64_t
type. That's fine for MAC addresses, however in the YANG model I wanted the mac address fields to be of typeyang:mac-address
. This required me to do modify lib.yang.value's macaddr type and handle the case intostring
whereval
might be anuint64_t
value (uint8_t
is expected). I didn't find a more elegant way of implementing this.Some examples: