Lines Matching refs:Serial
36 /* max serial MTU. Don't change this without modifying
80 * We use one charpipe to connect the emulated serial port to the 'QemudSerial'
81 * object. This object is used to receive data from the serial port, and
86 * through the serial port (see qemud_serial_send())
181 /** HANDLING SERIAL PORT CONNECTION
184 /* The QemudSerial object receives data from the serial port charpipe.
192 * messages back through the serial port.
225 CharDriverState* cs; /* serial charpipe endpoint */
227 /* managing incoming packets from the serial port */
255 /* state of incoming packets from the serial port */
274 /* state of incoming packets from the serial port */
297 D("%s: failed to load serial buffer contents (tried reading %d bytes, got %d)\n",
306 * read from the serial port.
325 /* called by the charpipe to read data from the serial
392 D("%s: ignoring huge serial packet: length=%d channel=%1",
513 /* send a message to the serial port. This will add the necessary
538 /* packetize the payload for the serial MTU */
606 * Each client has its own channel id (for the serial qemud), or pipe descriptor
609 * There is a global list of serial clients used to multiplex incoming
616 /* Defines type of the client: pipe, or serial.
621 /* Client is communicating via serial port. */
667 /* Serial-specific fields. */
670 QemudSerial* serial;
671 } Serial;
849 } else if (c->ProtocolSelector.Serial.channel > 0) {
852 c->ProtocolSelector.Serial.channel);
853 qemud_serial_send(c->ProtocolSelector.Serial.serial, 0, 0, (uint8_t*)tmp, p-tmp);
873 * NOTE: channel_id valie is used as a selector between serial and pipe clients.
874 * Since channel_id < 0 is an invalid value for a serial client, it would
884 QemudSerial* serial,
897 /* Allocating a serial client. */
899 c->ProtocolSelector.Serial.serial = serial;
900 c->ProtocolSelector.Serial.channel = channel_id;
938 qemu_put_be32(f, c->ProtocolSelector.Serial.channel);
1264 * maintain the state of the serial port connection.
1267 * the serial port, and dispatches them to the appropriate
1280 QemudSerial serial[1];
1286 * whenever an incoming message arrives through the serial port
1302 if (!_is_pipe_client(c) && c->ProtocolSelector.Serial.channel == channel) {
1352 if (!_is_pipe_client(c) && c->ProtocolSelector.Serial.channel == channel) {
1358 c->ProtocolSelector.Serial.channel = -1; /* no need to send disconnect:<id> */
1382 if (!_is_pipe_client(c) && c->ProtocolSelector.Serial.channel > 0) {
1385 __FUNCTION__, c->ProtocolSelector.Serial.channel);
1387 __FUNCTION__, c->ProtocolSelector.Serial.channel);
1388 c->ProtocolSelector.Serial.channel = -1; /* do not send disconnect:<id> */
1451 qemud_serial_send(mult->serial, 0, 0, (uint8_t*)tmp, p-tmp);
1496 switch (mult->serial->version) {
1498 mult->serial->version = QEMUD_VERSION_LEGACY;
1521 if (mult->serial->version == QEMUD_VERSION_LEGACY)
1527 qemud_serial_send(mult->serial, 0, 0, (uint8_t*)tmp, p-tmp);
1538 /* initialize serial handler */
1539 qemud_serial_init( mult->serial,
1550 mult->serial,
1588 m->serial,
1643 /* packetize the payload for the serial MTU */
1677 qemud_serial_send(client->ProtocolSelector.Serial.serial,
1678 client->ProtocolSelector.Serial.channel,
1685 * message exchanged through the serial port.
1721 if (_is_pipe_client(c) || c->ProtocolSelector.Serial.channel > 0)
1751 qemud_serial_save(f, m->serial);
1764 if (_is_pipe_client(c) || c->ProtocolSelector.Serial.channel > 0) {
1826 if ((ret = qemud_serial_load(f, m->serial)))
2066 /* this is the end of the serial charpipe that must be passed
2072 /* Initializes QEMUD serial interface.
2083 derror( "%s: can't create charpipe to serial port",
2099 * so we will initialize both qemud machineries, the legacy (over serial
2106 /* return the serial charpipe endpoint that must be used
2181 * modem emulation is provided through an external serial device.
2230 * the user. Since we send everything directly to the serial port
2278 * device or external serial port to implement a char. service