Lines Matching defs:buf_size
165 size_t buf_size, size_t reply_len, SANE_Status *status)
168 unsigned char *packet = malloc(12 + 8 + buf_size);
198 DBG(24, "%s: cmd = %04x, buf = %p, buf_size = %lu, reply_len = %lu\n",
199 __func__, cmd, (void *) buf, (u_long) buf_size, (u_long) reply_len);
216 htobe32a(&h1[6], buf_size + 8);
218 htobe32a(&h2[0], buf_size);
221 DBG(24, "H1[6]: %02x %02x %02x %02x (%lu)\n", h1[6], h1[7], h1[8], h1[9], (u_long) (buf_size + 8));
222 DBG(24, "H2[0]: %02x %02x %02x %02x (%lu)\n", h2[0], h2[1], h2[2], h2[3], (u_long) buf_size);
226 if ((cmd >> 8) == 0x20 && (buf_size || reply_len)) {
227 if (buf_size)
228 memcpy(payload, buf, buf_size);
230 sanei_tcp_write(s->fd, packet, 12 + 8 + buf_size);
238 return buf_size;