Generalised function for creating buffers to send to the control port.