multicast problem

lji@cs.umd.edu
Wed, 16 Dec 1998 23:04:52 -0500 (EST)


Greetings!

i am a new comer. now i am just in deep mud and looking for help
desperately. any help is greatly appreciated.

i am trying to make a linux 2.1.95 box run as a multicast router.
i have reconfigued the kernel with "IP multicast routing", "IP
tunneling", and "IP multicasting" enabled. however, when i run
the following testing program, it just seems that the "IP
multicasting" is not enabled at all because i can not even do
getsockopt for MRT_VERSION.

here is the program:

...
if ((igmpSocket = socket(AF_INET, SOCK_RAW, IPPROTO_IGMP) ) < 0) {
perror("cann't open igmp socket");
exit(-1);
}
if ((udpSocket = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
perror("cann't open udp socket");
...
if (getsockopt(igmpSocket, IPPROTO_IP, MRT_VERSION,
&v, &len) < 0)
perror("getsockopt: MRT_VERSION");
if (getsockopt(udpSocket, IPPROTO_IP, MRT_VERSION,
&v, &len) < 0)
perror("getsockopt: MRT_VERSION");
...

both getsockopt calls give me "Protocol not available" error.
from the code, it looks like i should at least get an EACCES
error for using a wrong socket (udpSocket). the only
explaination i have is that the CONFIG_IP_MROUTE was not set
when i compiled the kernel so the call to ip_mroute_get_sockopt
is excluded.

but it was.

also I noticed that when i was making the zImage, the gcc
line for compiling ip_sockglue.c had only three -D flags,
-D__KERNEL__, -DCPU=586, and -D__SMP__.

what is the problem? is that any configuration option that will
reset the CONFIG_IP_MROUTE flag? or it is something else?

many thanks in advance.

lu.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/