netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PATCH] NET: Fixes for net-2.6.19
@ 2006-09-18 15:08 YOSHIFUJI Hideaki / 吉藤英明
  2006-09-18 18:57 ` Thomas Graf
  2006-09-28  5:44 ` David Miller
  0 siblings, 2 replies; 15+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2006-09-18 15:08 UTC (permalink / raw)
  To: davem; +Cc: netdev, yoshfuji, usagi-core

Hello.

Please pull the following changesets available at:
	git://git.skbuff.net/gitroot/yoshfuji/net-2.6.19-20060918-net/

HEADLINES
---------

    [XFRM]: Do not add a state whose SPI is zero to the SPI hash.
    [NET]: Move netlink interface bits to linux/if_link.h.
    [NET]: Include linux/if_link.h directly from the source file.
    [NET]: Include new rtnetlink headers for userspace backward compatibility.
    [NET]: Put {IFLA,IFA,NDA,NDTA}_{RTA,PAYLOAD}() macro back.
    [NET] KBUILD: Add missing entries for new net headers.

DIFFSTAT
--------

 include/linux/Kbuild      |   10 ++-
 include/linux/if.h        |  130 ------------------------------------------
 include/linux/if_addr.h   |    3 +
 include/linux/if_link.h   |  139 +++++++++++++++++++++++++++++++++++++++++++++
 include/linux/neighbour.h |    7 ++
 include/linux/rtnetlink.h |    7 ++
 net/bridge/br_netlink.c   |    1 
 net/core/rtnetlink.c      |    1 
 net/core/wireless.c       |    1 
 net/ipv6/addrconf.c       |    1 
 net/xfrm/xfrm_state.c     |   11 ++--
 11 files changed, 172 insertions(+), 139 deletions(-)

CHANGESETS
----------

commit 04b3eac83cccb7da663bd11a2b569f197bb3170e
Author: Masahide NAKAMURA <nakam@linux-ipv6.org>
Date:   Sun Sep 17 13:54:53 2006 +0900

    [XFRM]: Do not add a state whose SPI is zero to the SPI hash.
    
    SPI=0 is used for acquired IPsec SA and MIPv6 RO state.
    Such state should not be added to the SPI hash
    because we do not care about it on deleting path.
    
    Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
    Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>

diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index 9f63edd..5f4a50e 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -96,9 +96,12 @@ static void xfrm_hash_transfer(struct hl
 				    nhashmask);
 		hlist_add_head(&x->bysrc, nsrctable+h);
 
-		h = __xfrm_spi_hash(&x->id.daddr, x->id.spi, x->id.proto,
-				    x->props.family, nhashmask);
-		hlist_add_head(&x->byspi, nspitable+h);
+		if (x->id.spi) {
+			h = __xfrm_spi_hash(&x->id.daddr, x->id.spi,
+					    x->id.proto, x->props.family,
+					    nhashmask);
+			hlist_add_head(&x->byspi, nspitable+h);
+		}
 	}
 }
 
@@ -622,7 +625,7 @@ static void __xfrm_state_insert(struct x
 	h = xfrm_src_hash(&x->props.saddr, x->props.family);
 	hlist_add_head(&x->bysrc, xfrm_state_bysrc+h);
 
-	if (xfrm_id_proto_match(x->id.proto, IPSEC_PROTO_ANY)) {
+	if (x->id.spi) {
 		h = xfrm_spi_hash(&x->id.daddr, x->id.spi, x->id.proto,
 				  x->props.family);
 

---
commit 44ad787528719604896754d1d05895d2dcfff88b
Author: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Date:   Sun Sep 17 13:54:55 2006 +0900

    [NET]: Move netlink interface bits to linux/if_link.h.
    
    Moving netlink interface bits to linux/if.h is rather troublesome for
    applications including both linux/if.h (which was changed to be included
    from linux/rtnetlink.h automatically) and net/if.h.
    
    Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>

diff --git a/include/linux/if.h b/include/linux/if.h
index cd080d7..ab85ed0 100644
--- a/include/linux/if.h
+++ b/include/linux/if.h
@@ -212,134 +212,4 @@ struct ifconf 
 #define	ifc_buf	ifc_ifcu.ifcu_buf		/* buffer address	*/
 #define	ifc_req	ifc_ifcu.ifcu_req		/* array of structures	*/
 
-/* The struct should be in sync with struct net_device_stats */
-struct rtnl_link_stats
-{
-	__u32	rx_packets;		/* total packets received	*/
-	__u32	tx_packets;		/* total packets transmitted	*/
-	__u32	rx_bytes;		/* total bytes received 	*/
-	__u32	tx_bytes;		/* total bytes transmitted	*/
-	__u32	rx_errors;		/* bad packets received		*/
-	__u32	tx_errors;		/* packet transmit problems	*/
-	__u32	rx_dropped;		/* no space in linux buffers	*/
-	__u32	tx_dropped;		/* no space available in linux	*/
-	__u32	multicast;		/* multicast packets received	*/
-	__u32	collisions;
-
-	/* detailed rx_errors: */
-	__u32	rx_length_errors;
-	__u32	rx_over_errors;		/* receiver ring buff overflow	*/
-	__u32	rx_crc_errors;		/* recved pkt with crc error	*/
-	__u32	rx_frame_errors;	/* recv'd frame alignment error */
-	__u32	rx_fifo_errors;		/* recv'r fifo overrun		*/
-	__u32	rx_missed_errors;	/* receiver missed packet	*/
-
-	/* detailed tx_errors */
-	__u32	tx_aborted_errors;
-	__u32	tx_carrier_errors;
-	__u32	tx_fifo_errors;
-	__u32	tx_heartbeat_errors;
-	__u32	tx_window_errors;
-
-	/* for cslip etc */
-	__u32	rx_compressed;
-	__u32	tx_compressed;
-};
-
-/* The struct should be in sync with struct ifmap */
-struct rtnl_link_ifmap
-{
-	__u64	mem_start;
-	__u64	mem_end;
-	__u64	base_addr;
-	__u16	irq;
-	__u8	dma;
-	__u8	port;
-};
-
-enum
-{
-	IFLA_UNSPEC,
-	IFLA_ADDRESS,
-	IFLA_BROADCAST,
-	IFLA_IFNAME,
-	IFLA_MTU,
-	IFLA_LINK,
-	IFLA_QDISC,
-	IFLA_STATS,
-	IFLA_COST,
-#define IFLA_COST IFLA_COST
-	IFLA_PRIORITY,
-#define IFLA_PRIORITY IFLA_PRIORITY
-	IFLA_MASTER,
-#define IFLA_MASTER IFLA_MASTER
-	IFLA_WIRELESS,		/* Wireless Extension event - see wireless.h */
-#define IFLA_WIRELESS IFLA_WIRELESS
-	IFLA_PROTINFO,		/* Protocol specific information for a link */
-#define IFLA_PROTINFO IFLA_PROTINFO
-	IFLA_TXQLEN,
-#define IFLA_TXQLEN IFLA_TXQLEN
-	IFLA_MAP,
-#define IFLA_MAP IFLA_MAP
-	IFLA_WEIGHT,
-#define IFLA_WEIGHT IFLA_WEIGHT
-	IFLA_OPERSTATE,
-	IFLA_LINKMODE,
-	__IFLA_MAX
-};
-
-
-#define IFLA_MAX (__IFLA_MAX - 1)
-
-/* ifi_flags.
-
-   IFF_* flags.
-
-   The only change is:
-   IFF_LOOPBACK, IFF_BROADCAST and IFF_POINTOPOINT are
-   more not changeable by user. They describe link media
-   characteristics and set by device driver.
-
-   Comments:
-   - Combination IFF_BROADCAST|IFF_POINTOPOINT is invalid
-   - If neither of these three flags are set;
-     the interface is NBMA.
-
-   - IFF_MULTICAST does not mean anything special:
-   multicasts can be used on all not-NBMA links.
-   IFF_MULTICAST means that this media uses special encapsulation
-   for multicast frames. Apparently, all IFF_POINTOPOINT and
-   IFF_BROADCAST devices are able to use multicasts too.
- */
-
-/* IFLA_LINK.
-   For usual devices it is equal ifi_index.
-   If it is a "virtual interface" (f.e. tunnel), ifi_link
-   can point to real physical interface (f.e. for bandwidth calculations),
-   or maybe 0, what means, that real media is unknown (usual
-   for IPIP tunnels, when route to endpoint is allowed to change)
- */
-
-/* Subtype attributes for IFLA_PROTINFO */
-enum
-{
-	IFLA_INET6_UNSPEC,
-	IFLA_INET6_FLAGS,	/* link flags			*/
-	IFLA_INET6_CONF,	/* sysctl parameters		*/
-	IFLA_INET6_STATS,	/* statistics			*/
-	IFLA_INET6_MCAST,	/* MC things. What of them?	*/
-	IFLA_INET6_CACHEINFO,	/* time values and max reasm size */
-	__IFLA_INET6_MAX
-};
-
-#define IFLA_INET6_MAX	(__IFLA_INET6_MAX - 1)
-
-struct ifla_cacheinfo
-{
-	__u32	max_reasm_len;
-	__u32	tstamp;		/* ipv6InterfaceTable updated timestamp */
-	__u32	reachable_time;
-	__u32	retrans_time;
-};
-
 #endif /* _LINUX_IF_H */
diff --git a/include/linux/if_link.h b/include/linux/if_link.h
new file mode 100644
index 0000000..e963a07
--- /dev/null
+++ b/include/linux/if_link.h
@@ -0,0 +1,136 @@
+#ifndef _LINUX_IF_LINK_H
+#define _LINUX_IF_LINK_H
+
+#include <linux/netlink.h>
+
+/* The struct should be in sync with struct net_device_stats */
+struct rtnl_link_stats
+{
+	__u32	rx_packets;		/* total packets received	*/
+	__u32	tx_packets;		/* total packets transmitted	*/
+	__u32	rx_bytes;		/* total bytes received 	*/
+	__u32	tx_bytes;		/* total bytes transmitted	*/
+	__u32	rx_errors;		/* bad packets received		*/
+	__u32	tx_errors;		/* packet transmit problems	*/
+	__u32	rx_dropped;		/* no space in linux buffers	*/
+	__u32	tx_dropped;		/* no space available in linux	*/
+	__u32	multicast;		/* multicast packets received	*/
+	__u32	collisions;
+
+	/* detailed rx_errors: */
+	__u32	rx_length_errors;
+	__u32	rx_over_errors;		/* receiver ring buff overflow	*/
+	__u32	rx_crc_errors;		/* recved pkt with crc error	*/
+	__u32	rx_frame_errors;	/* recv'd frame alignment error */
+	__u32	rx_fifo_errors;		/* recv'r fifo overrun		*/
+	__u32	rx_missed_errors;	/* receiver missed packet	*/
+
+	/* detailed tx_errors */
+	__u32	tx_aborted_errors;
+	__u32	tx_carrier_errors;
+	__u32	tx_fifo_errors;
+	__u32	tx_heartbeat_errors;
+	__u32	tx_window_errors;
+
+	/* for cslip etc */
+	__u32	rx_compressed;
+	__u32	tx_compressed;
+};
+
+/* The struct should be in sync with struct ifmap */
+struct rtnl_link_ifmap
+{
+	__u64	mem_start;
+	__u64	mem_end;
+	__u64	base_addr;
+	__u16	irq;
+	__u8	dma;
+	__u8	port;
+};
+
+enum
+{
+	IFLA_UNSPEC,
+	IFLA_ADDRESS,
+	IFLA_BROADCAST,
+	IFLA_IFNAME,
+	IFLA_MTU,
+	IFLA_LINK,
+	IFLA_QDISC,
+	IFLA_STATS,
+	IFLA_COST,
+#define IFLA_COST IFLA_COST
+	IFLA_PRIORITY,
+#define IFLA_PRIORITY IFLA_PRIORITY
+	IFLA_MASTER,
+#define IFLA_MASTER IFLA_MASTER
+	IFLA_WIRELESS,		/* Wireless Extension event - see wireless.h */
+#define IFLA_WIRELESS IFLA_WIRELESS
+	IFLA_PROTINFO,		/* Protocol specific information for a link */
+#define IFLA_PROTINFO IFLA_PROTINFO
+	IFLA_TXQLEN,
+#define IFLA_TXQLEN IFLA_TXQLEN
+	IFLA_MAP,
+#define IFLA_MAP IFLA_MAP
+	IFLA_WEIGHT,
+#define IFLA_WEIGHT IFLA_WEIGHT
+	IFLA_OPERSTATE,
+	IFLA_LINKMODE,
+	__IFLA_MAX
+};
+
+
+#define IFLA_MAX (__IFLA_MAX - 1)
+
+/* ifi_flags.
+
+   IFF_* flags.
+
+   The only change is:
+   IFF_LOOPBACK, IFF_BROADCAST and IFF_POINTOPOINT are
+   more not changeable by user. They describe link media
+   characteristics and set by device driver.
+
+   Comments:
+   - Combination IFF_BROADCAST|IFF_POINTOPOINT is invalid
+   - If neither of these three flags are set;
+     the interface is NBMA.
+
+   - IFF_MULTICAST does not mean anything special:
+   multicasts can be used on all not-NBMA links.
+   IFF_MULTICAST means that this media uses special encapsulation
+   for multicast frames. Apparently, all IFF_POINTOPOINT and
+   IFF_BROADCAST devices are able to use multicasts too.
+ */
+
+/* IFLA_LINK.
+   For usual devices it is equal ifi_index.
+   If it is a "virtual interface" (f.e. tunnel), ifi_link
+   can point to real physical interface (f.e. for bandwidth calculations),
+   or maybe 0, what means, that real media is unknown (usual
+   for IPIP tunnels, when route to endpoint is allowed to change)
+ */
+
+/* Subtype attributes for IFLA_PROTINFO */
+enum
+{
+	IFLA_INET6_UNSPEC,
+	IFLA_INET6_FLAGS,	/* link flags			*/
+	IFLA_INET6_CONF,	/* sysctl parameters		*/
+	IFLA_INET6_STATS,	/* statistics			*/
+	IFLA_INET6_MCAST,	/* MC things. What of them?	*/
+	IFLA_INET6_CACHEINFO,	/* time values and max reasm size */
+	__IFLA_INET6_MAX
+};
+
+#define IFLA_INET6_MAX	(__IFLA_INET6_MAX - 1)
+
+struct ifla_cacheinfo
+{
+	__u32	max_reasm_len;
+	__u32	tstamp;		/* ipv6InterfaceTable updated timestamp */
+	__u32	reachable_time;
+	__u32	retrans_time;
+};
+
+#endif /* _LINUX_IF_LINK_H */
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index 9c92dc8..3a18add 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -2,7 +2,7 @@ #ifndef __LINUX_RTNETLINK_H
 #define __LINUX_RTNETLINK_H
 
 #include <linux/netlink.h>
-#include <linux/if.h>
+#include <linux/if_link.h>
 
 /****
  *		Routing/neighbour discovery messages.

---
commit 41515f19f24841876c5e82eef940cf18f3c82455
Author: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Date:   Sun Sep 17 13:54:58 2006 +0900

    [NET]: Include linux/if_link.h directly from the source file.
    
    For consistent use of other netlink bits, include new
    linux/if_link.h directly from the source file, not through
    linux/rtnetlink.h.
    
    Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>

diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c
index 8f66119..f55c8d3 100644
--- a/net/bridge/br_netlink.c
+++ b/net/bridge/br_netlink.c
@@ -12,6 +12,7 @@
 
 #include <linux/kernel.h>
 #include <linux/rtnetlink.h>
+#include <linux/if_link.h>
 #include <net/netlink.h>
 #include "br_private.h"
 
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index d8e25e0..9969cfd 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -35,6 +35,7 @@ #include <linux/skbuff.h>
 #include <linux/init.h>
 #include <linux/security.h>
 #include <linux/mutex.h>
+#include <linux/if_link.h>
 #include <linux/if_addr.h>
 
 #include <asm/uaccess.h>
diff --git a/net/core/wireless.c b/net/core/wireless.c
index 3168fca..3be6457 100644
--- a/net/core/wireless.c
+++ b/net/core/wireless.c
@@ -79,6 +79,7 @@ #include <linux/proc_fs.h>
 #include <linux/rtnetlink.h>		/* rtnetlink stuff */
 #include <linux/seq_file.h>
 #include <linux/init.h>			/* for __init */
+#include <linux/if_link.h>		/* IFLA_WIRELESS */
 #include <linux/if_arp.h>		/* ARPHRD_ETHER */
 #include <linux/etherdevice.h>		/* compare_ether_addr */
 #include <linux/interrupt.h>
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index fc9cff3..5cf5253 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -48,6 +48,7 @@ #include <linux/sched.h>
 #include <linux/net.h>
 #include <linux/in6.h>
 #include <linux/netdevice.h>
+#include <linux/if_link.h>
 #include <linux/if_addr.h>
 #include <linux/if_arp.h>
 #include <linux/if_arcnet.h>

---
commit c9b734ff1d4ec9f264d7157d343a90240a188aae
Author: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Date:   Sun Sep 17 13:55:00 2006 +0900

    [NET]: Include new rtnetlink headers for userspace backward compatibility.
    
    Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>

diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index 3a18add..8ec375c 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -2,7 +2,12 @@ #ifndef __LINUX_RTNETLINK_H
 #define __LINUX_RTNETLINK_H
 
 #include <linux/netlink.h>
+#ifndef __KERNEL__
+/* Backward compatibility */
 #include <linux/if_link.h>
+#include <linux/if_addr.h>
+#include <linux/neighbour.h>
+#endif
 
 /****
  *		Routing/neighbour discovery messages.

---
commit 55a08a9078b243a06223222735580df9e11a5fa6
Author: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Date:   Sun Sep 17 13:55:02 2006 +0900

    [NET]: Put {IFLA,IFA,NDA,NDTA}_{RTA,PAYLOAD}() macro back.
    
    These macros are still used by userspace applications.
    
    Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>

diff --git a/include/linux/if_addr.h b/include/linux/if_addr.h
index e159045..a51b2d3 100644
--- a/include/linux/if_addr.h
+++ b/include/linux/if_addr.h
@@ -50,4 +50,7 @@ struct ifa_cacheinfo
 	__u32	tstamp; /* updated timestamp, hundredths of seconds */
 };
 
+#define IFA_RTA(r)	((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg))))
+#define IFA_PAYLOAD(n)	NLMSG_PAYLOAD(n,sizeof(struct ifaddrmsg))
+
 #endif
diff --git a/include/linux/if_link.h b/include/linux/if_link.h
index e963a07..bce8b98 100644
--- a/include/linux/if_link.h
+++ b/include/linux/if_link.h
@@ -133,4 +133,7 @@ struct ifla_cacheinfo
 	__u32	retrans_time;
 };
 
+#define IFLA_RTA(r)	((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg))))
+#define IFLA_PAYLOAD(n)	NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg))
+
 #endif /* _LINUX_IF_LINK_H */
diff --git a/include/linux/neighbour.h b/include/linux/neighbour.h
index bd3bbf6..7476739 100644
--- a/include/linux/neighbour.h
+++ b/include/linux/neighbour.h
@@ -26,6 +26,9 @@ enum
 
 #define NDA_MAX (__NDA_MAX - 1)
 
+#define NDA_RTA(r)	((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ndmsg))))
+#define NDA_PAYLOAD(n)	NLMSG_PAYLOAD(n,sizeof(struct ndmsg))
+
 /*
  *	Neighbor Cache Entry Flags
  */
@@ -156,4 +159,8 @@ enum {
 };
 #define NDTA_MAX (__NDTA_MAX - 1)
 
+#define NDTA_RTA(r) ((struct rtattr*)(((char*)(r)) + \
+		     NLMSG_ALIGN(sizeof(struct ndtmsg))))
+#define NDTA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ndtmsg))
+
 #endif

---
commit 1afcf9543d447ab3622ff4ecaacfa6baf83870b8
Author: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Date:   Sun Sep 17 13:55:04 2006 +0900

    [NET] KBUILD: Add missing entries for new net headers.
    
    Add the following for userspace export by the 'headers_include'
    make target: linux/fib_rules.h, linux/if_addr.h, linux/if_link.h,
    linux/neighbour.h.
    
    Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>

diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 2b8a7d6..83375cd 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -10,16 +10,18 @@ header-y += affs_fs.h affs_hardblocks.h 
 	bpqether.h cdk.h chio.h coda_psdev.h coff.h comstats.h		\
 	consolemap.h cycx_cfm.h dm-ioctl.h dn.h dqblk_v1.h		\
 	dqblk_v2.h dqblk_xfs.h efs_fs_sb.h elf-fdpic.h elf.h elf-em.h	\
-	fadvise.h fd.h fdreg.h ftape-header-segment.h ftape-vendors.h	\
+	fadvise.h fd.h fdreg.h fib_rules.h 				\
+	ftape-header-segment.h ftape-vendors.h				\
 	fuse.h futex.h genetlink.h gen_stats.h gigaset_dev.h hdsmart.h	\
-	hpfs_fs.h hysdn_if.h i2c-dev.h i8k.h icmp.h			\
+	hpfs_fs.h hysdn_if.h i2c-dev.h i8k.h icmp.h if_addr.h		\
 	if_arcnet.h if_arp.h if_bonding.h if_cablemodem.h if_fc.h	\
-	if_fddi.h if.h if_hippi.h if_infiniband.h if_packet.h		\
+	if_fddi.h if.h if_hippi.h if_infiniband.h if_link.h if_packet.h	\
 	if_plip.h if_ppp.h if_slip.h if_strip.h if_tunnel.h in6.h	\
 	in_route.h ioctl.h ip.h ipmi_msgdefs.h ip_mp_alg.h ipsec.h	\
 	ipx.h irda.h isdn_divertif.h iso_fs.h ite_gpio.h ixjuser.h	\
 	jffs2.h keyctl.h limits.h major.h matroxfb.h meye.h minix_fs.h	\
-	mmtimer.h mqueue.h mtio.h ncp_no.h netfilter_arp.h netrom.h	\
+	mmtimer.h mqueue.h mtio.h ncp_no.h neighbour.h			\
+	netfilter_arp.h netrom.h					\
 	nfs2.h nfs4_mount.h nfs_mount.h openprom_fs.h param.h		\
 	pci_ids.h pci_regs.h personality.h pfkeyv2.h pg.h pkt_cls.h	\
 	pkt_sched.h posix_types.h ppdev.h prctl.h ps2esdi.h qic117.h	\

---

-- 
YOSHIFUJI Hideaki @ USAGI Project  <yoshfuji@linux-ipv6.org>
GPG-FP  : 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [GIT PATCH] NET: Fixes for net-2.6.19
  2006-09-18 15:08 [GIT PATCH] NET: Fixes for net-2.6.19 YOSHIFUJI Hideaki / 吉藤英明
@ 2006-09-18 18:57 ` Thomas Graf
  2006-09-21  5:30   ` YOSHIFUJI Hideaki / 吉藤英明
  2006-09-28  5:44 ` David Miller
  1 sibling, 1 reply; 15+ messages in thread
From: Thomas Graf @ 2006-09-18 18:57 UTC (permalink / raw)
  To: YOSHIFUJI Hideaki / ?$B5HF#1QL@; +Cc: davem, netdev, usagi-core

* YOSHIFUJI Hideaki / ?$B5HF#1QL@ <yoshfuji@linux-ipv6.org> 2006-09-19 00:08
>     [NET]: Move netlink interface bits to linux/if_link.h.
>     
>     Moving netlink interface bits to linux/if.h is rather troublesome for
>     applications including both linux/if.h (which was changed to be included
>     from linux/rtnetlink.h automatically) and net/if.h.

Agreed.

>     [NET]: Include new rtnetlink headers for userspace backward compatibility.
>     
>     Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
> 
> diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
> index 3a18add..8ec375c 100644
> --- a/include/linux/rtnetlink.h
> +++ b/include/linux/rtnetlink.h
> @@ -2,7 +2,12 @@ #ifndef __LINUX_RTNETLINK_H
>  #define __LINUX_RTNETLINK_H
>  
>  #include <linux/netlink.h>
> +#ifndef __KERNEL__
> +/* Backward compatibility */
>  #include <linux/if_link.h>
> +#include <linux/if_addr.h>
> +#include <linux/neighbour.h>
> +#endif
>  
>  /****
>   *		Routing/neighbour discovery messages.

Still acceptable but this gets ugly at some point. Applications using
the interface should start making copies of the header version they
use.

> commit 55a08a9078b243a06223222735580df9e11a5fa6
> Author: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
> Date:   Sun Sep 17 13:55:02 2006 +0900
> 
>     [NET]: Put {IFLA,IFA,NDA,NDTA}_{RTA,PAYLOAD}() macro back.
>     
>     These macros are still used by userspace applications.

Same here, it doesn't make sense to export macros only of functional
value and used by userspace only. The same issue will pop up once
all users have been converted to use the new netlink interface.
Keeping the old interface around just so userspace doesn't have to
make copies doesn't make sense. I think it's better to start fixing
userspace than to try and keep headers source compatible.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [GIT PATCH] NET: Fixes for net-2.6.19
  2006-09-18 18:57 ` Thomas Graf
@ 2006-09-21  5:30   ` YOSHIFUJI Hideaki / 吉藤英明
  2006-09-21 10:14     ` Thomas Graf
  0 siblings, 1 reply; 15+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2006-09-21  5:30 UTC (permalink / raw)
  To: tgraf; +Cc: davem, netdev, usagi-core

Hello.

In article <20060918185746.GD18349@postel.suug.ch> (at Mon, 18 Sep 2006 20:57:46 +0200), Thomas Graf <tgraf@suug.ch> says:

> * YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> 2006-09-19 00:08
:
> >     [NET]: Include new rtnetlink headers for userspace backward compatibility.
:
> > diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
> > index 3a18add..8ec375c 100644
> > --- a/include/linux/rtnetlink.h
> > +++ b/include/linux/rtnetlink.h
> > @@ -2,7 +2,12 @@ #ifndef __LINUX_RTNETLINK_H
> >  #define __LINUX_RTNETLINK_H
> >  
> >  #include <linux/netlink.h>
> > +#ifndef __KERNEL__
> > +/* Backward compatibility */
> >  #include <linux/if_link.h>
> > +#include <linux/if_addr.h>
> > +#include <linux/neighbour.h>
> > +#endif
> >  
> >  /****
> >   *		Routing/neighbour discovery messages.
> 
> Still acceptable but this gets ugly at some point. Applications using
> the interface should start making copies of the header version they
> use.

I understand, but I feel it is more ugly.

> > commit 55a08a9078b243a06223222735580df9e11a5fa6
> > Author: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
> > Date:   Sun Sep 17 13:55:02 2006 +0900
> > 
> >     [NET]: Put {IFLA,IFA,NDA,NDTA}_{RTA,PAYLOAD}() macro back.
> >     
> >     These macros are still used by userspace applications.
> 
> Same here, it doesn't make sense to export macros only of functional
> value and used by userspace only. The same issue will pop up once
> all users have been converted to use the new netlink interface.
> Keeping the old interface around just so userspace doesn't have to
> make copies doesn't make sense. I think it's better to start fixing
> userspace than to try and keep headers source compatible.

Backward compatibility is one of the most important factor.
A careless breakage is, say,  of "brain freeze."

About these macros, we have other similar *_{RTA,PAYLOAD}()s in kernel,
which are not used by kernel but are exported to userspace.  They are
forming part of our API, and they're good example how to use netlink
interface.

Yes, we could change the interface, but we definately need to give
them graceful period at least; we can do it in 2.7, or at least,
after 2-3 stable releases.

Regards,

-- 
YOSHIFUJI Hideaki @ USAGI Project  <yoshfuji@linux-ipv6.org>
GPG-FP  : 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [GIT PATCH] NET: Fixes for net-2.6.19
  2006-09-21  5:30   ` YOSHIFUJI Hideaki / 吉藤英明
@ 2006-09-21 10:14     ` Thomas Graf
  0 siblings, 0 replies; 15+ messages in thread
From: Thomas Graf @ 2006-09-21 10:14 UTC (permalink / raw)
  To: YOSHIFUJI Hideaki / ?$B5HF#1QL@; +Cc: davem, netdev, usagi-core

* YOSHIFUJI Hideaki / ?$B5HF#1QL@ <yoshfuji@linux-ipv6.org> 2006-09-21 14:30
> In article <20060918185746.GD18349@postel.suug.ch> (at Mon, 18 Sep 2006 20:57:46 +0200), Thomas Graf <tgraf@suug.ch> says:
> > Same here, it doesn't make sense to export macros only of functional
> > value and used by userspace only. The same issue will pop up once
> > all users have been converted to use the new netlink interface.
> > Keeping the old interface around just so userspace doesn't have to
> > make copies doesn't make sense. I think it's better to start fixing
> > userspace than to try and keep headers source compatible.
> 
> Backward compatibility is one of the most important factor.
> A careless breakage is, say,  of "brain freeze."

This isn't about backward compatibility, it's about userspace
applications not sticking to the policy of using kernel headers.
Which applications will break? I'll fix them. The kernel is
only required to provide binary backward compatibility.

> About these macros, we have other similar *_{RTA,PAYLOAD}()s in kernel,
> which are not used by kernel but are exported to userspace.  They are
> forming part of our API, and they're good example how to use netlink
> interface.

Actually they are miserable examples of how to use netlink, they
only cover part of the interface required and lead to tons of
duplicated code in every userspace application. F.e. the different
semantics of simliar interfaces inside the kernel and libnetlink
have lead to countless bugs.

> Yes, we could change the interface, but we definately need to give
> them graceful period at least; we can do it in 2.7, or at least,
> after 2-3 stable releases.

Even thinking of 2.7 is not an option for me and I don't get the
point in waiting 6 months before fixing userspace applications.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [GIT PATCH] NET: Fixes for net-2.6.19
  2006-09-18 15:08 [GIT PATCH] NET: Fixes for net-2.6.19 YOSHIFUJI Hideaki / 吉藤英明
  2006-09-18 18:57 ` Thomas Graf
@ 2006-09-28  5:44 ` David Miller
  2006-09-28 15:36   ` Stephen Hemminger
  1 sibling, 1 reply; 15+ messages in thread
From: David Miller @ 2006-09-28  5:44 UTC (permalink / raw)
  To: yoshfuji, tgraf; +Cc: netdev, usagi-core

From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Date: Tue, 19 Sep 2006 00:08:00 +0900 (JST)

>     [XFRM]: Do not add a state whose SPI is zero to the SPI hash.
>     
>     SPI=0 is used for acquired IPsec SA and MIPv6 RO state.
>     Such state should not be added to the SPI hash
>     because we do not care about it on deleting path.
>     
>     Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
>     Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>

Patch applied, thank you.

But the rest of these patches need more thought about these header
file issues.

>     [NET]: Move netlink interface bits to linux/if_link.h.
>     
>     Moving netlink interface bits to linux/if.h is rather troublesome for
>     applications including both linux/if.h (which was changed to be included
>     from linux/rtnetlink.h automatically) and net/if.h.
>     
>     Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>

If it is illegal for user to include kernel's linux/if.h (by any
means) if he uses net/if.h from userland headers, then he should
also avoid including the kernel's rtnetlink.h header too.

I understand the issue, in that net/if.h defines macros that
linux/if.h defines as well so there are conflicts (even though
in the end the same exact values are used).

What I see happening is that the troublesome interfaces move from
linux/if.h to a new file named linux/if_addr.h, then this gets
included again to linux/rtnetlink.h but only for userspace with
some messy ifdefs.

These kinds of things don't go away, they stay around forever once
you decide to support them.

Actually, what I'm going to do is apply:

[NET]: Move netlink interface bits to linux/if_link.h.
[NET] KBUILD: Add missing entries for new net headers.

And leave the rest for now.

Thank you.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [GIT PATCH] NET: Fixes for net-2.6.19
  2006-09-28  5:44 ` David Miller
@ 2006-09-28 15:36   ` Stephen Hemminger
  2006-09-28 21:33     ` David Miller
  0 siblings, 1 reply; 15+ messages in thread
From: Stephen Hemminger @ 2006-09-28 15:36 UTC (permalink / raw)
  To: David Miller; +Cc: yoshfuji, tgraf, netdev, usagi-core

On Wed, 27 Sep 2006 22:44:44 -0700 (PDT)
David Miller <davem@davemloft.net> wrote:

> From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
> Date: Tue, 19 Sep 2006 00:08:00 +0900 (JST)
> 
> >     [XFRM]: Do not add a state whose SPI is zero to the SPI hash.
> >     
> >     SPI=0 is used for acquired IPsec SA and MIPv6 RO state.
> >     Such state should not be added to the SPI hash
> >     because we do not care about it on deleting path.
> >     
> >     Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
> >     Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
> 
> Patch applied, thank you.
> 
> But the rest of these patches need more thought about these header
> file issues.
> 
> >     [NET]: Move netlink interface bits to linux/if_link.h.
> >     
> >     Moving netlink interface bits to linux/if.h is rather troublesome for
> >     applications including both linux/if.h (which was changed to be included
> >     from linux/rtnetlink.h automatically) and net/if.h.
> >     
> >     Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
> 
> If it is illegal for user to include kernel's linux/if.h (by any
> means) if he uses net/if.h from userland headers, then he should
> also avoid including the kernel's rtnetlink.h header too.
> 
> I understand the issue, in that net/if.h defines macros that
> linux/if.h defines as well so there are conflicts (even though
> in the end the same exact values are used).
> 
> What I see happening is that the troublesome interfaces move from
> linux/if.h to a new file named linux/if_addr.h, then this gets
> included again to linux/rtnetlink.h but only for userspace with
> some messy ifdefs.
> 
> These kinds of things don't go away, they stay around forever once
> you decide to support them.
> 
> Actually, what I'm going to do is apply:
> 
> [NET]: Move netlink interface bits to linux/if_link.h.
> [NET] KBUILD: Add missing entries for new net headers.
> 
> And leave the rest for now.
> 

Please figure out how to keep rtnetlink.h useful from user space.
I tried putting the current sanitized version of rtnetlink.h into
iproute2 and the build fails. 

-- 
Stephen Hemminger <shemminger@osdl.org>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [GIT PATCH] NET: Fixes for net-2.6.19
  2006-09-28 15:36   ` Stephen Hemminger
@ 2006-09-28 21:33     ` David Miller
  2006-09-28 22:50       ` Stephen Hemminger
  0 siblings, 1 reply; 15+ messages in thread
From: David Miller @ 2006-09-28 21:33 UTC (permalink / raw)
  To: shemminger; +Cc: yoshfuji, tgraf, netdev, usagi-core

From: Stephen Hemminger <shemminger@osdl.org>
Date: Thu, 28 Sep 2006 08:36:45 -0700

> Please figure out how to keep rtnetlink.h useful from user space.
> I tried putting the current sanitized version of rtnetlink.h into
> iproute2 and the build fails. 

Please give the error so I have a chance of fixing this.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [GIT PATCH] NET: Fixes for net-2.6.19
  2006-09-28 21:33     ` David Miller
@ 2006-09-28 22:50       ` Stephen Hemminger
  2006-09-28 23:04         ` David Miller
  0 siblings, 1 reply; 15+ messages in thread
From: Stephen Hemminger @ 2006-09-28 22:50 UTC (permalink / raw)
  To: David Miller; +Cc: yoshfuji, tgraf, netdev, usagi-core

On Thu, 28 Sep 2006 14:33:04 -0700 (PDT)
David Miller <davem@davemloft.net> wrote:

> From: Stephen Hemminger <shemminger@osdl.org>
> Date: Thu, 28 Sep 2006 08:36:45 -0700
> 
> > Please figure out how to keep rtnetlink.h useful from user space.
> > I tried putting the current sanitized version of rtnetlink.h into
> > iproute2 and the build fails. 
> 
> Please give the error so I have a chance of fixing this.

If I put 2.6.19 headers in:


In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ll_map.c:23:
/usr/include/linux/if.h:117: error: redefinition of ‘struct ifmap’
/usr/include/linux/if.h:153: error: redefinition of ‘struct ifreq’
/usr/include/linux/if.h:203: error: redefinition of ‘struct ifconf’
ll_map.c: In function ‘ll_remember_index’:
ll_map.c:45: error: ‘IFLA_MAX’ undeclared (first use in this function)
ll_map.c:45: error: (Each undeclared identifier is reported only once
ll_map.c:45: error: for each function it appears in.)
ll_map.c:55: warning: implicit declaration of function ‘IFLA_RTA’
ll_map.c:55: warning: implicit declaration of function ‘IFLA_PAYLOAD’
ll_map.c:55: warning: passing argument 3 of ‘parse_rtattr’ makes pointer from integer without a cast
ll_map.c:56: error: ‘IFLA_IFNAME’ undeclared (first use in this function)
ll_map.c:76: error: ‘IFLA_ADDRESS’ undeclared (first use in this function)
ll_map.c:45: warning: unused variable ‘tb’
make[1]: *** [ll_map.o] Error 1
utils.c: In function ‘inet_addr_match’:
utils.c:333: warning: initialization discards qualifiers from pointer target type
utils.c:334: warning: initialization discards qualifiers from pointer target type
make[1]: Target `all' not remade because of errors.
ipaddress.c: In function ‘print_linkinfo’:
ipaddress.c:135: error: ‘IFLA_MAX’ undeclared (first use in this function)
ipaddress.c:135: error: (Each undeclared identifier is reported only once
ipaddress.c:135: error: for each function it appears in.)
ipaddress.c:151: warning: implicit declaration of function ‘IFLA_RTA’
ipaddress.c:151: warning: passing argument 3 of ‘parse_rtattr’ makes pointer from integer without a cast
ipaddress.c:152: error: ‘IFLA_IFNAME’ undeclared (first use in this function)
ipaddress.c:167: error: ‘IFLA_LINK’ undeclared (first use in this function)
ipaddress.c:182: error: ‘IFLA_MTU’ undeclared (first use in this function)
ipaddress.c:184: error: ‘IFLA_QDISC’ undeclared (first use in this function)
ipaddress.c:200: error: ‘IFLA_ADDRESS’ undeclared (first use in this function)
ipaddress.c:206: error: ‘IFLA_BROADCAST’ undeclared (first use in this function)
ipaddress.c:217: error: ‘IFLA_STATS’ undeclared (first use in this function)
ipaddress.c:218: error: storage size of ‘slocal’ isn’t known
ipaddress.c:226: error: dereferencing pointer to incomplete type
ipaddress.c:228: error: dereferencing pointer to incomplete type
ipaddress.c:228: error: dereferencing pointer to incomplete type
ipaddress.c:228: error: dereferencing pointer to incomplete type
ipaddress.c:229: error: dereferencing pointer to incomplete type
ipaddress.c:229: error: dereferencing pointer to incomplete type
ipaddress.c:230: error: dereferencing pointer to incomplete type
ipaddress.c:232: error: dereferencing pointer to incomplete type
ipaddress.c:233: error: dereferencing pointer to incomplete type
ipaddress.c:238: error: dereferencing pointer to incomplete type
ipaddress.c:239: error: dereferencing pointer to incomplete type
ipaddress.c:240: error: dereferencing pointer to incomplete type
ipaddress.c:241: error: dereferencing pointer to incomplete type
ipaddress.c:242: error: dereferencing pointer to incomplete type
ipaddress.c:247: error: dereferencing pointer to incomplete type
ipaddress.c:249: error: dereferencing pointer to incomplete type
ipaddress.c:249: error: dereferencing pointer to incomplete type
ipaddress.c:249: error: dereferencing pointer to incomplete type
ipaddress.c:250: error: dereferencing pointer to incomplete type
ipaddress.c:250: error: dereferencing pointer to incomplete type
ipaddress.c:250: error: dereferencing pointer to incomplete type
ipaddress.c:251: error: dereferencing pointer to incomplete type
ipaddress.c:252: error: dereferencing pointer to incomplete type
ipaddress.c:257: error: dereferencing pointer to incomplete type
ipaddress.c:258: error: dereferencing pointer to incomplete type
ipaddress.c:259: error: dereferencing pointer to incomplete type
ipaddress.c:260: error: dereferencing pointer to incomplete type
ipaddress.c:218: warning: unused variable ‘slocal’
ipaddress.c:135: warning: unused variable ‘tb’
ipaddress.c: In function ‘print_addrinfo’:
ipaddress.c:285: error: ‘IFA_MAX’ undeclared (first use in this function)
ipaddress.c:291: error: dereferencing pointer to incomplete type
ipaddress.c:300: warning: implicit declaration of function ‘IFA_RTA’
ipaddress.c:300: error: dereferencing pointer to incomplete type
ipaddress.c:300: warning: passing argument 3 of ‘parse_rtattr’ makes pointer from integer without a cast
ipaddress.c:302: error: ‘IFA_LOCAL’ undeclared (first use in this function)
ipaddress.c:303: error: ‘IFA_ADDRESS’ undeclared (first use in this function)
ipaddress.c:307: error: dereferencing pointer to incomplete type
ipaddress.c:309: error: dereferencing pointer to incomplete type
ipaddress.c:311: error: dereferencing pointer to incomplete type
ipaddress.c:316: error: ‘IFA_LABEL’ undeclared (first use in this function)
ipaddress.c:319: error: dereferencing pointer to incomplete type
ipaddress.c:327: error: dereferencing pointer to incomplete type
ipaddress.c:334: error: dereferencing pointer to incomplete type
ipaddress.c:358: error: dereferencing pointer to incomplete type
ipaddress.c:358: error: dereferencing pointer to incomplete type
ipaddress.c:359: error: dereferencing pointer to incomplete type
ipaddress.c:361: error: dereferencing pointer to incomplete type
ipaddress.c:363: error: dereferencing pointer to incomplete type
ipaddress.c:365: error: dereferencing pointer to incomplete type
ipaddress.c:368: error: dereferencing pointer to incomplete type
ipaddress.c:371: error: dereferencing pointer to incomplete type
ipaddress.c:378: error: dereferencing pointer to incomplete type
ipaddress.c:381: error: dereferencing pointer to incomplete type
ipaddress.c:385: error: dereferencing pointer to incomplete type
ipaddress.c:389: error: ‘IFA_BROADCAST’ undeclared (first use in this function)
ipaddress.c:391: error: dereferencing pointer to incomplete type
ipaddress.c:396: error: ‘IFA_ANYCAST’ undeclared (first use in this function)
ipaddress.c:398: error: dereferencing pointer to incomplete type
ipaddress.c:403: error: dereferencing pointer to incomplete type
ipaddress.c:404: error: dereferencing pointer to incomplete type
ipaddress.c:404: error: ‘IFA_F_SECONDARY’ undeclared (first use in this function)
ipaddress.c:405: error: dereferencing pointer to incomplete type
ipaddress.c:408: error: dereferencing pointer to incomplete type
ipaddress.c:408: error: ‘IFA_F_TENTATIVE’ undeclared (first use in this function)
ipaddress.c:409: error: dereferencing pointer to incomplete type
ipaddress.c:412: error: dereferencing pointer to incomplete type
ipaddress.c:412: error: ‘IFA_F_DEPRECATED’ undeclared (first use in this function)
ipaddress.c:413: error: dereferencing pointer to incomplete type
ipaddress.c:416: error: dereferencing pointer to incomplete type
ipaddress.c:416: error: ‘IFA_F_PERMANENT’ undeclared (first use in this function)
ipaddress.c:419: error: dereferencing pointer to incomplete type
ipaddress.c:420: error: dereferencing pointer to incomplete type
ipaddress.c:421: error: dereferencing pointer to incomplete type
ipaddress.c:424: error: ‘IFA_CACHEINFO’ undeclared (first use in this function)
ipaddress.c:428: error: dereferencing pointer to incomplete type
ipaddress.c:431: error: dereferencing pointer to incomplete type
ipaddress.c:432: error: dereferencing pointer to incomplete type
ipaddress.c:435: error: dereferencing pointer to incomplete type
ipaddress.c:285: warning: unused variable ‘rta_tb’
ipaddress.c: In function ‘print_selected_addrinfo’:
ipaddress.c:462: error: dereferencing pointer to incomplete type
ipaddress.c:463: error: dereferencing pointer to incomplete type
ipaddress.c: In function ‘ipaddr_list_or_flush’:
ipaddress.c:538: error: ‘IFA_F_PERMANENT’ undeclared (first use in this function)
ipaddress.c:544: error: ‘IFA_F_SECONDARY’ undeclared (first use in this function)
ipaddress.c:550: error: ‘IFA_F_TENTATIVE’ undeclared (first use in this function)
ipaddress.c:553: error: ‘IFA_F_DEPRECATED’ undeclared (first use in this function)
ipaddress.c:655: error: dereferencing pointer to incomplete type
ipaddress.c:656: error: dereferencing pointer to incomplete type
ipaddress.c:658: error: dereferencing pointer to incomplete type
ipaddress.c:660: error: dereferencing pointer to incomplete type
ipaddress.c:663: error: ‘IFA_MAX’ undeclared (first use in this function)
ipaddress.c:664: warning: implicit declaration of function ‘IFA_PAYLOAD’
ipaddress.c:664: warning: passing argument 3 of ‘parse_rtattr’ makes pointer from integer without a cast
ipaddress.c:665: error: ‘IFA_LOCAL’ undeclared (first use in this function)
ipaddress.c:666: error: ‘IFA_ADDRESS’ undeclared (first use in this function)
ipaddress.c:671: error: dereferencing pointer to incomplete type
ipaddress.c:679: error: ‘IFA_LABEL’ undeclared (first use in this function)
ipaddress.c:682: error: dereferencing pointer to incomplete type
ipaddress.c:663: warning: unused variable ‘tb’
ipaddress.c: In function ‘ipaddr_modify’:
ipaddress.c:738: error: field ‘ifa’ has incomplete type
ipaddress.c:754: error: invalid application of ‘sizeof’ to incomplete type ‘struct ifaddrmsg’ 
ipaddress.c:770: error: ‘IFA_ADDRESS’ undeclared (first use in this function)
ipaddress.c:786: error: ‘IFA_BROADCAST’ undeclared (first use in this function)
ipaddress.c:797: error: ‘IFA_ANYCAST’ undeclared (first use in this function)
ipaddress.c:812: error: ‘IFA_LABEL’ undeclared (first use in this function)
ipaddress.c:825: error: ‘IFA_LOCAL’ undeclared (first use in this function)
make[1]: *** [ipaddress.o] Error 1
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ../include/utils.h:7,
                 from ipneigh.c:30:
/usr/include/linux/if.h:117: error: redefinition of ‘struct ifmap’
/usr/include/linux/if.h:153: error: redefinition of ‘struct ifreq’
/usr/include/linux/if.h:203: error: redefinition of ‘struct ifconf’
ipneigh.c: In function ‘nud_state_a2n’:
ipneigh.c:63: error: ‘NUD_PERMANENT’ undeclared (first use in this function)
ipneigh.c:63: error: (Each undeclared identifier is reported only once
ipneigh.c:63: error: for each function it appears in.)
ipneigh.c:65: error: ‘NUD_REACHABLE’ undeclared (first use in this function)
ipneigh.c:67: error: ‘NUD_NOARP’ undeclared (first use in this function)
ipneigh.c:69: error: ‘NUD_NONE’ undeclared (first use in this function)
ipneigh.c:71: error: ‘NUD_STALE’ undeclared (first use in this function)
ipneigh.c:73: error: ‘NUD_INCOMPLETE’ undeclared (first use in this function)
ipneigh.c:75: error: ‘NUD_DELAY’ undeclared (first use in this function)
ipneigh.c:77: error: ‘NUD_PROBE’ undeclared (first use in this function)
ipneigh.c:79: error: ‘NUD_FAILED’ undeclared (first use in this function)
ipneigh.c: In function ‘ipneigh_modify’:
ipneigh.c:104: error: field ‘ndm’ has incomplete type
ipneigh.c:115: error: invalid application of ‘sizeof’ to incomplete type ‘struct ndmsg’ 
ipneigh.c:119: error: ‘NUD_PERMANENT’ undeclared (first use in this function)
ipneigh.c:142: error: ‘NTF_PROXY’ undeclared (first use in this function)
ipneigh.c:165: error: ‘NDA_DST’ undeclared (first use in this function)
ipneigh.c:172: error: ‘NDA_LLADDR’ undeclared (first use in this function)
ipneigh.c: In function ‘print_neigh’:
ipneigh.c:194: error: ‘NDA_MAX’ undeclared (first use in this function)
ipneigh.c:203: error: dereferencing pointer to incomplete type
ipneigh.c:212: error: dereferencing pointer to incomplete type
ipneigh.c:214: error: dereferencing pointer to incomplete type
ipneigh.c:216: error: dereferencing pointer to incomplete type
ipneigh.c:217: error: dereferencing pointer to incomplete type
ipneigh.c:218: error: dereferencing pointer to incomplete type
ipneigh.c:221: warning: implicit declaration of function ‘NDA_RTA’
ipneigh.c:221: error: dereferencing pointer to incomplete type
ipneigh.c:221: warning: passing argument 3 of ‘parse_rtattr’ makes pointer from integer without a cast
ipneigh.c:223: error: ‘NDA_DST’ undeclared (first use in this function)
ipneigh.c:227: error: dereferencing pointer to incomplete type
ipneigh.c:233: error: ‘NDA_CACHEINFO’ undeclared (first use in this function)
ipneigh.c:235: error: dereferencing pointer to incomplete type
ipneigh.c:258: error: dereferencing pointer to incomplete type
ipneigh.c:263: error: dereferencing pointer to incomplete type
ipneigh.c:264: error: dereferencing pointer to incomplete type
ipneigh.c:265: error: ‘NDA_LLADDR’ undeclared (first use in this function)
ipneigh.c:269: error: dereferencing pointer to incomplete type
ipneigh.c:272: error: dereferencing pointer to incomplete type
ipneigh.c:272: error: ‘NTF_ROUTER’ undeclared (first use in this function)
ipneigh.c:280: error: dereferencing pointer to incomplete type
ipneigh.c:281: error: dereferencing pointer to incomplete type
ipneigh.c:282: error: dereferencing pointer to incomplete type
ipneigh.c:283: error: dereferencing pointer to incomplete type
ipneigh.c:283: error: dereferencing pointer to incomplete type
ipneigh.c:293: error: dereferencing pointer to incomplete type
ipneigh.c:294: error: dereferencing pointer to incomplete type
ipneigh.c:299: error: ‘NUD_INCOMPLETE’ undeclared (first use in this function)
ipneigh.c:300: error: ‘NUD_REACHABLE’ undeclared (first use in this function)
ipneigh.c:301: error: ‘NUD_STALE’ undeclared (first use in this function)
ipneigh.c:302: error: ‘NUD_DELAY’ undeclared (first use in this function)
ipneigh.c:303: error: ‘NUD_PROBE’ undeclared (first use in this function)
ipneigh.c:304: error: ‘NUD_FAILED’ undeclared (first use in this function)
ipneigh.c:305: error: ‘NUD_NOARP’ undeclared (first use in this function)
ipneigh.c:306: error: ‘NUD_PERMANENT’ undeclared (first use in this function)
ipneigh.c:194: warning: unused variable ‘tb’
ipneigh.c: In function ‘do_show_or_flush’:
ipneigh.c:336: error: ‘NUD_PERMANENT’ undeclared (first use in this function)
ipneigh.c:336: error: ‘NUD_NOARP’ undeclared (first use in this function)
ipneigh.c:394: error: ‘NUD_FAILED’ undeclared (first use in this function)
make[1]: *** [ipneigh.o] Error 1
ipntable.c: In function ‘ipntable_modify’:
ipntable.c:67: error: field ‘ndtm’ has incomplete type
ipntable.c:79: error: invalid application of ‘sizeof’ to incomplete type ‘struct ndtmsg’ 
ipntable.c:89: error: ‘NDTA_PARMS’ undeclared (first use in this function)
ipntable.c:89: error: (Each undeclared identifier is reported only once
ipntable.c:89: error: for each function it appears in.)
ipntable.c:102: error: ‘NDTA_NAME’ undeclared (first use in this function)
ipntable.c:112: error: ‘NDTA_THRESH1’ undeclared (first use in this function)
ipntable.c:122: error: ‘NDTA_THRESH2’ undeclared (first use in this function)
ipntable.c:132: error: ‘NDTA_THRESH3’ undeclared (first use in this function)
ipntable.c:142: error: ‘NDTA_GC_INTERVAL’ undeclared (first use in this function)
ipntable.c:155: error: ‘NDTPA_IFINDEX’ undeclared (first use in this function)
ipntable.c:165: error: ‘NDTPA_BASE_REACHABLE_TIME’ undeclared (first use in this function)
ipntable.c:177: error: ‘NDTPA_RETRANS_TIME’ undeclared (first use in this function)
ipntable.c:189: error: ‘NDTPA_GC_STALETIME’ undeclared (first use in this function)
ipntable.c:201: error: ‘NDTPA_DELAY_PROBE_TIME’ undeclared (first use in this function)
ipntable.c:215: error: ‘NDTPA_QUEUE_LEN’ undeclared (first use in this function)
ipntable.c:226: error: ‘NDTPA_APP_PROBES’ undeclared (first use in this function)
ipntable.c:237: error: ‘NDTPA_UCAST_PROBES’ undeclared (first use in this function)
ipntable.c:248: error: ‘NDTPA_MCAST_PROBES’ undeclared (first use in this function)
ipntable.c:259: error: ‘NDTPA_ANYCAST_DELAY’ undeclared (first use in this function)
ipntable.c:271: error: ‘NDTPA_PROXY_DELAY’ undeclared (first use in this function)
ipntable.c:283: error: ‘NDTPA_PROXY_QLEN’ undeclared (first use in this function)
ipntable.c:294: error: ‘NDTPA_LOCKTIME’ undeclared (first use in this function)
ipntable.c: In function ‘print_ntable’:
ipntable.c:357: error: ‘NDTA_MAX’ undeclared (first use in this function)
ipntable.c:358: error: ‘NDTPA_MAX’ undeclared (first use in this function)
ipntable.c:366: error: dereferencing pointer to incomplete type
ipntable.c:372: error: dereferencing pointer to incomplete type
ipntable.c:375: warning: implicit declaration of function ‘NDTA_RTA’
ipntable.c:376: error: dereferencing pointer to incomplete type
ipntable.c:376: warning: passing argument 3 of ‘parse_rtattr’ makes pointer from integer without a cast
ipntable.c:378: error: ‘NDTA_NAME’ undeclared (first use in this function)
ipntable.c:384: error: ‘NDTA_PARMS’ undeclared (first use in this function)
ipntable.c:388: error: ‘NDTPA_IFINDEX’ undeclared (first use in this function)
ipntable.c:399: error: dereferencing pointer to incomplete type
ipntable.c:401: error: dereferencing pointer to incomplete type
ipntable.c:403: error: dereferencing pointer to incomplete type
ipntable.c:406: error: dereferencing pointer to incomplete type
ipntable.c:415: error: ‘NDTA_THRESH1’ undeclared (first use in this function)
ipntable.c:415: error: ‘NDTA_THRESH2’ undeclared (first use in this function)
ipntable.c:415: error: ‘NDTA_THRESH3’ undeclared (first use in this function)
ipntable.c:416: error: ‘NDTA_GC_INTERVAL’ undeclared (first use in this function)
ipntable.c:440: error: ‘NDTA_CONFIG’ undeclared (first use in this function)
ipntable.c:446: error: dereferencing pointer to incomplete type
ipntable.c:447: error: dereferencing pointer to incomplete type
ipntable.c:448: error: dereferencing pointer to incomplete type
ipntable.c:454: error: dereferencing pointer to incomplete type
ipntable.c:456: error: dereferencing pointer to incomplete type
ipntable.c:461: error: dereferencing pointer to incomplete type
ipntable.c:462: error: dereferencing pointer to incomplete type
ipntable.c:464: error: dereferencing pointer to incomplete type
ipntable.c:465: error: dereferencing pointer to incomplete type
ipntable.c:481: error: ‘NDTPA_REFCNT’ undeclared (first use in this function)
ipntable.c:485: error: ‘NDTPA_REACHABLE_TIME’ undeclared (first use in this function)
ipntable.c:489: error: ‘NDTPA_BASE_REACHABLE_TIME’ undeclared (first use in this function)
ipntable.c:493: error: ‘NDTPA_RETRANS_TIME’ undeclared (first use in this function)
ipntable.c:502: error: ‘NDTPA_GC_STALETIME’ undeclared (first use in this function)
ipntable.c:506: error: ‘NDTPA_DELAY_PROBE_TIME’ undeclared (first use in this function)
ipntable.c:510: error: ‘NDTPA_QUEUE_LEN’ undeclared (first use in this function)
ipntable.c:519: error: ‘NDTPA_APP_PROBES’ undeclared (first use in this function)
ipntable.c:523: error: ‘NDTPA_UCAST_PROBES’ undeclared (first use in this function)
ipntable.c:527: error: ‘NDTPA_MCAST_PROBES’ undeclared (first use in this function)
ipntable.c:536: error: ‘NDTPA_ANYCAST_DELAY’ undeclared (first use in this function)
ipntable.c:540: error: ‘NDTPA_PROXY_DELAY’ undeclared (first use in this function)
ipntable.c:544: error: ‘NDTPA_PROXY_QLEN’ undeclared (first use in this function)
ipntable.c:548: error: ‘NDTPA_LOCKTIME’ undeclared (first use in this function)
ipntable.c:556: error: ‘NDTA_STATS’ undeclared (first use in this function)
ipntable.c:562: error: dereferencing pointer to incomplete type
ipntable.c:563: error: dereferencing pointer to incomplete type
ipntable.c:564: error: dereferencing pointer to incomplete type
ipntable.c:569: error: dereferencing pointer to incomplete type
ipntable.c:570: error: dereferencing pointer to incomplete type
ipntable.c:571: error: dereferencing pointer to incomplete type
ipntable.c:576: error: dereferencing pointer to incomplete type
ipntable.c:577: error: dereferencing pointer to incomplete type
ipntable.c:582: error: dereferencing pointer to incomplete type
ipntable.c:583: error: dereferencing pointer to incomplete type
ipntable.c:358: warning: unused variable ‘tpb’
ipntable.c:357: warning: unused variable ‘tb’
make[1]: *** [ipntable.o] Error 1
In file included from ../include/linux/rtnetlink.h:5,
                 from ipxfrm.c:37:
/usr/include/linux/if.h:117: error: redefinition of ‘struct ifmap’
/usr/include/linux/if.h:153: error: redefinition of ‘struct ifreq’
/usr/include/linux/if.h:203: error: redefinition of ‘struct ifconf’
make[1]: *** [ipxfrm.o] Error 1
make[1]: *** No rule to make target `../lib/libnetlink.a', needed by `ip'.
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ../include/utils.h:7,
                 from rtmon.c:26:
/usr/include/linux/if.h:117: error: redefinition of ‘struct ifmap’
/usr/include/linux/if.h:153: error: redefinition of ‘struct ifreq’
/usr/include/linux/if.h:203: error: redefinition of ‘struct ifconf’
make[1]: *** [rtmon.o] Error 1
make[1]: Target `all' not remade because of errors.
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ../include/utils.h:7,
                 from tc_filter.c:27:
/usr/include/linux/if.h:117: error: redefinition of ‘struct ifmap’
/usr/include/linux/if.h:153: error: redefinition of ‘struct ifreq’
/usr/include/linux/if.h:203: error: redefinition of ‘struct ifconf’
make[1]: *** [tc_filter.o] Error 1
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ../include/utils.h:7,
                 from m_ipt.c:22:
/usr/include/linux/if.h:117: error: redefinition of ‘struct ifmap’
/usr/include/linux/if.h:153: error: redefinition of ‘struct ifreq’
/usr/include/linux/if.h:203: error: redefinition of ‘struct ifconf’
make[1]: *** [m_ipt.o] Error 1
make[1]: *** No rule to make target `../lib/libnetlink.a', needed by `tc'.
make[1]: Target `all' not remade because of errors.
ssfilter.y: conflicts: 27 shift/reduce
/usr/bin/ld: cannot find -lnetlink
collect2: ld returned 1 exit status
make[1]: *** [ss] Error 1
gcc: ../lib/libnetlink.a: No such file or directory
ifstat.c: In function ‘get_nlmsg’:
ifstat.c:84: error: ‘IFLA_MAX’ undeclared (first use in this function)
ifstat.c:84: error: (Each undeclared identifier is reported only once
ifstat.c:84: error: for each function it appears in.)
ifstat.c:99: warning: implicit declaration of function ‘IFLA_RTA’
ifstat.c:99: warning: passing argument 3 of ‘parse_rtattr’ makes pointer from integer without a cast
ifstat.c:100: error: ‘IFLA_IFNAME’ undeclared (first use in this function)
ifstat.c:100: error: ‘IFLA_STATS’ undeclared (first use in this function)
ifstat.c:84: warning: unused variable ‘tb’
make[1]: *** [ifstat] Error 1
gcc: ../lib/libnetlink.a: No such file or directory
make[1]: *** [rtacct] Error 1
gcc: ../lib/libnetlink.a: No such file or directory
arpd.c: In function ‘respond_to_kernel’:
arpd.c:267: error: field ‘ndm’ has incomplete type
arpd.c:274: error: invalid application of ‘sizeof’ to incomplete type ‘struct ndmsg’ 
arpd.c:278: error: ‘NUD_STALE’ undeclared (first use in this function)
arpd.c:278: error: (Each undeclared identifier is reported only once
arpd.c:278: error: for each function it appears in.)
arpd.c:282: error: ‘NDA_DST’ undeclared (first use in this function)
arpd.c:283: error: ‘NDA_LLADDR’ undeclared (first use in this function)
arpd.c: In function ‘do_one_request’:
arpd.c:302: error: ‘NDA_MAX’ undeclared (first use in this function)
arpd.c:320: error: dereferencing pointer to incomplete type
arpd.c:324: error: dereferencing pointer to incomplete type
arpd.c:325: error: dereferencing pointer to incomplete type
arpd.c:326: error: dereferencing pointer to incomplete type
arpd.c:327: error: dereferencing pointer to incomplete type
arpd.c:328: error: dereferencing pointer to incomplete type
arpd.c:328: error: ‘NUD_NOARP’ undeclared (first use in this function)
arpd.c:331: warning: implicit declaration of function ‘NDA_RTA’
arpd.c:331: warning: passing argument 3 of ‘parse_rtattr’ makes pointer from integer without a cast
arpd.c:333: error: ‘NDA_DST’ undeclared (first use in this function)
arpd.c:336: error: dereferencing pointer to incomplete type
arpd.c:350: error: dereferencing pointer to incomplete type
arpd.c:350: error: ‘NUD_PROBE’ undeclared (first use in this function)
arpd.c:350: error: ‘NUD_INCOMPLETE’ undeclared (first use in this function)
arpd.c:355: error: dereferencing pointer to incomplete type
arpd.c:388: error: dereferencing pointer to incomplete type
arpd.c:397: error: dereferencing pointer to incomplete type
arpd.c:397: error: ‘NUD_FAILED’ undeclared (first use in this function)
arpd.c:411: error: ‘NDA_LLADDR’ undeclared (first use in this function)
arpd.c:302: warning: unused variable ‘tb’
m

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [GIT PATCH] NET: Fixes for net-2.6.19
  2006-09-28 22:50       ` Stephen Hemminger
@ 2006-09-28 23:04         ` David Miller
  2006-09-28 23:27           ` Stephen Hemminger
  0 siblings, 1 reply; 15+ messages in thread
From: David Miller @ 2006-09-28 23:04 UTC (permalink / raw)
  To: shemminger; +Cc: yoshfuji, tgraf, netdev, usagi-core

From: Stephen Hemminger <shemminger@osdl.org>
Date: Thu, 28 Sep 2006 15:50:52 -0700

> On Thu, 28 Sep 2006 14:33:04 -0700 (PDT)
> David Miller <davem@davemloft.net> wrote:
> 
> > From: Stephen Hemminger <shemminger@osdl.org>
> > Date: Thu, 28 Sep 2006 08:36:45 -0700
> > 
> > > Please figure out how to keep rtnetlink.h useful from user space.
> > > I tried putting the current sanitized version of rtnetlink.h into
> > > iproute2 and the build fails. 
> > 
> > Please give the error so I have a chance of fixing this.
> 
> If I put 2.6.19 headers in:
> 
> 
> In file included from ../include/linux/rtnetlink.h:5,
>                  from ../include/libnetlink.h:6,
>                  from ll_map.c:23:
> /usr/include/linux/if.h:117: error: redefinition of ^[$,1rx^[(Bstruct ifmap^[$,1ry^[(B
> /usr/include/linux/if.h:153: error: redefinition of ^[$,1rx^[(Bstruct ifreq^[$,1ry^[(B
> /usr/include/linux/if.h:203: error: redefinition of ^[$,1rx^[(Bstruct ifconf^[$,1ry^[(B

Hmmm... we explicitly removed the "linux/if.h" inclusion from
rtnetlink.h so this is weird.  Where is the linux/if.h include coming
from?


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [GIT PATCH] NET: Fixes for net-2.6.19
  2006-09-28 23:04         ` David Miller
@ 2006-09-28 23:27           ` Stephen Hemminger
  2006-09-29  0:28             ` David Miller
  0 siblings, 1 reply; 15+ messages in thread
From: Stephen Hemminger @ 2006-09-28 23:27 UTC (permalink / raw)
  To: David Miller; +Cc: yoshfuji, tgraf, netdev, usagi-core

On Thu, 28 Sep 2006 16:04:58 -0700 (PDT)
David Miller <davem@davemloft.net> wrote:

> From: Stephen Hemminger <shemminger@osdl.org>
> Date: Thu, 28 Sep 2006 15:50:52 -0700
> 
> > On Thu, 28 Sep 2006 14:33:04 -0700 (PDT)
> > David Miller <davem@davemloft.net> wrote:
> > 
> > > From: Stephen Hemminger <shemminger@osdl.org>
> > > Date: Thu, 28 Sep 2006 08:36:45 -0700
> > > 
> > > > Please figure out how to keep rtnetlink.h useful from user space.
> > > > I tried putting the current sanitized version of rtnetlink.h into
> > > > iproute2 and the build fails. 
> > > 
> > > Please give the error so I have a chance of fixing this.
> > 
> > If I put 2.6.19 headers in:
> > 
> > 
> > In file included from ../include/linux/rtnetlink.h:5,
> >                  from ../include/libnetlink.h:6,
> >                  from ll_map.c:23:
> > /usr/include/linux/if.h:117: error: redefinition of $,1rxstruct ifmap$,1ry
> > /usr/include/linux/if.h:153: error: redefinition of $,1rxstruct ifreq$,1ry
> > /usr/include/linux/if.h:203: error: redefinition of $,1rxstruct ifconf$,1ry
> 
> Hmmm... we explicitly removed the "linux/if.h" inclusion from
> rtnetlink.h so this is weird.  Where is the linux/if.h include coming
> from?
> 

It got added by this:

commit 0844565fb8a9418f5a860aa480c1aef70319c9a2
Author: Thomas Graf <tgraf@suug.ch>
Date:   Fri Aug 4 23:05:56 2006 -0700

    [NET]: Move netlink interface bits to linux/if.h
    
    Signed-off-by: Thomas Graf <tgraf@suug.ch>
    Signed-off-by: David S. Miller <davem@davemloft.net>

diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index 890c4d4..84f3eb4 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -2,6 +2,7 @@ #ifndef __LINUX_RTNETLINK_H
 #define __LINUX_RTNETLINK_H
 
 #include <linux/netlink.h>
+#include <linux/if.h>
 
 /****
  *		Routing/neighbour discovery messages.

Note: if I put a santized version if linux/if.h in the iproute2, then it
gets more errors as well:

In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ll_map.c:23:
../include/linux/if.h:26:1: warning: "IFNAMSIZ" redefined
In file included from ll_map.c:20:
/usr/include/net/if.h:130:1: warning: this is the location of the previous definition
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ll_map.c:23:
../include/linux/if.h:30:1: warning: "IFF_UP" redefined
In file included from ll_map.c:20:
/usr/include/net/if.h:46:1: warning: this is the location of the previous definition
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ll_map.c:23:
../include/linux/if.h:31:1: warning: "IFF_BROADCAST" redefined
In file included from ll_map.c:20:
/usr/include/net/if.h:48:1: warning: this is the location of the previous definition
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ll_map.c:23:
../include/linux/if.h:32:1: warning: "IFF_DEBUG" redefined
In file included from ll_map.c:20:
/usr/include/net/if.h:50:1: warning: this is the location of the previous definition
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ll_map.c:23:
../include/linux/if.h:33:1: warning: "IFF_LOOPBACK" redefined
In file included from ll_map.c:20:
/usr/include/net/if.h:52:1: warning: this is the location of the previous definition
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ll_map.c:23:
../include/linux/if.h:34:1: warning: "IFF_POINTOPOINT" redefined
In file included from ll_map.c:20:
/usr/include/net/if.h:54:1: warning: this is the location of the previous definition
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ll_map.c:23:
../include/linux/if.h:35:1: warning: "IFF_NOTRAILERS" redefined
In file included from ll_map.c:20:
/usr/include/net/if.h:56:1: warning: this is the location of the previous definition
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ll_map.c:23:
../include/linux/if.h:36:1: warning: "IFF_RUNNING" redefined
In file included from ll_map.c:20:
/usr/include/net/if.h:58:1: warning: this is the location of the previous definition
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ll_map.c:23:
../include/linux/if.h:37:1: warning: "IFF_NOARP" redefined
In file included from ll_map.c:20:
/usr/include/net/if.h:60:1: warning: this is the location of the previous definition
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ll_map.c:23:
../include/linux/if.h:38:1: warning: "IFF_PROMISC" redefined
In file included from ll_map.c:20:
/usr/include/net/if.h:62:1: warning: this is the location of the previous definition
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ll_map.c:23:
../include/linux/if.h:39:1: warning: "IFF_ALLMULTI" redefined
In file included from ll_map.c:20:
/usr/include/net/if.h:66:1: warning: this is the location of the previous definition
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ll_map.c:23:
../include/linux/if.h:41:1: warning: "IFF_MASTER" redefined
In file included from ll_map.c:20:
/usr/include/net/if.h:69:1: warning: this is the location of the previous definition
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ll_map.c:23:
../include/linux/if.h:42:1: warning: "IFF_SLAVE" redefined
In file included from ll_map.c:20:
/usr/include/net/if.h:71:1: warning: this is the location of the previous definition
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ll_map.c:23:
../include/linux/if.h:44:1: warning: "IFF_MULTICAST" redefined
In file included from ll_map.c:20:
/usr/include/net/if.h:74:1: warning: this is the location of the previous definition
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ll_map.c:23:
../include/linux/if.h:46:1: warning: "IFF_PORTSEL" redefined
In file included from ll_map.c:20:
/usr/include/net/if.h:77:1: warning: this is the location of the previous definition
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ll_map.c:23:
../include/linux/if.h:47:1: warning: "IFF_AUTOMEDIA" redefined
In file included from ll_map.c:20:
/usr/include/net/if.h:79:1: warning: this is the location of the previous definition
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ll_map.c:23:
../include/linux/if.h:48:1: warning: "IFF_DYNAMIC" redefined
In file included from ll_map.c:20:
/usr/include/net/if.h:81:1: warning: this is the location of the previous definition
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ll_map.c:23:
../include/linux/if.h:120: error: redefinition of ‘struct ifmap’
../include/linux/if.h:156: error: redefinition of ‘struct ifreq’
../include/linux/if.h:206: error: redefinition of ‘struct ifconf’
ll_map.c: In function ‘ll_remember_index’:
ll_map.c:55: warning: implicit declaration of function ‘IFLA_RTA’
ll_map.c:55: warning: implicit declaration of function ‘IFLA_PAYLOAD’
ll_map.c:55: warning: passing argument 3 of ‘parse_rtattr’ makes pointer from integer without a cast
make[1]: *** [ll_map.o] Error 1
ipaddress.c: In function ‘print_linkinfo’:
ipaddress.c:151: warning: implicit declaration of function ‘IFLA_RTA’
ipaddress.c:151: warning: passing argument 3 of ‘parse_rtattr’ makes pointer from integer without a cast
ipaddress.c: In function ‘print_addrinfo’:
ipaddress.c:285: error: ‘IFA_MAX’ undeclared (first use in this function)
ipaddress.c:285: error: (Each undeclared identifier is reported only once
ipaddress.c:285: error: for each function it appears in.)
ipaddress.c:291: error: dereferencing pointer to incomplete type
ipaddress.c:300: warning: implicit declaration of function ‘IFA_RTA’
ipaddress.c:300: error: dereferencing pointer to incomplete type
ipaddress.c:300: warning: passing argument 3 of ‘parse_rtattr’ makes pointer from integer without a cast
ipaddress.c:302: error: ‘IFA_LOCAL’ undeclared (first use in this function)
ipaddress.c:303: error: ‘IFA_ADDRESS’ undeclared (first use in this function)
ipaddress.c:307: error: dereferencing pointer to incomplete type
ipaddress.c:309: error: dereferencing pointer to incomplete type
ipaddress.c:311: error: dereferencing pointer to incomplete type
ipaddress.c:316: error: ‘IFA_LABEL’ undeclared (first use in this function)
ipaddress.c:319: error: dereferencing pointer to incomplete type
ipaddress.c:327: error: dereferencing pointer to incomplete type
ipaddress.c:334: error: dereferencing pointer to incomplete type
ipaddress.c:358: error: dereferencing pointer to incomplete type
ipaddress.c:358: error: dereferencing pointer to incomplete type
ipaddress.c:359: error: dereferencing pointer to incomplete type
ipaddress.c:361: error: dereferencing pointer to incomplete type
ipaddress.c:363: error: dereferencing pointer to incomplete type
ipaddress.c:365: error: dereferencing pointer to incomplete type
ipaddress.c:368: error: dereferencing pointer to incomplete type
ipaddress.c:371: error: dereferencing pointer to incomplete type
ipaddress.c:378: error: dereferencing pointer to incomplete type
ipaddress.c:381: error: dereferencing pointer to incomplete type
ipaddress.c:385: error: dereferencing pointer to incomplete type
ipaddress.c:389: error: ‘IFA_BROADCAST’ undeclared (first use in this function)
ipaddress.c:391: error: dereferencing pointer to incomplete type
ipaddress.c:396: error: ‘IFA_ANYCAST’ undeclared (first use in this function)
ipaddress.c:398: error: dereferencing pointer to incomplete type
ipaddress.c:403: error: dereferencing pointer to incomplete type
ipaddress.c:404: error: dereferencing pointer to incomplete type
ipaddress.c:404: error: ‘IFA_F_SECONDARY’ undeclared (first use in this function)
ipaddress.c:405: error: dereferencing pointer to incomplete type
ipaddress.c:408: error: dereferencing pointer to incomplete type
ipaddress.c:408: error: ‘IFA_F_TENTATIVE’ undeclared (first use in this function)
ipaddress.c:409: error: dereferencing pointer to incomplete type
ipaddress.c:412: error: dereferencing pointer to incomplete type
ipaddress.c:412: error: ‘IFA_F_DEPRECATED’ undeclared (first use in this function)
ipaddress.c:413: error: dereferencing pointer to incomplete type
ipaddress.c:416: error: dereferencing pointer to incomplete type
ipaddress.c:416: error: ‘IFA_F_PERMANENT’ undeclared (first use in this function)
ipaddress.c:419: error: dereferencing pointer to incomplete type
ipaddress.c:420: error: dereferencing pointer to incomplete type
ipaddress.c:421: error: dereferencing pointer to incomplete type
ipaddress.c:424: error: ‘IFA_CACHEINFO’ undeclared (first use in this function)
ipaddress.c:428: error: dereferencing pointer to incomplete type
ipaddress.c:431: error: dereferencing pointer to incomplete type
ipaddress.c:432: error: dereferencing pointer to incomplete type
ipaddress.c:435: error: dereferencing pointer to incomplete type
ipaddress.c:285: warning: unused variable ‘rta_tb’
ipaddress.c: In function ‘print_selected_addrinfo’:
ipaddress.c:462: error: dereferencing pointer to incomplete type
ipaddress.c:463: error: dereferencing pointer to incomplete type
ipaddress.c: In function ‘ipaddr_list_or_flush’:
ipaddress.c:538: error: ‘IFA_F_PERMANENT’ undeclared (first use in this function)
ipaddress.c:544: error: ‘IFA_F_SECONDARY’ undeclared (first use in this function)
ipaddress.c:550: error: ‘IFA_F_TENTATIVE’ undeclared (first use in this function)
ipaddress.c:553: error: ‘IFA_F_DEPRECATED’ undeclared (first use in this function)
ipaddress.c:655: error: dereferencing pointer to incomplete type
ipaddress.c:656: error: dereferencing pointer to incomplete type
ipaddress.c:658: error: dereferencing pointer to incomplete type
ipaddress.c:660: error: dereferencing pointer to incomplete type
ipaddress.c:663: error: ‘IFA_MAX’ undeclared (first use in this function)
ipaddress.c:664: warning: implicit declaration of function ‘IFA_PAYLOAD’
ipaddress.c:664: warning: passing argument 3 of ‘parse_rtattr’ makes pointer from integer without a cast
ipaddress.c:665: error: ‘IFA_LOCAL’ undeclared (first use in this function)
ipaddress.c:666: error: ‘IFA_ADDRESS’ undeclared (first use in this function)
ipaddress.c:671: error: dereferencing pointer to incomplete type
ipaddress.c:679: error: ‘IFA_LABEL’ undeclared (first use in this function)
ipaddress.c:682: error: dereferencing pointer to incomplete type
ipaddress.c:663: warning: unused variable ‘tb’
ipaddress.c: In function ‘ipaddr_modify’:
ipaddress.c:738: error: field ‘ifa’ has incomplete type
ipaddress.c:754: error: invalid application of ‘sizeof’ to incomplete type ‘struct ifaddrmsg’ 
ipaddress.c:770: error: ‘IFA_ADDRESS’ undeclared (first use in this function)
ipaddress.c:786: error: ‘IFA_BROADCAST’ undeclared (first use in this function)
ipaddress.c:797: error: ‘IFA_ANYCAST’ undeclared (first use in this function)
ipaddress.c:812: error: ‘IFA_LABEL’ undeclared (first use in this function)
ipaddress.c:825: error: ‘IFA_LOCAL’ undeclared (first use in this function)
make[1]: *** [ipaddress.o] Error 1
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ../include/utils.h:7,
                 from tc_filter.c:27:
../include/linux/if.h:26:1: warning: "IFNAMSIZ" redefined
In file included from tc_filter.c:18:
/usr/include/net/if.h:130:1: warning: this is the location of the previous definition
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ../include/utils.h:7,
                 from tc_filter.c:27:
../include/linux/if.h:30:1: warning: "IFF_UP" redefined
In file included from tc_filter.c:18:
/usr/include/net/if.h:46:1: warning: this is the location of the previous definition
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ../include/utils.h:7,
                 from tc_filter.c:27:
../include/linux/if.h:31:1: warning: "IFF_BROADCAST" redefined
In file included from tc_filter.c:18:
/usr/include/net/if.h:48:1: warning: this is the location of the previous definition
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ../include/utils.h:7,
                 from tc_filter.c:27:
../include/linux/if.h:32:1: warning: "IFF_DEBUG" redefined
In file included from tc_filter.c:18:
/usr/include/net/if.h:50:1: warning: this is the location of the previous definition
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ../include/utils.h:7,
                 from tc_filter.c:27:
../include/linux/if.h:33:1: warning: "IFF_LOOPBACK" redefined
In file included from tc_filter.c:18:
/usr/include/net/if.h:52:1: warning: this is the location of the previous definition
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ../include/utils.h:7,
                 from tc_filter.c:27:
../include/linux/if.h:34:1: warning: "IFF_POINTOPOINT" redefined
In file included from tc_filter.c:18:
/usr/include/net/if.h:54:1: warning: this is the location of the previous definition
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ../include/utils.h:7,
                 from tc_filter.c:27:
../include/linux/if.h:35:1: warning: "IFF_NOTRAILERS" redefined
In file included from tc_filter.c:18:
/usr/include/net/if.h:56:1: warning: this is the location of the previous definition
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ../include/utils.h:7,
                 from tc_filter.c:27:
../include/linux/if.h:36:1: warning: "IFF_RUNNING" redefined
In file included from tc_filter.c:18:
/usr/include/net/if.h:58:1: warning: this is the location of the previous definition
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ../include/utils.h:7,
                 from tc_filter.c:27:
../include/linux/if.h:37:1: warning: "IFF_NOARP" redefined
In file included from tc_filter.c:18:
/usr/include/net/if.h:60:1: warning: this is the location of the previous definition
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ../include/utils.h:7,
                 from tc_filter.c:27:
../include/linux/if.h:38:1: warning: "IFF_PROMISC" redefined
In file included from tc_filter.c:18:
/usr/include/net/if.h:62:1: warning: this is the location of the previous definition
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ../include/utils.h:7,
                 from tc_filter.c:27:
../include/linux/if.h:39:1: warning: "IFF_ALLMULTI" redefined
In file included from tc_filter.c:18:
/usr/include/net/if.h:66:1: warning: this is the location of the previous definition
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ../include/utils.h:7,
                 from tc_filter.c:27:
../include/linux/if.h:41:1: warning: "IFF_MASTER" redefined
In file included from tc_filter.c:18:
/usr/include/net/if.h:69:1: warning: this is the location of the previous definition
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ../include/utils.h:7,
                 from tc_filter.c:27:
../include/linux/if.h:42:1: warning: "IFF_SLAVE" redefined
In file included from tc_filter.c:18:
/usr/include/net/if.h:71:1: warning: this is the location of the previous definition
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ../include/utils.h:7,
                 from tc_filter.c:27:
../include/linux/if.h:44:1: warning: "IFF_MULTICAST" redefined
In file included from tc_filter.c:18:
/usr/include/net/if.h:74:1: warning: this is the location of the previous definition
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ../include/utils.h:7,
                 from tc_filter.c:27:
../include/linux/if.h:46:1: warning: "IFF_PORTSEL" redefined
In file included from tc_filter.c:18:
/usr/include/net/if.h:77:1: warning: this is the location of the previous definition
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ../include/utils.h:7,
                 from tc_filter.c:27:
../include/linux/if.h:47:1: warning: "IFF_AUTOMEDIA" redefined
In file included from tc_filter.c:18:
/usr/include/net/if.h:79:1: warning: this is the location of the previous definition
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ../include/utils.h:7,
                 from tc_filter.c:27:
../include/linux/if.h:48:1: warning: "IFF_DYNAMIC" redefined
In file included from tc_filter.c:18:
/usr/include/net/if.h:81:1: warning: this is the location of the previous definition
In file included from ../include/linux/rtnetlink.h:5,
                 from ../include/libnetlink.h:6,
                 from ../include/utils.h:7,
                 from tc_filter.c:27:
../include/linux/if.h:120: error: redefinition of ‘struct ifmap’
../include/linux/if.h:156: error: redefinition of ‘struct ifreq’
../include/linux/if.h:206: error: redefinition of ‘struct ifconf’
make[1]: *** [tc_filter.o] Error 1
/usr/bin/ld: cannot find -lnetlink
collect2: ld returned 1 exit status
make[1]: *** [ss] Error 1
make[1]: *** No rule to make target `../lib/libnetlink.a', needed by `genl'.  Stop.
make: *** [all] Error 2




-- 
Stephen Hemminger <shemminger@osdl.org>

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [GIT PATCH] NET: Fixes for net-2.6.19
  2006-09-28 23:27           ` Stephen Hemminger
@ 2006-09-29  0:28             ` David Miller
  2006-09-29  1:59               ` Masahide NAKAMURA
  0 siblings, 1 reply; 15+ messages in thread
From: David Miller @ 2006-09-29  0:28 UTC (permalink / raw)
  To: shemminger; +Cc: yoshfuji, tgraf, netdev, usagi-core

From: Stephen Hemminger <shemminger@osdl.org>
Date: Thu, 28 Sep 2006 16:27:04 -0700

> It got added by this:
> 
> commit 0844565fb8a9418f5a860aa480c1aef70319c9a2
> Author: Thomas Graf <tgraf@suug.ch>
> Date:   Fri Aug 4 23:05:56 2006 -0700
> 
>     [NET]: Move netlink interface bits to linux/if.h
>     
>     Signed-off-by: Thomas Graf <tgraf@suug.ch>
>     Signed-off-by: David S. Miller <davem@davemloft.net>

Stephen, we just removed the troublesome bits from linux/if.h when I
put in Yoshifuji's patches last night, it should explicitly remove
this problem.

You will thus see that linux/rtnetlink.h no longer includes
linux/if.h, which is why your errors were completely perplexing
to me.  Instead, it includes linux/if_link.h

It's been in my tree since last night, and if you had used
the rtnetlink.h from my current tree you wouldn't have seen
the error.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [GIT PATCH] NET: Fixes for net-2.6.19
  2006-09-29  0:28             ` David Miller
@ 2006-09-29  1:59               ` Masahide NAKAMURA
  2006-09-30  7:27                 ` [IPROUTE2][PATCH] Add missing macros which was removed from kernel header. (Re: [GIT PATCH] NET: Fixes for net-2.6.19) Masahide NAKAMURA
  2006-10-09 16:08                 ` [GIT PATCH] NET: Fixes for net-2.6.19 Stephen Hemminger
  0 siblings, 2 replies; 15+ messages in thread
From: Masahide NAKAMURA @ 2006-09-29  1:59 UTC (permalink / raw)
  To: David Miller, shemminger; +Cc: yoshfuji, tgraf, netdev, usagi-core

David Miller wrote:
>> commit 0844565fb8a9418f5a860aa480c1aef70319c9a2
>> Author: Thomas Graf <tgraf@suug.ch>
>> Date:   Fri Aug 4 23:05:56 2006 -0700
>>
>>     [NET]: Move netlink interface bits to linux/if.h
>>     
>>     Signed-off-by: Thomas Graf <tgraf@suug.ch>
>>     Signed-off-by: David S. Miller <davem@davemloft.net>
> 
> Stephen, we just removed the troublesome bits from linux/if.h when I
> put in Yoshifuji's patches last night, it should explicitly remove
> this problem.
> 
> You will thus see that linux/rtnetlink.h no longer includes
> linux/if.h, which is why your errors were completely perplexing
> to me.  Instead, it includes linux/if_link.h
> 
> It's been in my tree since last night, and if you had used
> the rtnetlink.h from my current tree you wouldn't have seen
> the error.

Yes, as David mentioned you need to copy the latest rtnetlink.h
at first. It is also required to be added if_{link,addr}.h, neighbour.h
to iproute2 tree. Some macros may be needed for libnetlink.h, too.
I'll send the patch to you if you haven't started on it.

Regards,

-- 
Masahide NAKAMURA

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [IPROUTE2][PATCH] Add missing macros which was removed from kernel header. (Re: [GIT PATCH] NET: Fixes for net-2.6.19)
  2006-09-29  1:59               ` Masahide NAKAMURA
@ 2006-09-30  7:27                 ` Masahide NAKAMURA
  2006-10-05 18:01                   ` Stephen Hemminger
  2006-10-09 16:08                 ` [GIT PATCH] NET: Fixes for net-2.6.19 Stephen Hemminger
  1 sibling, 1 reply; 15+ messages in thread
From: Masahide NAKAMURA @ 2006-09-30  7:27 UTC (permalink / raw)
  To: shemminger; +Cc: David Miller, yoshfuji, tgraf, netdev, usagi-core

> David Miller wrote:
> >> commit 0844565fb8a9418f5a860aa480c1aef70319c9a2
> >> Author: Thomas Graf <tgraf@suug.ch>
> >> Date:   Fri Aug 4 23:05:56 2006 -0700
> >>
> >>     [NET]: Move netlink interface bits to linux/if.h
> >>     
> >>     Signed-off-by: Thomas Graf <tgraf@suug.ch>
> >>     Signed-off-by: David S. Miller <davem@davemloft.net>
> > 
> > Stephen, we just removed the troublesome bits from linux/if.h when I
> > put in Yoshifuji's patches last night, it should explicitly remove
> > this problem.
> > 
> > You will thus see that linux/rtnetlink.h no longer includes
> > linux/if.h, which is why your errors were completely perplexing
> > to me.  Instead, it includes linux/if_link.h
> > 
> > It's been in my tree since last night, and if you had used
> > the rtnetlink.h from my current tree you wouldn't have seen
> > the error.
> 
> Yes, as David mentioned you need to copy the latest rtnetlink.h
> at first. It is also required to be added if_{link,addr}.h, neighbour.h
> to iproute2 tree. Some macros may be needed for libnetlink.h, too.
> I'll send the patch to you if you haven't started on it.

Stephen, this patch is for iproute2. Please check and apply it after syncing
kernel headers (e.g. rtnetlink.h) with David's tree. Please also note to add
new ones (i.e. include/linux/{if_link.h,if_addr.h,neighbour.h}) which is
split from rtnetlink.h.


[PATCH] Add missing macros which was removed from kernel header.

{IFA,IFLA,NDA,NDTA}_{RTA,PAYLOAD} macro is removed from kernel
header since net-2.6.19 because it is not used by kernel code.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
---
 include/libnetlink.h |   35 +++++++++++++++++++++++++++++++++++
 1 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/include/libnetlink.h b/include/libnetlink.h
index 63cc3c8..9de3a0b 100644
--- a/include/libnetlink.h
+++ b/include/libnetlink.h
@@ -4,6 +4,9 @@ #define __LIBNETLINK_H__ 1
 #include <asm/types.h>
 #include <linux/netlink.h>
 #include <linux/rtnetlink.h>
+#include <linux/if_link.h>
+#include <linux/if_addr.h>
+#include <linux/neighbour.h>
 
 struct rtnl_handle
 {
@@ -53,5 +56,37 @@ extern int rtnl_from_file(FILE *, rtnl_f
 #define NLMSG_TAIL(nmsg) \
 	((struct rtattr *) (((void *) (nmsg)) + NLMSG_ALIGN((nmsg)->nlmsg_len)))
 
+#ifndef IFA_RTA
+#define IFA_RTA(r) \
+	((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg))))
+#endif
+#ifndef IFA_PAYLOAD
+#define IFA_PAYLOAD(n)	NLMSG_PAYLOAD(n,sizeof(struct ifaddrmsg))
+#endif
+
+#ifndef IFLA_RTA
+#define IFLA_RTA(r) \
+	((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg))))
+#endif
+#ifndef IFLA_PAYLOAD
+#define IFLA_PAYLOAD(n)	NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg))
+#endif
+
+#ifndef NDA_RTA
+#define NDA_RTA(r) \
+	((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ndmsg))))
+#endif
+#ifndef NDA_PAYLOAD
+#define NDA_PAYLOAD(n)	NLMSG_PAYLOAD(n,sizeof(struct ndmsg))
+#endif
+
+#ifndef NDTA_RTA
+#define NDTA_RTA(r) \
+	((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ndtmsg))))
+#endif
+#ifndef NDTA_PAYLOAD
+#define NDTA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ndtmsg))
+#endif
+
 #endif /* __LIBNETLINK_H__ */
 
-- 
1.4.2




-- 
Masahide NAKAMURA

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [IPROUTE2][PATCH] Add missing macros which was removed from kernel header. (Re: [GIT PATCH] NET: Fixes for net-2.6.19)
  2006-09-30  7:27                 ` [IPROUTE2][PATCH] Add missing macros which was removed from kernel header. (Re: [GIT PATCH] NET: Fixes for net-2.6.19) Masahide NAKAMURA
@ 2006-10-05 18:01                   ` Stephen Hemminger
  0 siblings, 0 replies; 15+ messages in thread
From: Stephen Hemminger @ 2006-10-05 18:01 UTC (permalink / raw)
  To: Masahide NAKAMURA; +Cc: David Miller, yoshfuji, tgraf, netdev, usagi-core

I applied a combined patch to fix all the headers to iproute2 (for the future
 2.6.19 based release).

-- 
Stephen Hemminger <shemminger@osdl.org>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [GIT PATCH] NET: Fixes for net-2.6.19
  2006-09-29  1:59               ` Masahide NAKAMURA
  2006-09-30  7:27                 ` [IPROUTE2][PATCH] Add missing macros which was removed from kernel header. (Re: [GIT PATCH] NET: Fixes for net-2.6.19) Masahide NAKAMURA
@ 2006-10-09 16:08                 ` Stephen Hemminger
  1 sibling, 0 replies; 15+ messages in thread
From: Stephen Hemminger @ 2006-10-09 16:08 UTC (permalink / raw)
  To: Masahide NAKAMURA; +Cc: David Miller, yoshfuji, tgraf, netdev, usagi-core

On Fri, 29 Sep 2006 10:59:45 +0900
Masahide NAKAMURA <nakam@linux-ipv6.org> wrote:

> David Miller wrote:
> >> commit 0844565fb8a9418f5a860aa480c1aef70319c9a2
> >> Author: Thomas Graf <tgraf@suug.ch>
> >> Date:   Fri Aug 4 23:05:56 2006 -0700
> >>
> >>     [NET]: Move netlink interface bits to linux/if.h
> >>     
> >>     Signed-off-by: Thomas Graf <tgraf@suug.ch>
> >>     Signed-off-by: David S. Miller <davem@davemloft.net>
> > 
> > Stephen, we just removed the troublesome bits from linux/if.h when I
> > put in Yoshifuji's patches last night, it should explicitly remove
> > this problem.
> > 
> > You will thus see that linux/rtnetlink.h no longer includes
> > linux/if.h, which is why your errors were completely perplexing
> > to me.  Instead, it includes linux/if_link.h
> > 
> > It's been in my tree since last night, and if you had used
> > the rtnetlink.h from my current tree you wouldn't have seen
> > the error.
> 
> Yes, as David mentioned you need to copy the latest rtnetlink.h
> at first. It is also required to be added if_{link,addr}.h, neighbour.h
> to iproute2 tree. Some macros may be needed for libnetlink.h, too.
> I'll send the patch to you if you haven't started on it.
> 
> Regards,
> 

Since the rtnetlink changes for 2.6.19, broke the GLIBC build, I am
going to wait until that gets straightened out first.

-- 
Stephen Hemminger <shemminger@osdl.org>

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2006-10-09 17:10 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-18 15:08 [GIT PATCH] NET: Fixes for net-2.6.19 YOSHIFUJI Hideaki / 吉藤英明
2006-09-18 18:57 ` Thomas Graf
2006-09-21  5:30   ` YOSHIFUJI Hideaki / 吉藤英明
2006-09-21 10:14     ` Thomas Graf
2006-09-28  5:44 ` David Miller
2006-09-28 15:36   ` Stephen Hemminger
2006-09-28 21:33     ` David Miller
2006-09-28 22:50       ` Stephen Hemminger
2006-09-28 23:04         ` David Miller
2006-09-28 23:27           ` Stephen Hemminger
2006-09-29  0:28             ` David Miller
2006-09-29  1:59               ` Masahide NAKAMURA
2006-09-30  7:27                 ` [IPROUTE2][PATCH] Add missing macros which was removed from kernel header. (Re: [GIT PATCH] NET: Fixes for net-2.6.19) Masahide NAKAMURA
2006-10-05 18:01                   ` Stephen Hemminger
2006-10-09 16:08                 ` [GIT PATCH] NET: Fixes for net-2.6.19 Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).