qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Transforming stdin and stdout pair into a socket
@ 2009-05-10 18:19 Ciprian Dorin, Craciun
  2009-05-11  8:03 ` [Qemu-devel] Re: [Nbd] " Laurent Vivier
  2009-05-11 12:02 ` [Qemu-devel] " Anthony Liguori
  0 siblings, 2 replies; 8+ messages in thread
From: Ciprian Dorin, Craciun @ 2009-05-10 18:19 UTC (permalink / raw)
  To: linux-newbie; +Cc: nbd-general, qemu-devel

    Hello all!

    Today I've played around with NBD (Network Block Disk), and
qemu-nbd (a NBD client that exports QEMU disks as NBD's).

    My problem is the following: both NBD kernel module and qemu-nbd
implementation expect to use a socket in order to communicate.
    This means that in order to securely tunnel the connection over
SSH (OpenSSH), I need an intermediary process that creates a socket
and forwards all input / output between this socket and stdin / stdout
(which are in fact pipes received from OpenSSH).

    My question is: can I somehow make the pair of stdin / stdout seem
as a socket to the Linux syscalls (read and write)? (I would have to
make stdin / stdout pair look like a single file descriptor.) (This
would eliminate the intermediate process that just pipes data, and
thus reduce the overhead.)

    Just to be clear: I know how to trick an application to have it's
stdin and stdout be an opened socket (by using dup syscall). But in
this case I need to trick the Linux kernel into thinking that stdin /
stdout pair is a socket (or a single file descriptor).

    Thank you,
    Ciprian Craciun.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-05-12  2:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-10 18:19 [Qemu-devel] Transforming stdin and stdout pair into a socket Ciprian Dorin, Craciun
2009-05-11  8:03 ` [Qemu-devel] Re: [Nbd] " Laurent Vivier
2009-05-11 13:28   ` Ciprian Dorin, Craciun
2009-05-11 12:02 ` [Qemu-devel] " Anthony Liguori
2009-05-11 13:32   ` Ciprian Dorin, Craciun
2009-05-11 19:31     ` [Nbd] " Wouter Verhelst
2009-05-11 23:07     ` Paul Brook
2009-05-12  2:24       ` Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).