Lines Matching refs:Serial
37 /* max serial MTU. Don't change this without modifying
82 * We use one charpipe to connect the emulated serial port to the 'QemudSerial'
83 * object. This object is used to receive data from the serial port, and
88 * through the serial port (see qemud_serial_send())
183 /** HANDLING SERIAL PORT CONNECTION
186 /* The QemudSerial object receives data from the serial port charpipe.
194 * messages back through the serial port.
227 CharDriverState* cs; /* serial charpipe endpoint */
229 /* managing incoming packets from the serial port */
257 /* state of incoming packets from the serial port */
276 /* state of incoming packets from the serial port */
299 D("%s: failed to load serial buffer contents (tried reading %d bytes, got %d)\n",
308 * read from the serial port.
327 /* called by the charpipe to read data from the serial
394 D("%s: ignoring huge serial packet: length=%d channel=%1",
515 /* send a message to the serial port. This will add the necessary
540 /* packetize the payload for the serial MTU */
608 * Each client has its own channel id (for the serial qemud), or pipe descriptor
611 * There is a global list of serial clients used to multiplex incoming
618 /* Defines type of the client: pipe, or serial.
623 /* Client is communicating via serial port. */
669 /* Serial-specific fields. */
672 QemudSerial* serial;
673 } Serial;
832 * this parameter). For serial clients this parameter is ignored.
867 } else if (c->ProtocolSelector.Serial.channel > 0) {
871 c->ProtocolSelector.Serial.channel);
872 qemud_serial_send(c->ProtocolSelector.Serial.serial, 0, 0, (uint8_t*)tmp, p-tmp);
892 * NOTE: channel_id valie is used as a selector between serial and pipe clients.
893 * Since channel_id < 0 is an invalid value for a serial client, it would
903 QemudSerial* serial,
916 /* Allocating a serial client. */
918 c->ProtocolSelector.Serial.serial = serial;
919 c->ProtocolSelector.Serial.channel = channel_id;
949 * Note that we save only serial clients here. The pipe clients will be
958 qemu_put_be32(f, c->ProtocolSelector.Serial.channel);
979 * Note that we load only serial clients here. The pipe clients will be
1274 * maintain the state of the serial port connection.
1277 * the serial port, and dispatches them to the appropriate
1290 QemudSerial serial[1];
1296 * whenever an incoming message arrives through the serial port
1312 if (!_is_pipe_client(c) && c->ProtocolSelector.Serial.channel == channel) {
1362 if (!_is_pipe_client(c) && c->ProtocolSelector.Serial.channel == channel) {
1368 c->ProtocolSelector.Serial.channel = -1; /* no need to send disconnect:<id> */
1392 if (!_is_pipe_client(c) && c->ProtocolSelector.Serial.channel > 0) {
1395 __FUNCTION__, c->ProtocolSelector.Serial.channel);
1397 __FUNCTION__, c->ProtocolSelector.Serial.channel);
1398 c->ProtocolSelector.Serial.channel = -1; /* do not send disconnect:<id> */
1461 qemud_serial_send(mult->serial, 0, 0, (uint8_t*)tmp, p-tmp);
1506 switch (mult->serial->version) {
1508 mult->serial->version = QEMUD_VERSION_LEGACY;
1531 if (mult->serial->version == QEMUD_VERSION_LEGACY)
1537 qemud_serial_send(mult->serial, 0, 0, (uint8_t*)tmp, p-tmp);
1546 /* initialize serial handler */
1547 qemud_serial_init( mult->serial,
1558 mult->serial,
1596 m->serial,
1651 /* packetize the payload for the serial MTU */
1685 qemud_serial_send(client->ProtocolSelector.Serial.serial,
1686 client->ProtocolSelector.Serial.channel,
1693 * message exchanged through the serial port.
1730 if (!_is_pipe_client(c) && c->ProtocolSelector.Serial.channel > 0)
1760 qemud_serial_save(f, m->serial);
1773 if (!_is_pipe_client(c) && c->ProtocolSelector.Serial.channel > 0) {
1835 if ((ret = qemud_serial_load(f, m->serial)))
2233 /* this is the end of the serial charpipe that must be passed
2239 /* Initializes QEMUD serial interface.
2250 derror( "%s: can't create charpipe to serial port",
2271 * so we will initialize both qemud machineries, the legacy (over serial
2278 /* return the serial charpipe endpoint that must be used
2353 * modem emulation is provided through an external serial device.
2402 * the user. Since we send everything directly to the serial port
2450 * device or external serial port to implement a char. service