I'm running the following test program, and it works as written with a
blocking stream. Inside the guest I'm running:
[root@f17-minimal ~]# socat /usr/share/dict/words
/dev/virtio-ports/org.libguestfs.channel.0
As expected on the client side, I get all the words dumped. However if
I swap the
This patch adds a new API, virDomainOpenChannel, that uses streams to
connect to a virtio channel on a guest. This creates a secure
communication channel between a guest and a libvirt client.
This behaves the same as virDomainOpenConsole, except on channels
instead of console/serial/parallel
This is just code motion, in preparation to rename identifiers to be
less console-specific.
---
po/POTFILES.in | 2 +-
src/Makefile.am | 2 +-
src/conf/virchrdev.c | 414 +++
src/conf/virchrdev.h | 36 +
The functionality provided in virchrdev.c (previously virconsole.c) is
applicable to other types of character devices besides consoles, such
as channels. This patch is just code motion, renaming things such as
console or pty, instead using more general terms such as
character device or device
---
v2: correct version comment to 1.0.2
src/qemu/qemu_driver.c | 73 ++
1 file changed, 73 insertions(+)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 20e2001..cdbe30d 100644
--- a/src/qemu/qemu_driver.c
+++
master
- Correct version to 1.0.2 in 5/5
---
John Eckersberg (5):
api: Add API to tunnel a guest channel via stream
conf: Rename virconsole.* to virchrdev.*
conf: Rename console-specific identifiers to be more generic
conf: Add unix socket support to virChrdevOpen
qemu: Implement
This also changes the function signature to take a
virDomainChrSourceDefPtr instead of just a path, since it needs to
differentiate behavior based on source-type.
---
src/conf/virchrdev.c | 38 +-
src/conf/virchrdev.h | 5 +++--
src/qemu/qemu_driver.c | 2
Attached is a simple test program to exercise virDomainOpenChannel that
echoes a toupper()'d string and exits. Edit the #defines as necessary
to match your setup. You'll need a channel defined in the guest similar
to:
channel type=unix
source mode=bind path=/tmp/guestfsd.sock/
---
src/qemu/qemu_driver.c | 73 ++
1 file changed, 73 insertions(+)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 441272d..bcd9c57 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -12907,6 +12907,78 @@
This also changes the function signature to take a
virDomainChrSourceDefPtr instead of just a path, since it needs to
differentiate behavior based on source-type.
---
src/conf/virchrdev.c | 38 +-
src/conf/virchrdev.h | 5 +++--
src/qemu/qemu_driver.c | 2
This is just code motion, in preparation to rename identifiers to be
less console-specific.
---
po/POTFILES.in | 2 +-
src/Makefile.am | 2 +-
src/conf/virchrdev.c | 414 +++
src/conf/virchrdev.h | 36 +
This patch adds a new API, virDomainOpenChannel, that uses streams to
connect to a virtio channel on a guest. This creates a secure
communication channel between a guest and a libvirt client.
This behaves the same as virDomainOpenConsole, except on channels
instead of console/serial/parallel
The functionality provided in virchrdev.c (previously virconsole.c) is
applicable to other types of character devices besides consoles, such
as channels. This patch is just code motion, renaming things such as
console or pty, instead using more general terms such as
character device or device
This implements only item (3) in that list.
The new API is nearly identical to the existing virDomainOpenConsole
API, except it works on channels, and supports UNIX sockets in
addition to PTYs for channel source type.
This is my first libvirt patch, please be gentle :)
John Eckersberg (5):
api
Daniel P. Berrange berra...@redhat.com writes:
Thus far we only have one rule about header files, #include config.h
must be first in all .c files. I'm wondering if it is time to introduce
some new rules
- All system headers must be grouped to preceed all local headers
- All system headers
15 matches
Mail list logo