OLP has a generic Art-Net implementation (https://github.com/OpenLightingProject/libartnet). This should probably be preferred to the current "custom" implementation