Lines Matching refs:response
660 udp_command (const int dev_no, char *command, int cmd_len, char *response,
664 * send udp command to given device and receive the response`
665 * returns: the length of the response or -1
673 struct BJNP_command *resp = (struct BJNP_command *) response;
717 if ((numbytes = recv (sockfd, response, resp_len, 0)) == -1)
728 /* no response even after retry */
1123 PDBG (bjnp_dbg (LOG_DEBUG2, "bjnp_finish_job: Finish scanjob response\n"));
1142 struct POLL_RESPONSE *response;
1202 PDBG (bjnp_dbg (LOG_DEBUG2, "bjnp_poll_scanner: Poll details response:\n"));
1204 response = (struct POLL_RESPONSE *) resp_buf;
1206 device[devno].dialog = ntohl( response -> dialog );
1208 if ( response -> result[3] == 1 )
1212 if ( (response -> result[2] & 0x80) != 0)
1214 memcpy( status, response->status, size);
1217 device[devno].status_key = ntohl( response -> key );
1261 PDBG (bjnp_dbg (LOG_DEBUG2, "bjnp_send_job_details: Job details response:\n"));
1289 PDBG (bjnp_dbg (LOG_DEBUG2, "bjnp_get_scanner_mac_address: Discover response:\n"));
1390 * This function receives the response header to bjnp commands.
1407 (LOG_DEBUG, "bjnp_recv_header: receiving response header\n") );
1428 "bjnp_recv_header: ERROR - could not read response header (select): %s!\n",
1437 "bjnp_recv_header: ERROR - could not read response header (select timed out after %d ms)!\n",
1443 /* get response header */
1457 "bjnp_recv_header: ERROR - (recv) could not read response header, received %d bytes!\n",
1471 "bjnp_recv_header: ERROR - Received response has cmd code %d, expected %d\n",
1480 "bjnp_recv_header: ERROR - Received response has serial %d, expected %d\n",
1485 /* got response header back, retrieve length of payload */
1490 (LOG_DEBUG, "bjnp_recv_header: TCP response header(payload data = %ld bytes):\n",
1570 (LOG_DEBUG, "bjnp_recv_data: read response payload (0x%lx bytes max), buffer: 0x%lx, start_pos: 0x%lx\n",
1607 "bjnp_recv_data: ERROR - could not read response payload (select failed): %s!\n",
1617 "bjnp_recv_data: ERROR - could not read response payload (select timed out after %d ms)!\n",
1628 "bjnp_recv_data: ERROR - could not read response payload (%ld + %ld = %ld) (recv): %s!\n",
1634 PDBG (bjnp_dbg (LOG_DEBUG2, "bjnp_recv_data: Received TCP response payload (%ld bytes):\n",
2203 /* wait for a UDP response */
2230 PDBG (bjnp_dbg (LOG_DEBUG2, "sanei_find_devices: Discover response:\n"));
2234 protocol_defs = get_protocol_by_proto_string(disc_resp-> response.BJNP_id);
2238 /* not a valid response, assume not a scanner */
2241 strncpy(bjnp_id, disc_resp-> response.BJNP_id, 4);
2244 "sanei_find_devices: Invalid discover response! Length = %d, Id = %s\n",
2248 if ( !(disc_resp -> response.dev_type & 0x80) )
2250 /* not a response, a command from somebody else or */
2542 PDBG (bjnp_dbg (LOG_CRIT, "sanei_bjnp_write_bulk: ERROR - Could not read response to command!\n"));