Home | History | Annotate | Download | only in cups

Lines Matching defs:buffer

37  * Buffer size for side-channel requests...
53 * The "datalen" parameter must be initialized to the size of the buffer
55 * update the value to contain the number of data bytes in the buffer.
63 char *data, /* O - Response data buffer pointer */
64 int *datalen, /* IO - Size of data buffer on entry, number of bytes in buffer on return */
92 * The "datalen" parameter must be initialized to the size of the buffer
94 * update the value to contain the number of data bytes in the buffer.
103 char *data, /* O - Data buffer pointer */
104 int *datalen, /* IO - Size of data buffer on entry, number of bytes in buffer on return */
107 char *buffer; /* Message buffer */
175 if ((buffer = _cupsBufferGet(_CUPS_SC_MAX_BUFFER)) == NULL)
183 while ((bytes = read(CUPS_SC_FD, buffer, _CUPS_SC_MAX_BUFFER)) < 0)
188 _cupsBufferRelease(buffer);
204 _cupsBufferRelease(buffer);
216 if (buffer[0] < CUPS_SC_CMD_SOFT_RESET ||
217 buffer[0] >= CUPS_SC_CMD_MAX)
219 DEBUG_printf(("1cupsSideChannelRead: Bad command %d!", buffer[0]));
221 _cupsBufferRelease(buffer);
229 *command = (cups_sc_command_t)buffer[0];
235 templen = ((buffer[2] & 255) << 8) | (buffer[3] & 255);
240 * Either the response is bigger than the provided buffer or the
249 * Either the response is bigger than the provided buffer or the
262 *status = (cups_sc_status_t)buffer[1];
265 memcpy(data, buffer + 4, (size_t)templen);
268 _cupsBufferRelease(buffer);
287 * buffer to hold the OID value as a string. HEX-String (binary) values are
302 char *data, /* I - Buffer for OID value */
303 int *datalen, /* IO - Size of OID buffer on entry, size of value on return */
308 char *real_data; /* Real data buffer for response */
309 int real_datalen, /* Real length of data buffer */
414 char *real_data; /* Real data buffer for response */
415 int real_datalen; /* Real length of data buffer */
528 const char *data, /* I - Data buffer pointer */
532 char *buffer; /* Message buffer */
596 if ((buffer = _cupsBufferGet((size_t)datalen + 4)) == NULL)
599 buffer[0] = command;
600 buffer[1] = status;
601 buffer[2] = (char)(datalen >> 8);
602 buffer[3] = (char)(datalen & 255);
608 memcpy(buffer + 4, data, (size_t)datalen);
612 while (write(CUPS_SC_FD, buffer, (size_t)bytes) < 0)
615 _cupsBufferRelease(buffer);
619 _cupsBufferRelease(buffer);