mux_next_header
total_length = sizeof(struct mux_next_header) + data_len;
struct mux_next_header *hdr = (struct mux_next_header *)(&frame->data[frame->n_bytes]);
memset(hdr, 0, sizeof(struct mux_next_header));
frame->n_bytes += sizeof(struct mux_next_header);
int expected_adth_size = sizeof(struct mux_next_header) + 4 + (frame->n_packets+1)*sizeof(struct mux_bounds);
struct mux_next_header *adth;
n_packets = (adth->length - sizeof(struct mux_next_header) - 4) / sizeof(struct mux_bounds);
bounds = (void*)&data[first->next + sizeof(struct mux_next_header) + 4];
frame_size = sizeof(struct mux_first_header) + xn->queued_bytes + sizeof(struct mux_next_header) + 4 + sizeof(struct mux_bounds)*xn->queued_packets;