Problems with socket()

Александр Домо domo at ...62...
Thu Mar 10 21:55:50 CET 2011


10.03.11 в 11:21 Christian Helmuth в письме писал(а):

> Hi,
>> I'm writing a network application using libc, lwip, libc_lwip, and
>> libc_lwip_nic_dhcp.
>> But when I call socket(SOCK_STREAM), it hangs somewhere in  
>> lwip_socket().
> Maybe, maybe not, your provided rather little information about your
> application scenario. Please send information about the Genode
> platform you use, init configuration, the log messages, and at best
> your source code (snippets). Did you implement a client or server
> application?

Yes, it seems I get dumb when I'm frustrated...
Actually, I hoped it was something obvious, that's why I didn't get to the  
details.
I'm using the latest downloaded package (not svn)
I'm launching nic_drv + myapp (BTW, nic_drv + lwip_httpsrv works fine!)
DHCP & ARP is working, therefore packets are sent fine.
It's a client app, and here are the logs (I managed to turn on debug  
output in lwip):

int main(): --- create local services ---
int main(): --- start init ---
int main(): transferred 79 MB to init
int main(): --- init created, waiting for exit condition ---
[init] unsupported program segment type 0x4
[init] unsupported program segment type 0x4
[init -> myapp] Starting ldso ...
[init -> myapp] Starting application ... environ: b78c6058
[init -> myapp] void init_nic_dhcp(): init_nic_dhcp()
[init -> myapp] Libc::Lwip_plugin::Lwip_plugin(): using the lwIP libc  
plugin
[init -> myapp] netif_set_ipaddr: netif address being changed
[init -> myapp] netif: IP address of interface
[init -> myapp] netif: netmask of interface
[init -> myapp] netif: GW address of interface
[init -> myapp] netif: added interface lo IP addr 127.0.0.1 netmask  
255.255.255.0 gw 127.0.0.1
[init -> myapp] netif: IP address of interface
[init -> myapp] netif: netmask of interface
[init -> myapp] netif: GW address of interface
[init -> myapp] netif: added interface en IP addr 0.0.0.0 netmask 0.0.0.0  
gw 0.0.0.0
[init -> myapp] netif: setting default interface en
[init -> fb_sdl] creating virtual framebuffer for mode 640x480 at ...64...
[init -> fb_sdl] int main(int, char**): fb_ds_cap has port 49236
[init -> nitpicker] framebuffer is 640x480 at ...23...
[init -> myapp] netif_set_ipaddr: netif address being changed
[init -> myapp] netif: IP address of interface en set to 192.168.28.133
[init -> myapp] netif: netmask of interface en set to 255.255.255.0
[init -> myapp] netif: GW address of interface en set to 192.168.28.2
[init -> myapp] void init_libc_lwip(): init_libc_lwip()
[init -> myapp] connection()
[init -> myapp] virtual Libc::File_descriptor*  
Libc::Lwip_plugin::socket(int, int, int): socket()
[init -> myapp] lwip_socket()...
^C

What's interesting, the nic_drv + lwip_httpsrv config pings ok, my config  
doesn't.

Thanks.




More information about the users mailing list