37 int max_pkt_size, xdt, frag;
72 frag = size <= max_pkt_size ? 0 : 1;
77 int remaining = end_ptr - ptr;
103 memcpy(q, buff, size);
118 int len = (!frag || frag == 3) ? size : max_pkt_size;
122 *q++ = (frag << 6) | (xdt << 4);
126 memcpy(q, buff, len);
133 frag = size <= max_pkt_size ? 3 : 2;