Specify additional headers that don't have a convenience header.
Use correct type in byte order conversion of shorts.
Deregister EVFILT_WRITE to avoid spinning with serial ports.