Home | History | Annotate | Download | only in qemud

Lines Matching defs:Packet

635  ** corresponding file descriptor. We use linked list of Packet
639 typedef struct Packet Packet;
643 struct Packet {
644 Packet* next;
654 static Packet* _free_packets;
656 /* Allocate a packet */
657 static Packet*
660 Packet* p = _free_packets;
672 /* Release a packet. This takes the address of a packet
677 packet_free( Packet* *ppacket )
679 Packet* p = *ppacket;
687 /** PACKET RECEIVER
689 ** Simple abstraction for something that can receive a packet
692 ** Send a packet to it with 'receiver_post'
695 ** packet source was closed.
698 typedef void (*PostFunc) ( void* user, Packet* p );
707 /* post a packet to a receiver. Note that this transfers
708 * ownership of the packet to the receiver.
711 receiver_post( Receiver* r, Packet* p )
719 /* tell a receiver the packet source was closed.
756 Packet* out_first;
757 Packet** out_ptail;
818 * notify the FDHandler that its packet source is closed.
829 /* get rid of outgoing packet queue */
831 Packet* p;
873 /* Enqueue a new packet that the FDHandler will
877 fdhandler_enqueue( FDHandler* f, Packet* p )
879 Packet* first = f->out_first;
902 * the receiver to avoid packet loss.
906 Packet* p = packet_alloc();
927 Packet* p = f->out_first;
975 * dummy packet with the new client socket in p->channel
981 /* this is an accept - send a dummy packet to the receiver */
982 Packet* p = packet_alloc();
1007 * fd in the 'channel' field of a dummy packet.
1035 /* each packet is made of a 6 byte header followed by a payload
1053 * the resulting messages as a packet to a generic receiver.
1055 * You can also use serial_send to send a packet through
1061 int in_len; /* current bytes in input packet */
1064 Packet* in_packet; /* used to read incoming packets */
1076 serial_dump( Packet* p, const char* funcname )
1082 /* a callback called when a packet arrives from the serial port's FDHandler.
1090 serial_fd_receive( Serial* s, Packet* p )
1093 Packet* inp = s->in_packet;
1117 D("ignoring %s packet from serial port",
1122 //D("received %d bytes packet for channel %d", s->in_datalen, s->in_channel);
1126 else /* then, populate the packet itself */
1157 /* send a packet to the serial port.
1162 serial_send( Serial* s, Packet* p )
1164 Packet* h = packet_alloc();
1168 /* insert a small header before this packet */
1244 static int multiplexer_open_channel( Multiplexer* mult, Packet* p );
1246 static void multiplexer_serial_send( Multiplexer* mult, int channel, Packet* p );
1249 client_dump( Client* c, Packet* p, const char* funcname )
1281 client_fd_receive( Client* c, Packet* p )
1347 Packet* p = packet_alloc();
1373 client_send( Client* c, Packet* p )
1434 multiplexer_handle_control( Multiplexer* mult, Packet* p )
1491 /* a function called when an incoming packet comes from the serial port */
1493 multiplexer_serial_receive( Multiplexer* mult, Packet* p )
1510 D("%s: discarding packet for unknown channel %d", __FUNCTION__, p->channel);
1521 /* a function called to send a packet to the serial port */
1523 multiplexer_serial_send( Multiplexer* mult, int channel, Packet* p )
1532 * ask the emulator to open it. 'service' must be a packet containing
1541 multiplexer_open_channel( Multiplexer* mult, Packet* service )
1543 Packet* p = packet_alloc();
1575 Packet* p = packet_alloc();
1593 multiplexer_control_accept( Multiplexer* m, Packet* p )
1602 /* free dummy packet */