34 int max_pkt_size, xdt, frag;
69 frag = size <= max_pkt_size ? 0 : 1;
74 int remaining = end_ptr - ptr;
93 *q++ = (size >> 8) & 0xff;
95 memcpy(q, buff, size);
110 int len = (!frag || frag == 3) ? size : max_pkt_size;
114 *q++ = (frag << 6) | (xdt << 4);
115 *q++ = (len >> 8) & 0xff;
118 memcpy(q, buff, len);
125 frag = size <= max_pkt_size ? 3 : 2;