#121437 - qw3rty - Mon Mar 12, 2007 1:53 pm
Hi,
I recently updated to the newest wifi-lib (CVS), adn now my app doesn't connect to IP's that aren't in the NDS's subnet.
I use the UDP-socket code of wifi-lib-test 0.3a as base for my app.
This is how I open the socket :
This is how I send :
If destip is not within the own subnet, the NDS does send NOTHING (not even an ARP-request)
P.S: I also tried wifi-lib-test 0.3a compiled with the newset dswifi-lib (and of course adapted to work again - close --> closesocket) with the same results. Not a packet sent out, if it's in a different subnet :(
P.P.S. : TCP-connections can't connect to the outside either.(tried with wifi-lib-test, compiled with the cvs-lib)
P.P.P.S : I compiled it wih wifi-lib 0.3c, and it works again :O
I recently updated to the newest wifi-lib (CVS), adn now my app doesn't connect to IP's that aren't in the NDS's subnet.
I use the UDP-socket code of wifi-lib-test 0.3a as base for my app.
This is how I open the socket :
Code: |
sock=socket(AF_INET,SOCK_DGRAM,0); sa_incoming.sin_family=AF_INET; sa_incoming.sin_port=htons(portnum_game); sa_incoming.sin_addr.s_addr=INADDR_ANY; if (bind(sock,(struct sockaddr *) &sa_incoming,sizeof(sa_incoming)) == -1) { closesocket(sock); return -1; } ioctl(sock,FIONBIO,&i); |
This is how I send :
Code: |
sa_outgoing.sin_family=AF_INET; sa_outgoing.sin_port=htons(portnum); sa_outgoing.sin_addr.s_addr=destip; //send packet num_bytes_sent = sendto(sock,((u8*)buffer,buffer_len,0,(struct sockaddr *)&sa_outgoing,sizeof(sa_outgoing)); |
If destip is not within the own subnet, the NDS does send NOTHING (not even an ARP-request)
P.S: I also tried wifi-lib-test 0.3a compiled with the newset dswifi-lib (and of course adapted to work again - close --> closesocket) with the same results. Not a packet sent out, if it's in a different subnet :(
P.P.S. : TCP-connections can't connect to the outside either.(tried with wifi-lib-test, compiled with the cvs-lib)
P.P.P.S : I compiled it wih wifi-lib 0.3c, and it works again :O