Open BenBE opened 5 years ago
I currently see no use case for more than one buffer. We only use this function in debug output.
Use case is avoiding dynamic memory allocation. Also this simplifies use in code a bit as the return value can be used directly by the caller.
using multiple buffers is required when logging more than one address on the same line. I am using a similar mechanism for debug output in l3roamd, allowing either 4 small buffers or one large one. It is easy to adjust. And I would defenitely keep the functionality to use multiple buffers.
It should be easy enough to increase when demand arises.
OTOH: Does the memory overhad of those 18 Bytes really justify not merging the patch set as it is?
This avoids memory allocations when trying to output the hardware MAC address in various situations.
Multiple buffers are provided to allow for multiple MAC addresses to be processed before copies need to be created.