* [uml-devel] Re: [uml-user] UNIX socket networking [not found] ` <200402291720.12216.blaisorblade_spam@yahoo.it> @ 2004-02-29 17:13 ` Patrick Kilian 2004-03-01 20:14 ` Patrick "Petschge" Kilian 0 siblings, 1 reply; 10+ messages in thread From: Patrick Kilian @ 2004-02-29 17:13 UTC (permalink / raw) To: BlaisorBlade, user-mode-linux-devel Hi all, >> Problem 1.) How do I shutdown a kernel thread when the uml goes >> down? At the moment my patched kernle gets stuck with 100% CPU >> usage when I trie to shut down the uml kernel. > Possibly can be done either through exitcall or uml_exitcall. Give a > look at the arch/um/kernel/sigio_*.c, especially at sigio_cleanup, > which is an UML exitcall. Note however that the thread it refers to > exists only on the host; it could be your case or not. I did some test with exitcall but it didn't work out. Looks like I was trying to do the roght thing, but did some mistakes. >> Problem 2.) How can I make sure that my kernel thread I startet >> _after_ the networking stuff is inited? At the moment I start the >> kernel thread with a __initcall and just do a sleep(30) in the >> thread. > The proper way would be to use late_initcall instead of __initcall > (check in <linux/init.h>), supposing that network does not already > use late_initcall. I didn't know about late_initcall, but it sounds promising. > Or you can just hack the network initcall and make it call your > function; or your initcall can call the network init. I wanted to avoid hacking the network code itself. > In this case, to avoid double initialization, add at the start of > network_init (or how is it called) something like: > > if (network_already_inited) > return (Ok?); > network_already_inited = 1; > > and before, in the same file: > static int network_already_inited = 0; > > However rename the flag or someone could think you are a Pascal > programmer (actually, I was). Seems like the actual function is > called sock_init. Well, I'll give it a try. > Also, in 2.6 (what I am checking) initcalls are called after sock_init > (in init/main.c: do_basic_setup()). So if that is right you do not > need anything to make sure that your initcall is after network > initialized. The first time I ran into this problem was on 2.4.*. But I tried IIRC on 2.6.* too and had the same problems. >> Problem 3.) I can only create sockets in the "anonymous" namespace. >> The normal namespace gives me some error which I don't rememeber >> right now but I could find out what th errorcode was. > Sorry, but I cannot find any "anonymous" namespace. What is it? Maybe > PF_UNSPEC? It's abstract namespace (sorry for my mistake): It's also in PF_LOCAL but with names that start with \0. I was told to try this on the linux kernel newbies list. If you google with my name and socket you should be able to find that thread. > I guess the "normal" namespace is PF_LOCAL. IIRC yes. >> So if somebody could help me with this problem I'd be willing to >> put some more work into this. Or I could post my tried on this list >> or by pm > There has been a lot of request for a such feature, so I would like > if you can post it here or rather on uml-devel (especially to avoid > anyone trying it without specific knowledge), even if it is not > complete. So we could better help you. Also, state whether it is onto > 2.4 or 2.6. It's just some basic test. Far from being a working patch. I'll try your sugestions and send in a patch in the next few days. Thanks for your help, Patrick "Petschge" Kilian ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id\x1356&alloc_id438&opÌk _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [uml-devel] Re: [uml-user] UNIX socket networking 2004-02-29 17:13 ` [uml-devel] Re: [uml-user] UNIX socket networking Patrick Kilian @ 2004-03-01 20:14 ` Patrick "Petschge" Kilian 2004-03-02 18:09 ` BlaisorBlade 0 siblings, 1 reply; 10+ messages in thread From: Patrick "Petschge" Kilian @ 2004-03-01 20:14 UTC (permalink / raw) To: BlaisorBlade, user-mode-linux-devel Hi all, >> Problem 1.) How do I shutdown a kernel thread when the uml goes >> down? At the moment my patched kernle gets stuck with 100% CPU >> usage when I trie to shut down the uml kernel. Ok uml_exitcall fixed this problem. >> Problem 2.) How can I make sure that my kernel thread I startet >> after the networking stuff is inited? At the moment I start the >> kernel thread with a __initcall and just do a sleep(30) in the >> thread. > I didn't know about late_initcall, but it sounds promising. And it works too. >> Problem 3.) I can only create sockets in the "anonymous" namespace. >> The normal namespace gives me some error which I don't rememeber >> right now but I could find out what th errorcode was. Well bind is returning -2 which seams to be -ENOENT. Does somebody know why this happens? >> I guess the "normal" namespace is PF_LOCAL. >IIRC yes. I use PF_UNIX in the code. But that should be the same as PF_LOCAL. > There has been a lot of request for a such feature, so I would like > if you can post it here or rather on uml-devel (especially to avoid > anyone trying it without specific knowledge), even if it is not > complete. So we could better help you. Also, state whether it is onto > 2.4 or 2.6. At the moment I am working on 2.6.0-test11 Thanks for your help, Patrick "Petschge" Kilian ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [uml-devel] Re: [uml-user] UNIX socket networking 2004-03-01 20:14 ` Patrick "Petschge" Kilian @ 2004-03-02 18:09 ` BlaisorBlade 2004-03-02 21:40 ` Patrick Kilian 0 siblings, 1 reply; 10+ messages in thread From: BlaisorBlade @ 2004-03-02 18:09 UTC (permalink / raw) To: user-mode-linux-devel; +Cc: Patrick Kilian Alle 21:14, lunedì 1 marzo 2004, Patrick \ ha scritto: > >> Problem 3.) I can only create sockets in the "anonymous" namespace. > >> The normal namespace gives me some error which I don't rememeber > >> right now but I could find out what th errorcode was. Ok - I found what the anonymous namespace is (your refer to the "abstract" namespace described in man 7 unix). > Well bind is returning -2 which seams to be -ENOENT. Does somebody know why > this happens? Hmm, I'm no expert with sockets; possibly the folder in which you create the socket does not exist. However, possibly code it like a normal program which just opens the socket and calls bind() and try it. However, posting the code would be *very* helpful ... do not be shy! > >> I guess the "normal" namespace is PF_LOCAL. > > > >IIRC yes. > > I use PF_UNIX in the code. But that should be the same as PF_LOCAL. Yes, that is true (checked /usr/include/bits/socket.h). -- Paolo Giarrusso, aka Blaisorblade Linux registered user n. 292729 ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id\x1356&alloc_id438&opÌk _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 10+ messages in thread
* [uml-devel] Re: [uml-user] UNIX socket networking 2004-03-02 18:09 ` BlaisorBlade @ 2004-03-02 21:40 ` Patrick Kilian 2004-03-07 10:54 ` Patrick "Petschge" Kilian 2004-03-07 11:28 ` BlaisorBlade 0 siblings, 2 replies; 10+ messages in thread From: Patrick Kilian @ 2004-03-02 21:40 UTC (permalink / raw) To: BlaisorBlade, user-mode-linux-devel Hi all, Am Dienstag, 2. März 2004 19:09 schrieb BlaisorBlade: >> Well bind is returning -2 which seams to be -ENOENT. Does somebody >> know why this happens? > Hmm, I'm no expert with sockets; possibly the folder in which you > create the socket does not exist. However, possibly code it like a > normal program which just opens the socket and calls bind() and try > it. No the folder exists and is on a rw filesystem. This problem was the reason why I abandond the the driver the first time. > However, posting the code would be *very* helpful ... do not be shy! Well you asked for it. Here we go: --- unix_sock_driver.patch diff -Nur linux-2.6.0-test11-uml/.config linux-2.6.0-test11-uml2/.config --- linux-2.6.0-test11-uml/.config Fri Dec 12 17:52:41 2003 +++ linux-2.6.0-test11-uml2/.config Wed Dec 31 19:21:29 2003 @@ -15,6 +15,7 @@ CONFIG_BINFMT_ELF=y CONFIG_BINFMT_MISC=y CONFIG_HOSTFS=y +CONFIG_HOSTSOCKET=y # CONFIG_HPPFS is not set CONFIG_MCONSOLE=y CONFIG_MAGIC_SYSRQ=y Binary files linux-2.6.0-test11-uml/.tmp_vmlinux1 and linux-2.6.0-test11-uml2/.tmp_vmlinux1 differ Binary files linux-2.6.0-test11-uml/.tmp_vmlinux2 and linux-2.6.0-test11-uml2/.tmp_vmlinux2 differ diff -Nur linux-2.6.0-test11-uml/arch/um/Kconfig linux-2.6.0-test11-uml2/arch/um/Kconfig --- linux-2.6.0-test11-uml/arch/um/Kconfig Fri Dec 12 17:38:50 2003 +++ linux-2.6.0-test11-uml2/arch/um/Kconfig Wed Dec 31 19:20:39 2003 @@ -99,6 +99,15 @@ If you'd like to be able to work with files stored on the host, say Y or M here; otherwise say N. +config HOSTSOCKET + bool "Hostsocket Support" + default n + depends on EXPERIMENTAL + help + Support for tunneling of unix sockets. Currently very b0rken. + + If unsure say N. + config HPPFS tristate "HoneyPot ProcFS" help diff -Nur linux-2.6.0-test11-uml/arch/um/drivers/Makefile linux-2.6.0-test11-uml2/arch/um/drivers/Makefile --- linux-2.6.0-test11-uml/arch/um/drivers/Makefile Fri Dec 12 17:30:43 2003 +++ linux-2.6.0-test11-uml2/arch/um/drivers/Makefile Tue Mar 2 21:12:59 2004 @@ -1,4 +1,4 @@ -# +# # Copyright (C) 2000, 2002, 2003 Jeff Dike (jdike@karaya.com) # Licensed under the GPL # @@ -16,6 +16,7 @@ net-objs := net_kern.o net_user.o mconsole-objs := mconsole_kern.o mconsole_user.o hostaudio-objs := hostaudio_kern.o hostaudio_user.o +hostsocket-objs := hostsocket_user.o hostsocket_kern.o ubd-objs := ubd_kern.o ubd_user.o port-objs := port_kern.o port_user.o harddog-objs := harddog_kern.o harddog_user.o @@ -30,8 +31,9 @@ obj-$(CONFIG_UML_NET) += net.o obj-$(CONFIG_MCONSOLE) += mconsole.o obj-$(CONFIG_MMAPPER) += mmapper_kern.o obj-$(CONFIG_HOSTAUDIO) += hostaudio.o +obj-$(CONFIG_HOSTSOCKET) += hostsocket.o obj-$(CONFIG_FD_CHAN) += fd.o obj-$(CONFIG_NULL_CHAN) += null.o obj-$(CONFIG_PORT_CHAN) += port.o diff -Nur linux-2.6.0-test11-uml/arch/um/drivers/hostsocket.h linux-2.6.0-test11-uml2/arch/um/drivers/hostsocket.h --- linux-2.6.0-test11-uml/arch/um/drivers/hostsocket.h Thu Jan 1 01:00:00 1970 +++ linux-2.6.0-test11-uml2/arch/um/drivers/hostsocket.h Tue Mar 2 22:22:19 2004 @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2004 Patrick Kilian <petschge@web.de> + * Licensed under the GPL + */ + +// Socket we are talking to at the host side +#define HOSTSOCKET "/tmp/hostsocket" + +// Socket we are talking from at the host side +#define SENDSOCKET "/tmp/sendsocket" + +// Socket we show inside the guest +// #define GUESTSOCKET "/tmp/guestsocket" +// #define GUESTSOCKET "\0guestsocket" +#define GUESTSOCKET "@guestsocket" +// #define GUESTSOCKET "guestsocket" + +#define H_MESSAGE "This is the uml saying hello" +#define B_MESSAGE "This is the uml saying byebye" + +#define DEBUG_HS + +/* host side socket file operations */ +int init_socket_user(void); +void exit_socket_user(void); + +/* package passing functions */ + +/* package is a wrapper araound a unix socket data packet */ +typedef struct { + int len; + unsigned char data[4096]; +} package; + +// All have to be non-blocking +// package must be some wrapper araound a unix socket data packet +package read_from_host(void); +void write_to_host(package p); +package read_from_uml(void); +void write_to_host(package p); + +/* + * Overrides for Emacs so that we follow Linus's tabbing style. + * Emacs will notice this stuff at the end of the file and automatically + * adjust the settings for this buffer only. This must remain at the end + * of the file. + * --------------------------------------------------------------------------- + * Local variables: + * c-file-style: "linux" + * End: + * + */ diff -Nur linux-2.6.0-test11-uml/arch/um/drivers/hostsocket_kern.c linux-2.6.0-test11-uml2/arch/um/drivers/hostsocket_kern.c --- linux-2.6.0-test11-uml/arch/um/drivers/hostsocket_kern.c Thu Jan 1 01:00:00 1970 +++ linux-2.6.0-test11-uml2/arch/um/drivers/hostsocket_kern.c Tue Mar 2 22:22:23 2004 @@ -0,0 +1,164 @@ +/* + * Copyright (C) 2004 Patrick Kilian <petschge@web.de> + * Licensed under the GPL + */ + +#include "hostsocket.h" + +#include "linux/delay.h" +#include "linux/init.h" +#include "linux/module.h" +#include "linux/kernel.h" +#include "linux/sched.h" +#include "linux/signal.h" +#include "linux/types.h" +#include "linux/uio.h" +#include "linux/sched.h" +#include "linux/net.h" +#include "net/sock.h" +#include "linux/un.h" +#include "kern.h" + +int error; + +struct socket *guestsock; + +pid_t socketpid; +int st_kill = 0; + + +package read_from_uml(void) { + package out; + out.len = 0; + return(out); + /* + mm_segment_t oldfs; + struct msghdr msg; + struct iovec iov; + static char Buffer[4096]; + + msg.msg_name = NULL; // Socket name + msg.msg_namelen = 0; // Length of name + msg.msg_iov = &iov; // Data blocks + msg.msg_iovlen = 1; // Number of blocks + msg.msg_control = NULL; // Per protocol magic + msg.msg_controllen = 0; // Length of cmsg list + msg.msg_flags = 0; // 0 vs MSG_DONTWAIT + + msg.msg_iov->iov_base = &Buffer[0]; + msg.msg_iov->iov_len = (__kernel_size_t)1024; + + oldfs = get_fs(); + set_fs(KERNEL_DS); + len = sock_recvmsg(guestsock, &msg, 4096, 0); + // len = sock_recvmsg(guestsock, &msg, 4096, MSG_DONTWAIT); + set_fs(oldfs); + */ +} + +void write_to_uml(package p) { + printk(KERN_INFO "packet.length= %d\n", p.len); +} + +// Create the socket in the uml +static int setup_guestsocket(void) { + struct sockaddr_un sun; + + error = sock_create(PF_UNIX, SOCK_DGRAM, 0, &guestsock); + if (error < 0) { + return(error); + } + + sun.sun_family = AF_UNIX; + strncpy (sun.sun_path, GUESTSOCKET, sizeof (GUESTSOCKET)); + strncpy (sun.sun_path, "\0", 1); + error = guestsock->ops->bind(guestsock, (struct sockaddr *)&sun, sizeof(sun)); + if (error<0) { + printk(KERN_INFO "socket thread: can't bind guest socket, error=%d\n", error); + printk(KERN_INFO "ENOENT: %d\n", ENOENT); + } + return(error); + +} + +static int socketfunc(void *data) { + package p; + + // Set thread name + sprintf(current->comm, "socket thread"); + + /* Startup of the uml side */ + + // Create the socket in the uml + error = setup_guestsocket(); + if (error < 0) { + printk(KERN_INFO "Socket thread: can't create guest socket, error=%d\n", error); + } + + printk(KERN_INFO "Socket thread entering recv loop\n"); + while (1) { + if (st_kill != 0) { + break; + } + + p = read_from_uml(); + if (p.len < 0) { + printk(KERN_INFO "Socket thread recv failed, p.len=%d\n", p.len); + } else { + printk(KERN_INFO "Socket thread got: p.len=%d\n", p.len); + write_to_host(p); + } + + p = read_from_host(); + if (p.len < 0) { + printk(KERN_INFO "Socket thread read_from_host failed, p.len=%d\n", p.len); + } else { + printk(KERN_INFO "Socket thread read_from_host: p.len=%d\n", p.len); + write_to_uml(p); + } + + printk(":"); + current->state = TASK_UNINTERRUPTIBLE; + schedule_timeout(1*HZ); + } + + return(0); +} + +static int init_socket(void) { + + printk(KERN_INFO "Registering Socket Relay...\n"); + /* Startup of the host side */ + init_socket_user(); + + /* Start the kernelthread */ + socketpid = kernel_thread(socketfunc, NULL, 0); + if (socketpid < 0) { + printk(KERN_INFO "Can't start socket thread, socketpid=%d\n", socketpid); + } + + printk(KERN_INFO "Finished Socket Relay\n"); + return(0); +} + +static void exit_socket(void) { + //XXX: Kill order + //kill_proc(socketpid, SIGKILL, 1); + exit_socket_user(); + st_kill=1; +} + +late_initcall(init_socket); +uml_exitcall(exit_socket); + + +/* + * Overrides for Emacs so that we follow Linus's tabbing style. + * Emacs will notice this stuff at the end of the file and automatically + * adjust the settings for this buffer only. This must remain at the end + * of the file. + * --------------------------------------------------------------------------- + * Local variables: + * c-file-style: "linux" + * End: + */ diff -Nur linux-2.6.0-test11-uml/arch/um/drivers/hostsocket_user.c linux-2.6.0-test11-uml2/arch/um/drivers/hostsocket_user.c --- linux-2.6.0-test11-uml/arch/um/drivers/hostsocket_user.c Thu Jan 1 01:00:00 1970 +++ linux-2.6.0-test11-uml2/arch/um/drivers/hostsocket_user.c Tue Mar 2 22:22:21 2004 @@ -0,0 +1,98 @@ +/* + * Copyright (C) 2004 Patrick Kilian <petschge@web.de> + * Licensed under the GPL + */ +#include "hostsocket.h" + +#include <errno.h> +#include <stddef.h> +#include <stdio.h> +#include <stdlib.h> +#include <sys/socket.h> +#include <sys/un.h> +#include <unistd.h> + +struct sockaddr_un name; +size_t size; +int nbytes; +int sendsock; + +/* host side operations */ +package read_from_host(void) { + // Do not block + package out; + out.len=0; + return(out); +} +EXPORT_SYMBOL(read_from_host); + +void write_to_host(package p) { + // Do not block + // printf("p.len=%d, p=%s\n", p.len, p.data); + nbytes = sendto (sendsock, p.data, p.len, 0, (struct sockaddr *) &name, size); + if (nbytes < 0) { + perror("Can't sendto hello to host socket\n"); + } +} +EXPORT_SYMBOL(write_to_host); + +int init_socket_user(void) { + package hello; + printf("Registering Socket Relay on the Host Side...\n"); + + /* Make the sendsocket. */ + // Remove old sendsocket + unlink(SENDSOCKET); + // Create socket + sendsock = socket (PF_LOCAL, SOCK_DGRAM, 0); + if (sendsock < 0) { + perror("Can't create sending host socket\n"); + exit (-1); + } + // Bind a name to the socket. + name.sun_family = AF_LOCAL; + strncpy (name.sun_path, SENDSOCKET, sizeof (name.sun_path)); + size = SUN_LEN (&name); + if (bind (sendsock, (struct sockaddr *) &name, size) < 0) { + perror("Can't bind sending host socket\n"); + exit (-1); + } + + /* Initialize the server socket address. */ + name.sun_family = AF_LOCAL; + strcpy (name.sun_path, HOSTSOCKET); + size = strlen (name.sun_path) + sizeof (name.sun_family); + + /* Send a hello. */ + hello.len = strlen (H_MESSAGE) + 1; + strcpy (hello.data, H_MESSAGE); + write_to_host(hello); + + printf("Finished host side setup\n"); + return(0); +} + +void exit_socket_user(void) { + package bye; + + /* Send a goodbye */ + bye.len = strlen (B_MESSAGE) + 1; + strcpy (bye.data, B_MESSAGE); + write_to_host(bye); + + /* Remove sendsocket */ + // XXX: Remove order + unlink(SENDSOCKET); + close(sendsock); +} + +/* + * Overrides for Emacs so that we follow Linus's tabbing style. + * Emacs will notice this stuff at the end of the file and automatically + * adjust the settings for this buffer only. This must remain at the end + * of the file. + * --------------------------------------------------------------------------- + * Local variables: + * c-file-style: "linux" + * End: + */ diff -Nur linux-2.6.0-test11-uml/include/config/hostsocket.h linux-2.6.0-test11-uml2/include/config/hostsocket.h --- linux-2.6.0-test11-uml/include/config/hostsocket.h Thu Jan 1 01:00:00 1970 +++ linux-2.6.0-test11-uml2/include/config/hostsocket.h Wed Dec 31 19:22:37 2003 @@ -0,0 +1 @@ +#define CONFIG_HOSTSOCKET 1 diff -Nur linux-2.6.0-test11-uml/include/linux/autoconf.h linux-2.6.0-test11-uml2/include/linux/autoconf.h --- linux-2.6.0-test11-uml/include/linux/autoconf.h Fri Dec 12 17:52:41 2003 +++ linux-2.6.0-test11-uml2/include/linux/autoconf.h Wed Dec 31 19:21:29 2003 @@ -16,6 +16,7 @@ #define CONFIG_BINFMT_ELF 1 #define CONFIG_BINFMT_MISC 1 #define CONFIG_HOSTFS 1 +#define CONFIG_HOSTSOCKET 1 #undef CONFIG_HPPFS #define CONFIG_MCONSOLE 1 #define CONFIG_MAGIC_SYSRQ 1 diff -Nur linux-2.6.0-test11-uml/net/unix/af_unix.c linux-2.6.0-test11-uml2/net/unix/af_unix.c --- linux-2.6.0-test11-uml/net/unix/af_unix.c Mon Nov 24 02:32:13 2003 +++ linux-2.6.0-test11-uml2/net/unix/af_unix.c Mon Mar 1 20:28:05 2004 @@ -686,7 +686,9 @@ * Get the parent directory, calculate the hash for last * component. */ + printk("sunaddr->sun_path: %s\n", sunaddr->sun_path); err = path_lookup(sunaddr->sun_path, LOOKUP_PARENT, &nd); + printk("err: %d\n", err); if (err) goto out_mknod_parent; /* -- unix_sock_driver.patch It also need's a listener on the host-side on /tmp/hostsocket. Here is some sample source code. --- sserver.c #include <errno.h> #include <stddef.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/socket.h> #include <sys/un.h> #define SERVER "/tmp/hostsocket" #define MAXMSG 512 int make_named_socket (const char *filename) { struct sockaddr_un name; int sock; size_t size; /* Create the socket. */ sock = socket (PF_LOCAL, SOCK_DGRAM, 0); if (sock < 0) { perror ("socket"); exit (EXIT_FAILURE); } /* Bind a name to the socket. */ name.sun_family = AF_LOCAL; strncpy (name.sun_path, filename, sizeof (name.sun_path)); size = SUN_LEN (&name); if (bind (sock, (struct sockaddr *) &name, size) < 0) { perror ("bind"); exit (EXIT_FAILURE); } return sock; } int main (void) { int sock; char message[MAXMSG]; struct sockaddr_un name; size_t size; int nbytes; /* Remove the filename first, it's ok if the call fails */ unlink (SERVER); /* Make the socket, then loop endlessly. */ sock = make_named_socket (SERVER); while (1) { /* Wait for a datagram. */ size = sizeof (name); nbytes = recvfrom (sock, message, MAXMSG, 0, (struct sockaddr *) & name, &size); if (nbytes < 0) { perror ("recfrom (server)"); exit (EXIT_FAILURE); } /* Give a diagnostic message. */ fprintf (stderr, "Server: got message: %s\n", message); } } --- sserver.c Most of the above code should probably be edited with rm, but you wanted to have my results so far. Now go and find a brown paper bag. mfg, Patrick "Petschge" Kilian -- Spam ist weniger ein technisches als ein soziales Problem. Die einzigen technischen Mittel, die soziale Probleme halbwegs brauchbar loesen, sind schwere Waffen. Und das auch nur bei wirklich konsequenter Anwendung. -- Alexander Schreiber in dasr ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id\x1356&alloc_id438&opÌk _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [uml-devel] Re: [uml-user] UNIX socket networking 2004-03-02 21:40 ` Patrick Kilian @ 2004-03-07 10:54 ` Patrick "Petschge" Kilian 2004-03-08 21:33 ` Jeff Dike 2004-03-07 11:28 ` BlaisorBlade 1 sibling, 1 reply; 10+ messages in thread From: Patrick "Petschge" Kilian @ 2004-03-07 10:54 UTC (permalink / raw) To: BlaisorBlade, user-mode-linux-devel Hi all, Here is a new version: --- unix_sock_driver.patch diff -Nur linux-2.6.0-test11-uml/.config linux-2.6.0-test11-uml2/.config --- linux-2.6.0-test11-uml/.config Fri Dec 12 17:52:41 2003 +++ linux-2.6.0-test11-uml2/.config Wed Dec 31 19:21:29 2003 @@ -15,6 +15,7 @@ CONFIG_BINFMT_ELF=y CONFIG_BINFMT_MISC=y CONFIG_HOSTFS=y +CONFIG_HOSTSOCKET=y # CONFIG_HPPFS is not set CONFIG_MCONSOLE=y CONFIG_MAGIC_SYSRQ=y diff -Nur linux-2.6.0-test11-uml/arch/um/Kconfig linux-2.6.0-test11-uml2/arch/um/Kconfig --- linux-2.6.0-test11-uml/arch/um/Kconfig Fri Dec 12 17:38:50 2003 +++ linux-2.6.0-test11-uml2/arch/um/Kconfig Wed Dec 31 19:20:39 2003 @@ -99,6 +99,15 @@ If you'd like to be able to work with files stored on the host, say Y or M here; otherwise say N. +config HOSTSOCKET + bool "Hostsocket Support" + default n + depends on EXPERIMENTAL + help + Support for tunneling of unix sockets. Currently very b0rken. + + If unsure say N. + config HPPFS tristate "HoneyPot ProcFS" help diff -Nur linux-2.6.0-test11-uml/arch/um/drivers/Makefile linux-2.6.0-test11-uml2/arch/um/drivers/Makefile --- linux-2.6.0-test11-uml/arch/um/drivers/Makefile Fri Dec 12 17:30:43 2003 +++ linux-2.6.0-test11-uml2/arch/um/drivers/Makefile Tue Mar 2 21:12:59 2004 @@ -1,4 +1,4 @@ -# +# # Copyright (C) 2000, 2002, 2003 Jeff Dike (jdike@karaya.com) # Licensed under the GPL # @@ -16,6 +16,7 @@ net-objs := net_kern.o net_user.o mconsole-objs := mconsole_kern.o mconsole_user.o hostaudio-objs := hostaudio_kern.o hostaudio_user.o +hostsocket-objs := hostsocket_user.o hostsocket_kern.o ubd-objs := ubd_kern.o ubd_user.o port-objs := port_kern.o port_user.o harddog-objs := harddog_kern.o harddog_user.o @@ -30,8 +31,9 @@ obj-$(CONFIG_UML_NET) += net.o obj-$(CONFIG_MCONSOLE) += mconsole.o obj-$(CONFIG_MMAPPER) += mmapper_kern.o obj-$(CONFIG_HOSTAUDIO) += hostaudio.o +obj-$(CONFIG_HOSTSOCKET) += hostsocket.o obj-$(CONFIG_FD_CHAN) += fd.o obj-$(CONFIG_NULL_CHAN) += null.o obj-$(CONFIG_PORT_CHAN) += port.o diff -Nur linux-2.6.0-test11-uml/arch/um/drivers/hostsocket.h linux-2.6.0-test11-uml2/arch/um/drivers/hostsocket.h --- linux-2.6.0-test11-uml/arch/um/drivers/hostsocket.h Thu Jan 1 01:00:00 1970 +++ linux-2.6.0-test11-uml2/arch/um/drivers/hostsocket.h Wed Mar 3 23:20:01 2004 @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2004 Patrick Kilian <petschge@web.de> + * Licensed under the GPL + */ + +// Socket we are talking to at the host side +#define HOSTSOCKET "/tmp/hostsocket" + +// Socket we are talking from at the host side +#define SENDSOCKET "/tmp/sendsocket" + +// Socket we show inside the guest +// #define GUESTSOCKET "/tmp/guestsocket" +// #define GUESTSOCKET "\0guestsocket" +#define GUESTSOCKET "@guestsocket" +// #define GUESTSOCKET "guestsocket" + +#define H_MESSAGE "This is the uml saying hello" +#define B_MESSAGE "This is the uml saying byebye" + +#define DEBUG_HS + +/* host side socket file operations */ +int init_socket_user(void); +void exit_socket_user(void); + +/* package passing functions */ + +/* package is a wrapper araound a unix socket data packet */ +typedef struct { + int len; + unsigned char data[4096]; +} package; + +// All have to be non-blocking +// package must be some wrapper araound a unix socket data packet +package read_from_host(void); +void write_to_host(package p); +package read_from_uml(void); +void write_to_host(package p); + +/* + * Overrides for Emacs so that we follow Linus's tabbing style. + * Emacs will notice this stuff at the end of the file and automatically + * adjust the settings for this buffer only. This must remain at the end + * of the file. + * --------------------------------------------------------------------------- + * Local variables: + * c-file-style: "linux" + * End: + * + */ diff -Nur linux-2.6.0-test11-uml/arch/um/drivers/hostsocket_kern.c linux-2.6.0-test11-uml2/arch/um/drivers/hostsocket_kern.c --- linux-2.6.0-test11-uml/arch/um/drivers/hostsocket_kern.c Thu Jan 1 01:00:00 1970 +++ linux-2.6.0-test11-uml2/arch/um/drivers/hostsocket_kern.c Wed Mar 3 23:19:55 2004 @@ -0,0 +1,175 @@ +/* + * Copyright (C) 2004 Patrick Kilian <petschge@web.de> + * Licensed under the GPL + */ + +#include "hostsocket.h" + +#include "linux/delay.h" +#include "linux/init.h" +#include "linux/module.h" +#include "linux/kernel.h" +#include "linux/sched.h" +#include "linux/signal.h" +#include "linux/types.h" +#include "linux/uio.h" +#include "linux/sched.h" +#include "linux/net.h" +#include "net/sock.h" +#include "linux/un.h" +#include "kern.h" + +int error; + +struct socket *guestsock; + +pid_t socketpid; +int st_kill = 0; + + +package read_from_uml(void) { + // Do not block + int ret = 0; + struct msghdr msg; + struct iovec iov; + mm_segment_t oldfs; + package out; + + msg.msg_name = NULL; // Socket name + msg.msg_namelen = 0; // Length of name + msg.msg_iov = &iov; // Data blocks + msg.msg_iovlen = 1; // Number of blocks + msg.msg_control = NULL; // Per protocol magic + msg.msg_controllen = 0; // Length of cmsg list + msg.msg_flags = MSG_DONTWAIT; // 0 vs MSG_DONTWAIT + + msg.msg_iov->iov_base = &out.data; + msg.msg_iov->iov_len = 4095; + + oldfs = get_fs(); + set_fs(KERNEL_DS); + ret = sock_recvmsg(guestsock, &msg, 4095, MSG_DONTWAIT); + set_fs(oldfs); + + if (ret > 0) { + out.len = ret; + } else { + out.len = 0; + } + return(out); +} + +void write_to_uml(package p) { + int ret = 0; + printk(KERN_INFO "packet.length= %d\n", p.len); + //size_t size = SUN_LEN (&name); + //ret = sendto (guestsock, p.data, p.len, 0, (struct sockaddr *) &name, size); + //static int unix_dgram_sendmsg(struct kiocb *kiocb, struct socket *sock, struct msghdr *msg, int len); + if (ret < 0) { + printk(KERN_INFO "Can't sendto guestsocket socket\n"); + } +} + +// Create the socket in the uml +static int setup_guestsocket(void) { + struct sockaddr_un sun; + + error = sock_create(PF_UNIX, SOCK_DGRAM, 0, &guestsock); + if (error < 0) { + return(error); + } + + sun.sun_family = AF_UNIX; + strncpy (sun.sun_path, GUESTSOCKET, sizeof (GUESTSOCKET)); + strncpy (sun.sun_path, "\0", 1); + error = guestsock->ops->bind(guestsock, (struct sockaddr *)&sun, sizeof(sun)); + if (error<0) { + printk(KERN_INFO "socket thread: can't bind guest socket, error=%d\n", error); + printk(KERN_INFO "ENOENT: %d\n", ENOENT); + } + + return(error); + +} + +static int socketfunc(void *data) { + package p; + + // Set thread name + sprintf(current->comm, "socket thread"); + + /* Startup of the uml side */ + + // Create the socket in the uml + error = setup_guestsocket(); + if (error < 0) { + printk(KERN_INFO "Socket thread: can't create guest socket, error=%d\n", error); + } + + printk(KERN_INFO "Socket thread entering recv loop\n"); + while (1) { + if (st_kill != 0) { + break; + } + + p = read_from_uml(); + if (p.len < 0) { + printk(KERN_INFO "Socket thread recv failed, p.len=%d\n", p.len); + } else if (p.len > 0) { + printk(KERN_INFO "Socket thread got: p.len=%d\n", p.len); + write_to_host(p); + } + + p = read_from_host(); + if (p.len < 0) { + printk(KERN_INFO "Socket thread read_from_host failed, p.len=%d\n", p.len); + } else if (p.len > 0) { + printk(KERN_INFO "Socket thread read_from_host: p.len=%d\n", p.len); + write_to_uml(p); + } + + printk(":"); + current->state = TASK_UNINTERRUPTIBLE; + schedule_timeout(1*HZ); + } + + return(0); +} + +static int init_socket(void) { + + printk(KERN_INFO "Registering Socket Relay...\n"); + /* Startup of the host side */ + init_socket_user(); + + /* Start the kernelthread */ + socketpid = kernel_thread(socketfunc, NULL, 0); + if (socketpid < 0) { + printk(KERN_INFO "Can't start socket thread, socketpid=%d\n", socketpid); + } + + printk(KERN_INFO "Finished Socket Relay\n"); + return(0); +} + +static void exit_socket(void) { + //XXX: Kill order + //kill_proc(socketpid, SIGKILL, 1); + exit_socket_user(); + st_kill=1; +} + +late_initcall(init_socket); +uml_exitcall(exit_socket); + + +/* + * Overrides for Emacs so that we follow Linus's tabbing style. + * Emacs will notice this stuff at the end of the file and automatically + * adjust the settings for this buffer only. This must remain at the end + * of the file. + * --------------------------------------------------------------------------- + * Local variables: + * c-file-style: "linux" + * End: + */ diff -Nur linux-2.6.0-test11-uml/arch/um/drivers/hostsocket_user.c linux-2.6.0-test11-uml2/arch/um/drivers/hostsocket_user.c --- linux-2.6.0-test11-uml/arch/um/drivers/hostsocket_user.c Thu Jan 1 01:00:00 1970 +++ linux-2.6.0-test11-uml2/arch/um/drivers/hostsocket_user.c Wed Mar 3 23:19:59 2004 @@ -0,0 +1,115 @@ +/* + * Copyright (C) 2004 Patrick Kilian <petschge@web.de> + * Licensed under the GPL + */ +#include "hostsocket.h" + +#include <errno.h> +#include <stddef.h> +#include <stdio.h> +#include <stdlib.h> +#include <sys/socket.h> +#include <sys/un.h> +#include <unistd.h> + +struct sockaddr_un name; +size_t size; +int nbytes; +int sendsock; + +/* host side operations */ +package read_from_host(void) { + // Do not block + int ret = 0; + struct msghdr msg; + struct iovec iov; + package out; + + msg.msg_name = NULL; // Socket name + msg.msg_namelen = 0; // Length of name + msg.msg_iov = &iov; // Data blocks + msg.msg_iovlen = 1; // Number of blocks + msg.msg_control = NULL; // Per protocol magic + msg.msg_controllen = 0; // Length of cmsg list + msg.msg_flags = MSG_DONTWAIT; // 0 vs MSG_DONTWAIT + + msg.msg_iov->iov_base = &out.data; + msg.msg_iov->iov_len = 4095; + + ret = recvmsg(sendsock, &msg, MSG_DONTWAIT); + if (ret > 0) { + out.len = ret; + } else { + out.len = 0; + } + return(out); +} + +void write_to_host(package p) { + // Do not block + nbytes = sendto (sendsock, p.data, p.len, 0, (struct sockaddr *) &name, size); + if (nbytes < 0) { + perror("Can't sendto hello to host socket\n"); + } +} + +int init_socket_user(void) { + package hello; + printf("Registering Socket Relay on the Host Side...\n"); + + /* Make the sendsocket. */ + // Remove old sendsocket + unlink(SENDSOCKET); + // Create socket + sendsock = socket (PF_LOCAL, SOCK_DGRAM, 0); + if (sendsock < 0) { + perror("Can't create sending host socket\n"); + exit (-1); + } + // Bind a name to the socket. + name.sun_family = AF_LOCAL; + strncpy (name.sun_path, SENDSOCKET, sizeof (name.sun_path)); + size = SUN_LEN (&name); + if (bind (sendsock, (struct sockaddr *) &name, size) < 0) { + perror("Can't bind sending host socket\n"); + exit (-1); + } + + /* Initialize the server socket address. */ + name.sun_family = AF_LOCAL; + strcpy (name.sun_path, HOSTSOCKET); + size = strlen (name.sun_path) + sizeof (name.sun_family); + + /* Send a hello. */ + hello.len = strlen (H_MESSAGE) + 1; + strcpy (hello.data, H_MESSAGE); + write_to_host(hello); + + printf("Finished host side setup\n"); + return(0); +} + +void exit_socket_user(void) { + package bye; + + /* Send a goodbye */ + bye.len = strlen (B_MESSAGE) + 1; + strcpy (bye.data, B_MESSAGE); + write_to_host(bye); + + /* Remove sendsocket */ + // XXX: Remove order + unlink(SENDSOCKET); + close(sendsock); +} + +/* + * Overrides for Emacs so that we follow Linus's tabbing style. + * Emacs will notice this stuff at the end of the file and automatically + * adjust the settings for this buffer only. This must remain at the end + * of the file. + * --------------------------------------------------------------------------- + * Local variables: + * c-file-style: "linux" + * End: + */ --- unix_sock_driver.patch The listener didn't change. Any comments to the first version of the code? mfg, Patrick "Petschge" Kilian -- The Board views the endemic use of PowerPoint briefing slides instead of technical papers as an illustration of the problematic methods of technical communication at NASA. ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [uml-devel] Re: [uml-user] UNIX socket networking 2004-03-07 10:54 ` Patrick "Petschge" Kilian @ 2004-03-08 21:33 ` Jeff Dike 0 siblings, 0 replies; 10+ messages in thread From: Jeff Dike @ 2004-03-08 21:33 UTC (permalink / raw) To: Patrick "Petschge" Kilian; +Cc: BlaisorBlade, user-mode-linux-devel petschge@web.de said: > Here is a new version: The basic idea of allocating a socket inside UML and binding it to something looks like it should work. I would put the code that handles input from the host side into an interrupt handler rather than the thread, though. Jef ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [uml-devel] Re: [uml-user] UNIX socket networking 2004-03-02 21:40 ` Patrick Kilian 2004-03-07 10:54 ` Patrick "Petschge" Kilian @ 2004-03-07 11:28 ` BlaisorBlade 2004-03-07 11:56 ` Patrick Kilian 1 sibling, 1 reply; 10+ messages in thread From: BlaisorBlade @ 2004-03-07 11:28 UTC (permalink / raw) To: user-mode-linux-devel; +Cc: Patrick Kilian Alle 22:40, martedì 2 marzo 2004, Patrick Kilian ha scritto: > Hi all, > > Am Dienstag, 2. März 2004 19:09 schrieb BlaisorBlade: > >> Well bind is returning -2 which seams to be -ENOENT. Does somebody > >> know why this happens? > > > > Hmm, I'm no expert with sockets; possibly the folder in which you > > create the socket does not exist. However, possibly code it like a > > normal program which just opens the socket and calls bind() and try > > it. > > No the folder exists and is on a rw filesystem. This problem was the reason > why I abandond the the driver the first time. You refer to bind in the guest, right? Well, you call the socket->ops->bind, while you should probably at least call sys_bind. Your kernel thread is simply a process running in kernel mode - so instead of calling bind(), you just call sys_bind() skipping some useless code (int 0x80, userspace/kernelspace transition and so on). But you cannot, in general, skip anything else unless you have a reason to do so. Probably, the same reasoning applies to a lot of other code - why sock_create instead of sys_socket, why sock_recvmsg ... and so on. Please, at least change both sys_socket and sys_bind before asking again. I *do not* understand how ENOENT is actually returned, but probably something that normally fails for a missing file failed for the lack of coherency. > Most of the above code should probably be edited with rm What is that? Indentation cleanup? > , but you > wanted to have my results so far. Now go and find a brown paper bag. No, do not - seeing the code is very useful indeed. Bye -- Paolo Giarrusso, aka Blaisorblade Linux registered user n. 292729 ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&opÌk _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [uml-devel] Re: [uml-user] UNIX socket networking 2004-03-07 11:28 ` BlaisorBlade @ 2004-03-07 11:56 ` Patrick Kilian 2004-03-07 12:12 ` BlaisorBlade 0 siblings, 1 reply; 10+ messages in thread From: Patrick Kilian @ 2004-03-07 11:56 UTC (permalink / raw) To: BlaisorBlade, user-mode-linux-devel Hi all, > You refer to bind in the guest, right? Well, you call the > socket->ops->bind, while you should probably at least call sys_bind. Ok. I'll give it a try. > Your kernel thread is simply a process running in kernel mode - so > instead of calling bind(), you just call sys_bind() skipping some > useless code (int 0x80, userspace/kernelspace transition and so on). > But you cannot, in general, skip anything else unless you have a > reason to do so. I didn't know what the exact difference between bind(), sys_bind() and sockert->ops->bind() was. > Probably, the same reasoning applies to a lot of other code - why > sock_create instead of sys_socket, why sock_recvmsg ... and so on. > Please, at least change both sys_socket and sys_bind before asking > again. Ok the next version will be updated. > I *do not* understand how ENOENT is actually returned, but probably > something that normally fails for a missing file failed for the lack > of coherency. Yeah that could be the reason. >> Most of the above code should probably be edited with rm > What is that? Indentation cleanup? rm as in "man 1 rm". >> , but you wanted to have my results so far. Now go and find a brown >> paper bag. > No, do not - seeing the code is very useful indeed. If you say so... I'll give you sugestions a try and be back in some days with Yet Another Version of my code. mfg, Patrick "Petschge" Kilian ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&opÌk _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [uml-devel] Re: [uml-user] UNIX socket networking 2004-03-07 11:56 ` Patrick Kilian @ 2004-03-07 12:12 ` BlaisorBlade 2004-03-07 13:06 ` [uml-devel] " Patrick Kilian 0 siblings, 1 reply; 10+ messages in thread From: BlaisorBlade @ 2004-03-07 12:12 UTC (permalink / raw) To: petschge; +Cc: user-mode-linux-devel Alle 12:56, domenica 7 marzo 2004, Patrick Kilian ha scritto: > Hi all, > > > You refer to bind in the guest, right? Well, you call the > > socket->ops->bind, while you should probably at least call sys_bind. > > Ok. I'll give it a try. > > > Your kernel thread is simply a process running in kernel mode - so > > instead of calling bind(), you just call sys_bind() skipping some > > useless code (int 0x80, userspace/kernelspace transition and so on). > > But you cannot, in general, skip anything else unless you have a > > reason to do so. > > I didn't know what the exact difference between bind() Note also bind() is likely to be bound to the glibc version, and thus operate on the host. >, sys_bind() and > sockert->ops->bind() was. > > > Probably, the same reasoning applies to a lot of other code - why > > sock_create instead of sys_socket, why sock_recvmsg ... and so on. > > Please, at least change both sys_socket and sys_bind before asking > > again. > > Ok the next version will be updated. > > > I *do not* understand how ENOENT is actually returned, but probably > > something that normally fails for a missing file failed for the lack > > of coherency. > > Yeah that could be the reason. > > >> Most of the above code should probably be edited with rm > > > > What is that? Indentation cleanup? > > rm as in "man 1 rm". Ah, ok :-) I don't agree anyway. > >> , but you wanted to have my results so far. Now go and find a brown > >> paper bag. > > > > No, do not - seeing the code is very useful indeed. > > If you say so... > I'll give you sugestions a try and be back in some days with Yet Another > Version of my code. I've seen it; does it work on your part? I've got a lot less time now for UML, so you must be kind with me. -- Paolo Giarrusso, aka Blaisorblade Linux registered user n. 292729 ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 10+ messages in thread
* [uml-devel] Re: UNIX socket networking 2004-03-07 12:12 ` BlaisorBlade @ 2004-03-07 13:06 ` Patrick Kilian 0 siblings, 0 replies; 10+ messages in thread From: Patrick Kilian @ 2004-03-07 13:06 UTC (permalink / raw) To: BlaisorBlade, user-mode-linux-devel Hi all, Am Sonntag, 7. März 2004 13:12 schrieb BlaisorBlade: >> I didn't know what the exact difference between bind() > Note also bind() is likely to be bound to the glibc version, and thus > operate on the host. I thought so, but I wasn't sure. >>>> Most of the above code should probably be edited with rm >>> What is that? Indentation cleanup? >> rm as in "man 1 rm". > Ah, ok :-) I don't agree anyway. Thanks. >> I'll give you sugestions a try and be back in some days with Yet >> Another Version of my code. > I've seen it; does it work on your part? I've got a lot less time now > for UML, so you must be kind with me. No problem. I'll try sys_* stuff fopr the next few days. mfg, Patrick "Petschge" Kilian -- Ich vergleiche normalerweise auch nicht im Nahverkehr eingesetzte Transrapids mit im Fernverkehr eingesetzten Planierraupen, auch wenn beide Sitze haben (wobei ich, nach kurzen Nachdenken, die Rolle der Planierraupe an Emacs vergeben würde). --Uwe Ohse in d.a.s.r ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&opÌk _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2004-03-08 21:18 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <200402290158.54770.jdizzl@xs4all.nl>
[not found] ` <20040229120513.934193BCB7@home.petschge.de>
[not found] ` <200402291720.12216.blaisorblade_spam@yahoo.it>
2004-02-29 17:13 ` [uml-devel] Re: [uml-user] UNIX socket networking Patrick Kilian
2004-03-01 20:14 ` Patrick "Petschge" Kilian
2004-03-02 18:09 ` BlaisorBlade
2004-03-02 21:40 ` Patrick Kilian
2004-03-07 10:54 ` Patrick "Petschge" Kilian
2004-03-08 21:33 ` Jeff Dike
2004-03-07 11:28 ` BlaisorBlade
2004-03-07 11:56 ` Patrick Kilian
2004-03-07 12:12 ` BlaisorBlade
2004-03-07 13:06 ` [uml-devel] " Patrick Kilian
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.