troglobit / pimd

PIM-SM/SSM multicast routing for UNIX and Linux
http://troglobit.com/projects/pimd/
BSD 3-Clause "New" or "Revised" License
194 stars 86 forks source link

pimctl: increases the space for the priority because it can go up to 10 digits #228

Closed stormshield-sylvainm closed 1 year ago

stormshield-sylvainm commented 1 year ago

In this pull request, it's only for pimcl.

We have increase the space for the priority because it can go up to 10 digits. In RFC https://datatracker.ietf.org/doc/html/rfc4601#section-4.9.2, DR priority is a 32-bit unsigned number, max number is 4294967295 with 10 digits.

And for "interface table", we have separated the local priority and DR priority to avoid reading error.

With this commit, pimctl output becomes

PIM Interface Table
Interface         State     Address            Priority  Hello  Nbr  DR Address      DR Priority 
em1               Up        10.50.30.10              30     30    0  10.50.30.10              30
em2               Up        10.50.50.10              50     30    1  10.50.50.10              50
em3               Up        10.50.60.10              60     30    1  10.50.60.20      4294967294

PIM Neighbor Table
Interface         Address            Priority  Mode  Uptime/Expires                                                              
em3               10.50.50.11      4294967294        0h3m19s/0h1m22s

Are you interested by this update ?

troglobit commented 1 year ago

Of course I am, thank you! :-)

The whole of pimctl is brand new in this release cycle, so any improvements we can get in are much appreciated.