/* Called by the SCLP to report incoming event buffers.  */
static void sclp_vt220_receiver_fn(struct evbuf_header *evbuf)
/* Called by the SCLP to report incoming event buffers.  */
static void sclp_vt220_receiver_fn(struct evbuf_header *evbuf)
{
	char *buffer;
	unsigned int count;
	if (sclp_vt220_tty == NULL)
		return;
	buffer = (char *) ((addr_t) evbuf + sizeof(struct evbuf_header));
	count = evbuf->length - sizeof(struct evbuf_header);
	switch (*buffer) {
	case SCLP_VT220_SESSION_ENDED:
	case SCLP_VT220_SESSION_STARTED:
		break;
	case SCLP_VT220_SESSION_DATA:
		buffer++;
		count--;
		tty_insert_flip_string(sclp_vt220_tty, buffer, count);
		tty_flip_buffer_push(sclp_vt220_tty);
		break;
	}
}