[olsr-dev] Newbie question
Andreas Tønnesen
(spam-protected)
Wed Oct 13 18:41:37 CEST 2004
Hi,
> 1) At startup, where is the code that creates the socket (the
> first one) to be used in the listen_loop ?
Sokets are registered at runtime using the function:
void add_olsr_socket(int fd, void(*pf)(int))
in socket_parser.c
The OLSR sockets(UDP/698) are registered one pr. interface. Check out
the linux interface config in src/linux/ifnet.c to see where the sockets
are created and added to the parser.
>
> 2) Where is the body of the functions declared in some header
> file (for example the body of chk_if_up() in ifnet.h)?
>
From ifnet.h:
/* Network interface configuration interface.
* Platform independent - the implementations
* reside in OS/ifnet.c(e.g. linux/ifnet.c)
*/
I don't think that needs any further explanation ;-)
(you might have an earlier version where that comment is not added)
-andreas
--
Andreas Tønnesen
http://www.olsr.org
More information about the Olsr-dev
mailing list