Home | History | Annotate | Download | only in android

Lines Matching full:channel

71  *  channel between clients running in the emulated system and 'services'
83 * unframe messages (i.e. extract payload length + channel id from header,
186 * It parses the header to extract the channel id and payload length,
223 typedef void (*QemudSerialReceive)( void* opaque, int channel, uint8_t* msg, int msglen);
381 /* extract payload length + channel id */
393 D("%s: ignoring huge serial packet: length=%d channel=%1",
410 D("%s: channel=%2d len=%3d '%s'", __FUNCTION__,
433 * <length><channel><payload>
437 * <channel><length><payload>
439 * where <channel> is a 2-hexchar string, and <length> a 4-hexchar
456 * for channel 0, with garbage content ("X000b00conn...") which
462 * one message "X" on channel 0, which will force the daemon
465 * three "connect:<xxx>" messages used to receive the channel
468 * a garbage packet of 194 zeroes for channel 16, which will be
519 int channel,
528 if (msglen <= 0 || channel < 0)
531 D("%s: channel=%2d len=%3d '%s'",
532 __FUNCTION__, channel, msglen,
550 int2hex(header + LEGACY_CHANNEL_OFFSET, CHANNEL_SIZE, channel);
553 int2hex(header + CHANNEL_OFFSET, CHANNEL_SIZE, channel);
557 int2hex(header + CHANNEL_OFFSET, CHANNEL_SIZE, channel);
607 * Each client has its own channel id (for the serial qemud), or pipe descriptor
611 * messages from the channel id (see qemud_multiplexer_serial_recv()). Pipe
670 int channel;
866 } else if (c->ProtocolSelector.Serial.channel > 0) {
870 c->ProtocolSelector.Serial.channel);
918 c->ProtocolSelector.Serial.channel = channel_id;
957 qemu_put_be32(f, c->ProtocolSelector.Serial.channel);
996 int channel = qemu_get_be32(f);
998 if (channel == 0) {
999 D("%s: illegal snapshot: client for control channel must no be saved\n",
1005 QemudClient* c = qemud_service_connect_client(sv, channel, param);
1163 D("%s: registered client channel %d for '%s' service",
1283 * to handle channel 0, i.e. the control channel used to handle
1299 int channel,
1307 * note that channel 0 is handled by a special
1311 if (!_is_pipe_client(c) && c->ProtocolSelector.Serial.channel == channel) {
1317 D("%s: ignoring %d bytes for unknown channel %d",
1318 __FUNCTION__, msglen, channel);
1345 /* connect a new client to the service on the given channel */
1352 /* disconnect a given client from its channel id */
1355 int channel )
1359 /* find the client by its channel id, then disconnect it */
1361 if (!_is_pipe_client(c) && c->ProtocolSelector.Serial.channel == channel) {
1363 __FUNCTION__, channel);
1367 c->ProtocolSelector.Serial.channel = -1; /* no need to send disconnect:<id> */
1372 D("%s: disconnecting unknown channel %d",
1373 __FUNCTION__, channel);
1376 /* disconnects all channels, except for the control channel, without informing
1391 if (!_is_pipe_client(c) && c->ProtocolSelector.Serial.channel > 0) {
1392 /* skip control channel */
1394 __FUNCTION__, c->ProtocolSelector.Serial.channel);
1396 __FUNCTION__, c->ProtocolSelector.Serial.channel);
1397 c->ProtocolSelector.Serial.channel = -1; /* do not send disconnect:<id> */
1405 * channel 0.
1427 int channel, ret;
1437 channel = hex2int((uint8_t*)q, 2);
1438 if (channel <= 0) {
1439 D("%s: malformed channel id '%.*s",
1444 ret = qemud_multiplexer_connect(mult, service_name, channel);
1452 p = bufprint(tmp, end, "ko:connect:%02x:unknown service", channel);
1454 p = bufprint(tmp, end, "ko:connect:%02x:service busy", channel);
1458 p = bufprint(tmp, end, "ok:connect:%02x", channel);
1466 * format: "disconnect:<id>" where <id> is a 2-hex channel id > 0
1471 D("%s: malformed disconnect channel id: '%.*s'",
1490 int channel;
1498 channel = hex2int((uint8_t*)q, 2);
1499 if (channel <= 0) {
1500 D("%s: malformed legacy channel id '%.*s",
1525 qemud_multiplexer_connect(mult, service_name, channel);
1553 /* setup listener for channel 0 */
1687 client->ProtocolSelector.Serial.channel,
1729 /* skip control channel, which is not saved, and pipe channels that
1731 if (!_is_pipe_client(c) && c->ProtocolSelector.Serial.channel > 0)
1751 * The control channel has no state of its own, other than the local variables
1773 /* skip control channel, and pipe clients */
1774 if (!_is_pipe_client(c) && c->ProtocolSelector.Serial.channel > 0) {
1801 * We do not send "disconnect" commands, over the channel. If we did, we might
1812 /* Remove all clients, except on the control channel.*/
1941 /* Create a client for this connection. -1 as a channel ID signals that this
1956 /* Called when the guest wants to close the channel.
2392 derror("unexpected qemud char. channel close");
2425 int channel,
2429 QemudClient* c = qemud_client_new( sv, channel, client_param,
2461 /* set the character driver state for a given qemud communication channel. this
2462 * is used to attach the channel to an external char driver device directly.