This required that I switch from using a char array for the packet buffers to using malloc() and free(). They make more sense anyway, and I've learned (or relearned) something about casting.
Since the contents of the packets are different than before, I decided to gut the serialization code. I'll reimplement the internals soon.