Hi Hans-Peter,

I've checked it again, and I think I've found and removed some unclean dependencies between the user mode tools and kernel headers. This may have caused your troubles. Please, give it a try and tell me if it works.

In any case, compiling against kernel headers should be avoided for user mode programs.

Jan
--- rtnet/include/rtnet_chrdev.h        2004-01-13 17:41:03.000000000 +0100
+++ rtnet.new/include/rtnet_chrdev.h    2004-01-22 10:58:18.000000000 +0100
@@ -23,15 +23,14 @@
 #ifndef __RTNET_CHRDEV_H_
 #define __RTNET_CHRDEV_H_
 
-#include <linux/ioctl.h>
-#include <linux/netdevice.h>
-#include <linux/types.h>
-
-
 #ifdef __KERNEL__
 
 #include <linux/list.h>
 #include <linux/init.h>
+#include <linux/ioctl.h>
+#include <linux/netdevice.h>
+#include <linux/types.h>
+
 
 struct rtnet_device;
 
@@ -54,6 +53,11 @@
 extern int __init rtnet_chrdev_init(void);
 extern void rtnet_chrdev_release(void);
 
+#else   /* ifndef __KERNEL__ */
+
+#include <net/if.h>             /* IFNAMSIZ */
+#include <linux/types.h>
+
 #endif  /* __KERNEL__ */
 
 
--- rtnet/include/rtcfg.h       2004-01-05 16:04:09.000000000 +0100
+++ rtnet.new/include/rtcfg.h   2004-01-22 11:24:01.000000000 +0100
@@ -28,6 +28,8 @@
 #include <rtnet_chrdev.h>
 
 
+#define MAC_ADDR_LEN            32  /* avoids inconsistent MAX_ADDR_LEN */
+
 #define NEED_STAGE1_FILE        1
 #define NEED_STAGE2_FILE        2
 
@@ -77,7 +79,7 @@
             struct rtcfg_file stage1_file;
             struct rtcfg_file stage2_file;
             __u32             ip_addr;
-            __u8              mac_addr[MAX_ADDR_LEN];
+            __u8              mac_addr[MAC_ADDR_LEN];
 
             /* internal usage only */
             struct rtcfg_connection *conn_buf;
@@ -85,7 +87,7 @@
 
         struct {
             __u32 ip_addr;
-            __u8  mac_addr[MAX_ADDR_LEN];
+            __u8  mac_addr[MAC_ADDR_LEN];
 
             /* internal usage only */
             struct rtcfg_connection *conn_buf;
--- rtnet/tools/rtifconfig.c    2004-01-02 22:27:46.000000000 +0100
+++ rtnet.new/tools/rtifconfig.c        2004-01-22 11:24:28.000000000 +0100
@@ -24,11 +24,12 @@
 
 #include <stdio.h>
 #include <errno.h>
+#include <fcntl.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/ioctl.h>
-#include <fcntl.h>
 #include <sys/socket.h>
+#include <net/ethernet.h>
 #include <netinet/in.h>
 
 #include <rtnet_chrdev.h>
--- rtnet/tools/rtcfg.c 2004-01-05 15:57:11.000000000 +0100
+++ rtnet.new/tools/rtcfg.c     2004-01-22 11:20:36.000000000 +0100
@@ -28,9 +28,9 @@
 #include <sys/stat.h>
 #include <sys/ioctl.h>
 #include <sys/socket.h>
-#include <linux/netdevice.h>
-#include <netinet/ether.h>
+#include <net/if.h>
 #include <netinet/in.h>
+#include <netinet/ether.h>
 
 #include <rtnet_chrdev.h>
 #include <rtcfg.h>

Reply via email to