mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-11-03 13:58:08 +00:00
log.c provides functionality for associating a constant (typically a protocol constant) with a string and finding the string given the constant. However this is highly delicate code that is extremely prone to stack overflows and off-by-one's due to requiring the developer to always remember to update the array size constant and to do so correctly which, as shown by example, is never a good idea.b The original goal of this code was to try to implement lookups in O(1) time without a linear search through the message array. Since this code is used 99% of the time for debugs, it's worth the 5-6 additional cmp's worst case if it means we avoid explitable bugs due to oversights... Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com> |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| Makefile.am | ||
| rip_debug.c | ||
| rip_debug.h | ||
| rip_interface.c | ||
| rip_interface.h | ||
| rip_main.c | ||
| rip_memory.c | ||
| rip_memory.h | ||
| rip_offset.c | ||
| rip_peer.c | ||
| rip_routemap.c | ||
| rip_snmp.c | ||
| rip_zebra.c | ||
| ripd.c | ||
| ripd.conf.sample | ||
| ripd.h | ||
| RIPv2-MIB.txt | ||