From: Amartyo B. <ama...@ya...> - 2003-03-20 11:07:34
|
When I tried to modify the ethertap module following the instructions in the README file, I got the following error message, which I have also posted on the Sourceforge Basilisk Help forum, --------------------------------------------------------- gcc -D__KERNEL__ -I/usr/src/linux-2.4.19-16mdk/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i586 -DMODULE -DMODVERSIONS -include /usr/src/linux-2.4.19-16mdk/include/linux/modversions.h -nostdinc -I /usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2/include -DKBUILD_BASENAME=ethertap -c -o ethertap.o ethertap.c ethertap.c: In function `set_multicast_list': ethertap.c:160: request for member `groups' in something not a structure or union make[2]: *** [ethertap.o] Error 1 make[2]: Leaving directory `/usr/src/linux-2.4.19-16mdk/drivers/net' make[1]: *** [_modsubdir_net] Error 2 make[1]: Leaving directory `/usr/src/linux-2.4.19-16mdk/drivers' make: *** [_mod_drivers] Error 2 ------------------------------------------------------- After looking at the source for ethertap.c and other kernel source, I made some changes and now the ethertap module compiles when CONFIG_ETHERTAP_MC is set. Change to the directory above the kernel source directory, eg '/usr/src' and apply the patch with options -Np0 ------------------------------------------------------- diff -Naur linux-2.4.19-24mdk/drivers/net/ethertap.c linux-2.4.19-24mdk-changed/drivers/net/ethertap.c --- linux-2.4.19-24mdk/drivers/net/ethertap.c 2001-09-30 19:26:06.000000000 +0000 +++ linux-2.4.19-24mdk-changed/drivers/net/ethertap.c 2003-03-19 16:33:02.000000000 +0000 @@ -29,6 +29,7 @@ #include <net/sock.h> #include <linux/netlink.h> +#define CONFIG_ETHERTAP_MC 1 /* * Index to functions. */ @@ -101,7 +102,7 @@ ether_setup(dev); dev->tx_queue_len = 0; - dev->flags|=IFF_NOARP; +/* dev->flags|=IFF_NOARP;*/ tap_map[dev->base_addr]=dev; return 0; @@ -156,7 +157,7 @@ } lp->groups = groups; if (lp->nl) - lp->nl->protinfo.af_netlink.groups = groups; + lp->nl->protinfo.af_netlink->groups = groups; } #endif diff -Naur linux-2.4.19-24mdk/include/net/af_netlink.h linux-2.4.19-24mdk-changed/include/net/af_netlink.h --- linux-2.4.19-24mdk/include/net/af_netlink.h 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.19-24mdk-changed/include/net/af_netlink.h 2003-03-19 16:33:02.000000000 +0000 @@ -0,0 +1,17 @@ +#ifndef _AF_NETLINK_H +#define _AF_NETLINK_H +struct netlink_opt +{ + u32 pid; + unsigned groups; + u32 dst_pid; + unsigned dst_groups; + unsigned long state; + int (*handler)(int unit, struct sk_buff *skb); + wait_queue_head_t wait; + struct netlink_callback *cb; + spinlock_t cb_lock; + void (*data_ready)(struct sock *sk, int bytes); +}; +#endif + diff -Naur linux-2.4.19-24mdk/include/net/sock.h linux-2.4.19-24mdk-changed/include/net/sock.h --- linux-2.4.19-24mdk/include/net/sock.h 2003-01-30 20:14:18.000000000 +0000 +++ linux-2.4.19-24mdk-changed/include/net/sock.h 2003-03-19 16:33:02.000000000 +0000 @@ -106,6 +106,7 @@ #include <asm/atomic.h> #include <net/dst.h> +#include <net/af_netlink.h> /* The AF_UNIX specific socket options */ struct unix_opt { diff -Naur linux-2.4.19-24mdk/net/netlink/af_netlink.c linux-2.4.19-24mdk-changed/net/netlink/af_netlink.c --- linux-2.4.19-24mdk/net/netlink/af_netlink.c 2002-02-25 19:38:14.000000000 +0000 +++ linux-2.4.19-24mdk-changed/net/netlink/af_netlink.c 2003-03-19 16:33:02.000000000 +0000 @@ -41,6 +41,7 @@ #include <linux/smp_lock.h> #include <net/sock.h> #include <net/scm.h> +#include <net/af_netlink.h> #define Nprintk(a...) @@ -48,19 +49,6 @@ #define NL_EMULATE_DEV #endif -struct netlink_opt -{ - u32 pid; - unsigned groups; - u32 dst_pid; - unsigned dst_groups; - unsigned long state; - int (*handler)(int unit, struct sk_buff *skb); - wait_queue_head_t wait; - struct netlink_callback *cb; - spinlock_t cb_lock; - void (*data_ready)(struct sock *sk, int bytes); -}; static struct sock *nl_table[MAX_LINKS]; static DECLARE_WAIT_QUEUE_HEAD(nl_table_wait); ------------------------------------------------------- Also, I read in the kernel documentation that the ethertap module is obsolete and will go away soon and to start using the tuntap module. Is Basilisk going to be using the tuntap module in the future ? __________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com |