Alright, I have "fixed" this in the sense that I needed to connect with nectonn_connect to the srerver, rather than using netcat (and linux sockets for that matter). I realise my client/server application has to use the lwip API.
I am now stuck with another problem, as I'm trying to compile the client on linux using the UNIX port from unix/ports/proj/lib, linking the liblwip.so with my application, it creates a new interface (/dev/tap0) with the default IP 192.168.1.1. I am currently stuck with how to dynamically set the IP to that virtual interface it automatically creates. Well, it's not much of a problem, I'm sure following the call stack will get me the solution, I just wanted to call the initial issue "resolved" in the sense that I now somewhat understand what I must do :) Mihai On Sun, Jul 19, 2015 at 6:54 AM, Pîrvu Mihai <[email protected]> wrote: > > Hello, I want to start by saying that I'm really new with the platform > (like 3 days of research), but i stumbled upon a problem i can't fix. I > hope this won't be considered spam :) > > Anyway, my problem is pretty simple probably. I'm trying to access the > daytime server, which is ran default when compiling with lwIP > > I looked inside the source of daytime.c, provitded by Mini OS, and I saw > that the setting up of an IP address is disabled with an "if(0) { ... }" > construct, so I changed that and set my ip to: 10.0.2.10/24 (so it is in > the same network as Dom0) like this: > > .... > start_networking(); > > if (1) { > struct ip_addr ipaddr = { htonl(0x0a00020A) }; //10.0.2.10 > struct ip_addr netmask = { htonl(0xffffff00) }; // 255.255.255.0 > struct ip_addr gw = { 0 }; > networking_set_addr(&ipaddr, &netmask, &gw); > } > .... > > The compiling is fine (though I also have something to say about this, but > in the footer of the mail). > > I start the VM, with xl create domain_config, which looks like this: > kernel = "mini-os.gz" > memory = 32 > name = "Mini-OS" > on_crash = 'destroy' > vif=['xenif'] > > I go into the console, and it all seems fine: > > ..... > mac is 00:16:3e:70:4a:02 > ************************** > [server] IP 0 netmask 0 gateway 0. > [server] TCP/IP bringup begins. > Thread "tcpip_thread": pointer: 0x00000000000ca738, stack: > 0x0000000000220000 > [tcpip_thread] TCP/IP bringup ends. > [server] Network is ready. > [server] Opening connection > [server] Connection at 0000000000042820 > > > This is where I'm lost a little. I try to ping 10.0.2.10 and it works! > > root@ubuntuZen:/home/mihai/xen/extras/mini-os# ping 10.0.2.10 > PING 10.0.2.10 (10.0.2.10) 56(84) bytes of data. > 64 bytes from 10.0.2.10: icmp_seq=1 ttl=255 time=0.546 ms > 64 bytes from 10.0.2.10: icmp_seq=2 ttl=255 time=0.189 ms > 64 bytes from 10.0.2.10: icmp_seq=3 ttl=255 time=0.142 ms > 64 bytes from 10.0.2.10: icmp_seq=4 ttl=255 time=0.247 ms > > But when I try to connect to 10.0.2.10:13 nothing happens. > My netcat just hangs, but it hangs on all ports, not just 13. I have to > ctrl+c it so it dies, so it's not like the connection is rejected. But, on > the console, nothing is printed. I even put a little print code after the > > session = netconn_accept(listener); > > part, so it shows me when that function has returned a "session", thus the > connection is understood, but it never gets there, the function just blocks > and never returns. > > Here's the entire code, if you think I've done something wrong: > http://pastebin.com/riuh5n0w > > I tried to look with nmap, and all ports are closed. > > Sorry if the question is 'stupid', I'm new to both projects (mini os and > lwip) and I'm just trying to learn. > > > Mihai >
_______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users
