Italo,

> On Apr 14, 2023, at 4:04 AM, Italo Busi <[email protected]> wrote:
> 
> If the need is to report the value of a received protocol field for 
> debugging/troubleshooting purposes, I am wondering why not using a binary 
> type instead of a bits type or, better, a YANG leaf of bits type for the 
> known bits and another YANG leaf of binary type for all known/unknown bits

Type binary isn't generically helpful.  The implementation has to do something 
with the base64 stream it gets.  If it's just going to dump it in hex format, 
you might as well just say that and use hex-string.

The use case here is most bits are known and these are exception cases.  
Ideally in most circumstances, the leaf containing the unknowns is absent.

Perhaps a bit of personal context:
"Hey, Jeff... why not just get a hexdump of the packet?"
"I've spent 20+ years looking at different tools' dumps of bits of BGP PDU and 
I'm sick of it.  The code knows how to parse out fields, let it do that work."

-- Jeff (who keeps expecting this conversation to devolve to a proposal for 
netconf streaming tcpdump)

_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to