[CUWiN-Dev] HSLSD Not Sending HSLS(9191) Packets
Socrates Socrates
socrates.socrates at gmail.com
Mon Feb 12 07:55:55 CST 2007
Hi Dave
It's me again ;)
Right at the start of running the hslsd (of my Linux port side) I get an
error that it cannot resolve the IP address of the other node (CUWiN box).
Below is the meesage from the debug window.
********************************
root at appletiser:/home/lawrence/work/new_hsls/HSLS/linux/src/hsls# ./run-hsls
20070212105713 hsls_server_create: created server 0x808e824
20070212105713 main: event(3) initialized
20070212105713 beacon_rx_socket: bound 0.0.0.0 port 9191
20070212105713 beacon_tx_socket: bound 169.254.237.50 port 9191
20070212105713 LSU first global in 3.000000s
20070212105713 hsls_server_start: bound 127.0.0.1 9292
20070212105713 hsls_router_start: start
20070212105713 RX 220B iface 2 src 169.254.237.110 dst 224.0.0.2
hsls_interface_recv: cannot resolve source 169.254.237.110
20070212105713 hsls_interface_recv: cannot resolve source 169.254.237.110
************************************
I traced the problem to function hsls_interface_peer_by_srcaddr() in file
hsls_interface.c. This function returns NULL because slh_first=0x0,
(slh_first from SLIST_FOREACH).
My questions are:
What does slh_first=0x0 mean?
At what stage was it supposed to be assigned with an appropriate value?
I'll appreciate your help.
Kind regards
Lawrence
On 1/16/07, David Young <dyoung at pobox.com> wrote:
>
> On Mon, Jan 15, 2007 at 03:42:22PM +0200, Socrates Socrates wrote:
> > Hi Matthew, David
> >
> > At last, well problem solved.
> > The problem was that function beacon_rx_socket()in ssrx/ssrv.c. bound
> > address 0.0.0.0 to port 9191. However, the was no prior call to
> setsockopt()
> > with *SO_REUSEADDR.*
> > So beacon_tx_socket() failed to bind and somehow it was using the
> > "arbitrary" port, instead of 9191, to which my Linux HSLSD was sending
> it's
> > packets. So all I did was to call setsocketopt with the SO_REUSEADDR
> option
> > and it works fine. Well at least that's how I solved the problem.
>
> Lawrence,
>
> I do not understand how hslsd escaped printing at least one error message
> if it failed to bind the desired address and port. For example, it
> should have printed in beacon_tx_socket():
>
> /* Bind any address on the interface named by ifindex. */
>
> if (bind(s, lintfree_const_cast(struct sockaddr *)srcaddr_in,
> sockaddr_in_getlen(srcaddr_in)) == -1) {
> loglib_warn("%s: bind", __func__);
> goto post_sock_err;
> }
>
> and in hsls_interface_create():
>
> else if ((hi->hi_tx_sock = hsls_af_iftx_socket(ha,
> im->im_srcaddr, im->im_ifindex)) == -1) {
> loglib_warn("%s: hsls_af_iftx_socket", __func__);
> goto post_srcaddr_err;
>
> For the sake of your development, it is really important for the warnings
> to appear. hslsd may conceal bugs from you, if it does not print the
> warnings it is supposed to.
>
> > One last (I hope) question. How do I tell hsls to advertize my lan
> address?
> > My laptop has eth1(wireless) address 169.254.237.50 and Lan eth0 address
> > 192.168.12.1.
>
> My ethernet has address 10.168.112.254. I tell hslsd to advertise it
> like this:
>
> -f inet -t stub -i sip0 -p 10.168.112.254/24
>
> You will need to change the interface name, address, and mask length.
>
> Dave
>
> --
> David Young OJC Technologies
> dyoung at ojctech.com Urbana, IL * (217) 278-3933
> _______________________________________________
> CU-Wireless-Dev mailing list
> CU-Wireless-Dev at lists.cuwireless.net
> http://lists.chambana.net/cgi-bin/listinfo/cu-wireless-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.chambana.net/mailman/archive/cu-wireless-dev/attachments/20070212/93c3ae2d/attachment.htm
More information about the CU-Wireless-Dev
mailing list