[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-discuss] quick pointer on adding a new chardev
From: |
Herb Peyerl |
Subject: |
Re: [Qemu-discuss] quick pointer on adding a new chardev |
Date: |
Mon, 20 Feb 2017 16:21:19 -0700 |
Thanks for the explanation. I was away for the weekend so I’m back digging
into this now. I think I understand better now.
Based on your explanation, this seems to do something though I’m not quite sure
if it’s the right thing:
-chardev socket,host=192.168.1.1,port=4555,id=foo0 \
-global myfoo.chardev=foo0
In my code I did:
s->chr=qemu_chr_alloc();
qemu_chr_add_handlers(s->chr, foo_can_receive, foo_receive, foo_event, s);
Later in the code I did:
qemu_chr_fe_write(s->chr, buf, num)
…and the contents of ‘buf’ did appear in another window that had ‘nc -l 4555’
so it would appear that I’ve successfully linked a socket backend to my
frontend… At least in that direction…
It would appear that none of my handlers are being called when I enter data
into ‘nc’ however… Not sure what else I’m missing but I must be getting close.
- [Qemu-discuss] quick pointer on adding a new chardev, Herb Peyerl, 2017/02/17
- Re: [Qemu-discuss] quick pointer on adding a new chardev, Peter Maydell, 2017/02/17
- Re: [Qemu-discuss] quick pointer on adding a new chardev, Herb Peyerl, 2017/02/17
- Re: [Qemu-discuss] quick pointer on adding a new chardev, Peter Maydell, 2017/02/17
- Re: [Qemu-discuss] quick pointer on adding a new chardev, Herb Peyerl, 2017/02/17
- Re: [Qemu-discuss] quick pointer on adding a new chardev, Peter Maydell, 2017/02/17
- Re: [Qemu-discuss] quick pointer on adding a new chardev,
Herb Peyerl <=
- Re: [Qemu-discuss] quick pointer on adding a new chardev, Peter Maydell, 2017/02/21
- Re: [Qemu-discuss] quick pointer on adding a new chardev, Herb Peyerl, 2017/02/21