netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* IPv6 MIB:ipv6PrefixTable implementation
@ 2003-11-20  0:21 Shirley Ma
  2003-12-02 12:40 ` kuznet
  2003-12-05 21:51 ` [PATCH] IPv6 MIB:ipv6Prefix netlink notification Shirley Ma
  0 siblings, 2 replies; 27+ messages in thread
From: Shirley Ma @ 2003-11-20  0:21 UTC (permalink / raw)
  To: kuznet, netdev; +Cc: xma

Hi, Alexy,

A while ago, we had a discussion about IPv6 Prefix Table implementation. 
I agree with you it's not necessary to process offlink prefix.

In each ipv6PrefixTable, there are 9 objects, which are Ifindex, Type, Prefix, 
Length, Origin(addrconf, manually, dhcp, others), OnLinkFlag, AutonomoueFlag, 
AdvPreferredLiftTime and ValidLifeTime. 

As we know, the routing table has all on-link prefix routes. But only Prefix,
Length, Ifindex are saved in routing table, the rest objects info are not saved
anywhere.

One implementation detail question, do you think I need to save all the other 
Prefix Objects: Type, Origin(addrconf, manually, dhcp, others), OnLinkFlag, 
AutonomoueFlag, AdvPreferredLiftTime and ValidLifeTime in routing table also?
If so, sounds like I add a big structure in each prefix route entry in the routing table.

Thanks
Shirley Ma

IBM Linux Technology Center
=======================



List:     linux-netdev
Subject:  Re: [Issues] Implementation for IPv6 MIB:ipv6PrefixTable
From:     kuznet () ms2 ! inr ! ac ! ru
Date:     2003-10-24 17:59:27

Hello!

> First, do you think it's a good idea to save all prefix objects in routing
> table?

Those which are on-link, of course.


> Second, where is the best location for the off-link prefix, on-link flag 0
> prefix to be saved?

Do you really think off-link prefixes are to be saved? Prefix in use is onlink
by defintion, so just return 1 in these bit and ignore off-link prefixes
completely, they are meaningless, are not they?


> Third, do you think it's a good idea to implement a prefix table/per
> interface in the kernel?

Well, if SNMP is going to be used as a tool to snoop ndisc promiscuously
(which seems to be the case if it shows inforrmation about offlink prefixes),
then it is definitely not a kernel task.

Alexey

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

* Re: IPv6 MIB:ipv6PrefixTable implementation
  2003-11-20  0:21 IPv6 MIB:ipv6PrefixTable implementation Shirley Ma
@ 2003-12-02 12:40 ` kuznet
  2003-12-05 20:14   ` [PATCH]snmp6 64-bit counter support in proc.c Shirley Ma
  2003-12-05 21:51 ` [PATCH] IPv6 MIB:ipv6Prefix netlink notification Shirley Ma
  1 sibling, 1 reply; 27+ messages in thread
From: kuznet @ 2003-12-02 12:40 UTC (permalink / raw)
  To: Shirley Ma; +Cc: netdev, xma

Hello!

> One implementation detail question, do you think I need to save all the o=
> ther=20
> Prefix Objects: Type, Origin(addrconf, manually, dhcp, others),

These two things should be stored right now. Existing implementation is
quite a mess, but we definitely want to remember origin of each route
in "protocol" and another flags, they are of common interest.


> AutonomoueFlag, AdvPreferredLiftTime and ValidLifeTime

ValidLifeTime is "expires" on this route.

What's about AdvPreferredLiftTime I am puzzled a little,
preferred time is not an attribute of a prefix at all,
it is attribute of address, is not it? Unless the prefix is used
to install local address it does not make sense, right?

Alexey

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

* [PATCH]snmp6 64-bit counter support in proc.c
  2003-12-02 12:40 ` kuznet
@ 2003-12-05 20:14   ` Shirley Ma
  2003-12-05 20:31     ` David S. Miller
  0 siblings, 1 reply; 27+ messages in thread
From: Shirley Ma @ 2003-12-05 20:14 UTC (permalink / raw)
  To: kuznet; +Cc: netdev, xma

[-- Attachment #1: Type: text/plain, Size: 222 bytes --]

I add this because there are some 64-bit counters in the new IPv6 MIBs. 
This patch has been tested agaist linux-2.6.0-test9, and cleanly applied to 
linux-2.6.0-test11.

Thanks
Shirley Ma
IBM Linux Technology Center

[-- Attachment #2: linux-2.6.0-test11-ipv6mib2-64.patch --]
[-- Type: text/x-diff, Size: 3156 bytes --]

diff -urN linux-2.6.0-test11/net/ipv6/proc.c linux-2.6.0-test11-ipv6mib2-64/net/ipv6/proc.c
--- linux-2.6.0-test11/net/ipv6/proc.c	2003-11-26 12:43:38.000000000 -0800
+++ linux-2.6.0-test11-ipv6mib2-64/net/ipv6/proc.c	2003-12-05 12:04:19.000000000 -0800
@@ -60,13 +60,14 @@
 struct snmp6_item
 {
 	char *name;
+	int   size;
 	int   offset;
 };
-#define SNMP6_SENTINEL	{ .name = NULL, .offset = 0 }
+#define SNMP6_SENTINEL	{ .name = NULL, .size = 0, .offset = 0 }
 
 static struct snmp6_item snmp6_ipv6_list[] = {
 /* ipv6 mib according to RFC 2465 */
-#define SNMP6_GEN(x) { .name = #x , .offset = offsetof(struct ipv6_mib, x) }
+#define SNMP6_GEN(x) { .name = #x , .size = sizeof(((struct ipv6_mib *)0)->x), .offset = offsetof(struct ipv6_mib, x) }
 	SNMP6_GEN(Ip6InReceives),
 	SNMP6_GEN(Ip6InHdrErrors),
 	SNMP6_GEN(Ip6InTooBigErrors),
@@ -104,7 +105,7 @@
 		OutRouterAdvertisements too.
 		OutGroupMembQueries too.
  */
-#define SNMP6_GEN(x) { .name = #x , .offset = offsetof(struct icmpv6_mib, x) }
+#define SNMP6_GEN(x) { .name = #x , .size = sizeof(((struct icmpv6_mib *)0)->x), .offset = offsetof(struct icmpv6_mib, x) }
 	SNMP6_GEN(Icmp6InMsgs),
 	SNMP6_GEN(Icmp6InErrors),
 	SNMP6_GEN(Icmp6InDestUnreachs),
@@ -138,7 +139,7 @@
 };
 
 static struct snmp6_item snmp6_udp6_list[] = {
-#define SNMP6_GEN(x) { .name = "Udp6" #x , .offset = offsetof(struct udp_mib, Udp##x) }
+#define SNMP6_GEN(x) { .name = "Udp6" #x , .size = sizeof(((struct udp_mib *)0)->Udp##x), .offset = offsetof(struct udp_mib, Udp##x) }
 	SNMP6_GEN(InDatagrams),
 	SNMP6_GEN(NoPorts),
 	SNMP6_GEN(InErrors),
@@ -147,22 +148,27 @@
 	SNMP6_SENTINEL
 };
 
-static unsigned long
-fold_field(void *mib[], int offt)
+static unsigned long long
+fold_field(void *mib[], int size, int offt)
 {
-        unsigned long res = 0;
+        unsigned long long res = 0;
         int i;
  
         for (i = 0; i < NR_CPUS; i++) {
                 if (!cpu_possible(i))
                         continue;
-                res +=
-                    *((unsigned long *) (((void *)per_cpu_ptr(mib[0], i)) +
-                                         offt));
-                res +=
-                    *((unsigned long *) (((void *)per_cpu_ptr(mib[1], i)) +
-                                         offt));
-        }
+		if (size == 4) {
+			res += *((unsigned long *) 
+				(((void *)per_cpu_ptr(mib[0], i)) + offt));
+			res += *((unsigned long *)
+				(((void *)per_cpu_ptr(mib[1], i)) + offt));
+		} else if (size == 8) {
+			res += *((unsigned long long *) 
+				(((void *)per_cpu_ptr(mib[0], i)) + offt));
+			res += *((unsigned long long *)
+				(((void *)per_cpu_ptr(mib[1], i)) + offt));
+		}
+	}
         return res;
 }
 
@@ -170,9 +176,9 @@
 snmp6_seq_show_item(struct seq_file *seq, void **mib, struct snmp6_item *itemlist)
 {
 	int i;
-	for (i=0; itemlist[i].name; i++)
-		seq_printf(seq, "%-32s\t%lu\n", itemlist[i].name, 
-				fold_field(mib, itemlist[i].offset));
+	for (i=0; itemlist[i].name; i++) 
+		seq_printf(seq, "%-32s\t%llu\n", itemlist[i].name, 
+			fold_field(mib, itemlist[i].size, itemlist[i].offset));
 }
 
 static int snmp6_seq_show(struct seq_file *seq, void *v)

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

* Re: [PATCH]snmp6 64-bit counter support in proc.c
  2003-12-05 20:14   ` [PATCH]snmp6 64-bit counter support in proc.c Shirley Ma
@ 2003-12-05 20:31     ` David S. Miller
  2004-01-14 22:52       ` Shirley Ma
  0 siblings, 1 reply; 27+ messages in thread
From: David S. Miller @ 2003-12-05 20:31 UTC (permalink / raw)
  To: Shirley Ma; +Cc: kuznet, netdev, xma

On Fri, 5 Dec 2003 12:14:47 -0800
Shirley Ma <mashirle@us.ibm.com> wrote:

> I add this because there are some 64-bit counters in the new IPv6 MIBs. 
> This patch has been tested agaist linux-2.6.0-test9, and cleanly applied to 
> linux-2.6.0-test11.

"sizeof(unsigned long)" evaluates to 8 on 64-bit systems,
yet you assume it always evaluated to 4 as on 32-bit systems.

Maybe it would be wiser to explicitly use 'u32' and 'u64' for
the types of the snmp counters?

This has always been a sore area.

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

* [PATCH] IPv6 MIB:ipv6Prefix netlink notification
  2003-11-20  0:21 IPv6 MIB:ipv6PrefixTable implementation Shirley Ma
  2003-12-02 12:40 ` kuznet
@ 2003-12-05 21:51 ` Shirley Ma
  2003-12-05 22:57   ` David S. Miller
  1 sibling, 1 reply; 27+ messages in thread
From: Shirley Ma @ 2003-12-05 21:51 UTC (permalink / raw)
  To: kuznet, netdev; +Cc: xma

[-- Attachment #1: Type: text/plain, Size: 224 bytes --]

Once receiving a router advertisement message for prefix info, 
a netlink notification event will be created.

This patch has been tested against linux-2.6.0-test11. 

Thanks
Shirley Ma
IBM Linux Technology Center


[-- Attachment #2: linux-2.6.0-test11-ipv6mib3.patch --]
[-- Type: text/x-diff, Size: 4590 bytes --]

diff -urN linux-2.6.0-test11/include/linux/rtnetlink.h linux-2.6.0-test11-ipv6mib3/include/linux/rtnetlink.h
--- linux-2.6.0-test11/include/linux/rtnetlink.h	2003-11-26 12:45:11.000000000 -0800
+++ linux-2.6.0-test11-ipv6mib3/include/linux/rtnetlink.h	2003-12-05 12:20:11.000000000 -0800
@@ -44,7 +44,10 @@
 #define	RTM_DELTFILTER	(RTM_BASE+29)
 #define	RTM_GETTFILTER	(RTM_BASE+30)
 
-#define	RTM_MAX		(RTM_BASE+31)
+#define RTM_NEWPREFIX	(RTM_BASE+36)
+#define RTM_GETPREFIX	(RTM_BASE+38)
+
+#define	RTM_MAX		(RTM_BASE+39)
 
 /* 
    Generic structure for encapsulation of optional route information.
@@ -458,6 +461,34 @@
 	unsigned	ifi_change;		/* IFF_* change mask */
 };
 
+/********************************************************************
+ *		prefix information 
+ ****/
+
+struct prefixmsg
+{
+	unsigned char	prefix_family;
+	int		prefix_ifindex;
+	unsigned char	prefix_type;
+	unsigned char	prefix_len;
+	unsigned char	prefix_flags;
+};
+
+enum 
+{
+	PREFIX_UNSPEC,
+	PREFIX_ADDRESS,
+	PREFIX_CACHEINFO,
+};
+
+#define PREFIX_MAX	PREFIX_CACHEINFO
+
+struct prefix_cacheinfo
+{
+	__u32	preferred_time;
+	__u32	valid_time;
+};
+
 /* The struct should be in sync with struct net_device_stats */
 struct rtnl_link_stats
 {
@@ -614,6 +645,8 @@
 #define RTMGRP_DECnet_IFADDR    0x1000
 #define RTMGRP_DECnet_ROUTE     0x4000
 
+#define RTMGRP_IPV6_PREFIX	0x20000
+
 /* End of information exported to user level */
 
 #ifdef __KERNEL__
diff -urN linux-2.6.0-test11/include/net/if_inet6.h linux-2.6.0-test11-ipv6mib3/include/net/if_inet6.h
--- linux-2.6.0-test11/include/net/if_inet6.h	2003-11-26 12:45:45.000000000 -0800
+++ linux-2.6.0-test11-ipv6mib3/include/net/if_inet6.h	2003-12-05 12:20:11.000000000 -0800
@@ -25,6 +25,10 @@
 #define IF_RA_RCVD	0x20
 #define IF_RS_SENT	0x10
 
+/* prefix flags */
+#define IF_PREFIX_ONLINK	0x01
+#define IF_PREFIX_AUTOCONF	0x02
+
 #ifdef __KERNEL__
 
 struct inet6_ifaddr 
diff -urN linux-2.6.0-test11/net/ipv6/addrconf.c linux-2.6.0-test11-ipv6mib3/net/ipv6/addrconf.c
--- linux-2.6.0-test11/net/ipv6/addrconf.c	2003-11-26 12:45:37.000000000 -0800
+++ linux-2.6.0-test11-ipv6mib3/net/ipv6/addrconf.c	2003-12-05 12:21:59.000000000 -0800
@@ -138,6 +138,8 @@
 static void addrconf_rs_timer(unsigned long data);
 static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifa);
 
+static void inet6_prefix_notify(int event, struct inet6_dev *idev, 
+				struct prefix_info *pinfo);
 static int ipv6_chk_same_addr(const struct in6_addr *addr, struct net_device *dev);
 
 static struct notifier_block *inet6addr_chain;
@@ -1491,6 +1493,7 @@
 			addrconf_verify(0);
 		}
 	}
+	inet6_prefix_notify(RTM_NEWPREFIX, in6_dev, pinfo);
 	in6_dev_put(in6_dev);
 }
 
@@ -2751,6 +2754,66 @@
 	return skb->len;
 }
 
+static int inet6_fill_prefix(struct sk_buff *skb, struct inet6_dev *idev,
+			struct prefix_info *pinfo, u32 pid, u32 seq, int event)
+{
+	struct prefixmsg	*pmsg;
+	struct nlmsghdr 	*nlh;
+	unsigned char		*b = skb->tail;
+	struct prefix_cacheinfo	ci;
+
+	nlh = NLMSG_PUT(skb, pid, seq, event, sizeof(*pmsg));
+	
+	if (pid) 
+		nlh->nlmsg_flags |= NLM_F_MULTI;
+	
+	pmsg = NLMSG_DATA(nlh);
+	pmsg->prefix_family = AF_INET6;
+	pmsg->prefix_ifindex = idev->dev->ifindex;
+	pmsg->prefix_len = pinfo->prefix_len;
+	pmsg->prefix_type = pinfo->type;
+	
+	pmsg->prefix_flags = 0;
+	if (pinfo->onlink)
+		pmsg->prefix_flags |= IF_PREFIX_ONLINK;
+	if (pinfo->autoconf)
+		pmsg->prefix_flags |= IF_PREFIX_AUTOCONF;
+
+	RTA_PUT(skb, PREFIX_ADDRESS, sizeof(pinfo->prefix), &pinfo->prefix);
+
+	ci.preferred_time = ntohl(pinfo->prefered);
+	ci.valid_time = ntohl(pinfo->valid);
+	RTA_PUT(skb, PREFIX_CACHEINFO, sizeof(ci), &ci);
+
+	nlh->nlmsg_len = skb->tail - b;
+	return skb->len;
+
+nlmsg_failure:
+rtattr_failure:
+	skb_trim(skb, b - skb->data);
+	return -1;
+}
+
+static void inet6_prefix_notify(int event, struct inet6_dev *idev, 
+			 struct prefix_info *pinfo)
+{
+	struct sk_buff *skb;
+	int size = NLMSG_SPACE(sizeof(struct prefixmsg)+128);
+
+	skb = alloc_skb(size, GFP_ATOMIC);
+	if (!skb) {
+		netlink_set_err(rtnl, 0, RTMGRP_IPV6_PREFIX, ENOBUFS);
+		return;
+	}
+	if (inet6_fill_prefix(skb, idev, pinfo, 0, 0, event) < 0) {
+		kfree_skb(skb);
+		netlink_set_err(rtnl, 0, RTMGRP_IPV6_PREFIX, EINVAL);
+		return;
+	}
+	NETLINK_CB(skb).dst_groups = RTMGRP_IPV6_PREFIX;
+	netlink_broadcast(rtnl, skb, 0, RTMGRP_IPV6_PREFIX, GFP_ATOMIC);
+}
+
 static struct rtnetlink_link inet6_rtnetlink_table[RTM_MAX - RTM_BASE + 1] = {
 	[RTM_GETLINK - RTM_BASE] = { .dumpit	= inet6_dump_ifinfo, },
 	[RTM_NEWADDR - RTM_BASE] = { .doit	= inet6_rtm_newaddr, },

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

* Re: [PATCH] IPv6 MIB:ipv6Prefix netlink notification
  2003-12-05 21:51 ` [PATCH] IPv6 MIB:ipv6Prefix netlink notification Shirley Ma
@ 2003-12-05 22:57   ` David S. Miller
  2004-01-14 22:54     ` Shirley Ma
                       ` (3 more replies)
  0 siblings, 4 replies; 27+ messages in thread
From: David S. Miller @ 2003-12-05 22:57 UTC (permalink / raw)
  To: Shirley Ma; +Cc: kuznet, netdev, xma

On Fri, 5 Dec 2003 13:51:47 -0800
Shirley Ma <mashirle@us.ibm.com> wrote:

> Once receiving a router advertisement message for prefix info, 
> a netlink notification event will be created.
> 
> This patch has been tested against linux-2.6.0-test11. 

Let's queue this up for 2.6.1, please resend it after 2.6.0 is
released.

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

* Re: [PATCH]snmp6 64-bit counter support in proc.c
  2003-12-05 20:31     ` David S. Miller
@ 2004-01-14 22:52       ` Shirley Ma
  2004-01-15  8:57         ` David S. Miller
  0 siblings, 1 reply; 27+ messages in thread
From: Shirley Ma @ 2004-01-14 22:52 UTC (permalink / raw)
  To: David S. Miller; +Cc: kuznet, netdev, xma

[-- Attachment #1: Type: text/plain, Size: 365 bytes --]

> "sizeof(unsigned long)" evaluates to 8 on 64-bit systems,
> yet you assume it always evaluated to 4 as on 32-bit systems.
>
> Maybe it would be wiser to explicitly use 'u32' and 'u64' for
> the types of the snmp counters?
>
> This has always been a sore area.

This is the new patch against 2.6.1 kernel.

Thanks
Shirley Ma
IBM Linux Technology Center

[-- Attachment #2: linux-2.6.1-ipv6mib2-64.patch --]
[-- Type: text/x-diff, Size: 20376 bytes --]

diff -urN linux-2.6.1/include/net/snmp.h linux-2.6.1-ipv6mib2-64/include/net/snmp.h
--- linux-2.6.1/include/net/snmp.h	2004-01-08 22:59:26.000000000 -0800
+++ linux-2.6.1-ipv6mib2-64/include/net/snmp.h	2004-01-13 13:45:23.000000000 -0800
@@ -49,24 +49,24 @@
  */
 struct ip_mib
 {
- 	unsigned long	IpInReceives;
- 	unsigned long	IpInHdrErrors;
- 	unsigned long	IpInAddrErrors;
- 	unsigned long	IpForwDatagrams;
- 	unsigned long	IpInUnknownProtos;
- 	unsigned long	IpInDiscards;
- 	unsigned long	IpInDelivers;
- 	unsigned long	IpOutRequests;
- 	unsigned long	IpOutDiscards;
- 	unsigned long	IpOutNoRoutes;
- 	unsigned long	IpReasmTimeout;
- 	unsigned long	IpReasmReqds;
- 	unsigned long	IpReasmOKs;
- 	unsigned long	IpReasmFails;
- 	unsigned long	IpFragOKs;
- 	unsigned long	IpFragFails;
- 	unsigned long	IpFragCreates;
-	unsigned long   __pad[0]; 
+ 	__u64	IpInReceives;
+ 	__u64	IpInHdrErrors;
+ 	__u64	IpInAddrErrors;
+ 	__u64	IpForwDatagrams;
+ 	__u64	IpInUnknownProtos;
+ 	__u64	IpInDiscards;
+ 	__u64	IpInDelivers;
+ 	__u64	IpOutRequests;
+ 	__u64	IpOutDiscards;
+ 	__u64	IpOutNoRoutes;
+ 	__u64	IpReasmTimeout;
+ 	__u64	IpReasmReqds;
+ 	__u64	IpReasmOKs;
+ 	__u64	IpReasmFails;
+ 	__u64	IpFragOKs;
+ 	__u64	IpFragFails;
+ 	__u64	IpFragCreates;
+	__u64   __pad[0]; 
 };
  
 /*
@@ -74,29 +74,29 @@
  */
 struct ipv6_mib
 {
-	unsigned long	Ip6InReceives;
- 	unsigned long	Ip6InHdrErrors;
- 	unsigned long	Ip6InTooBigErrors;
- 	unsigned long	Ip6InNoRoutes;
- 	unsigned long	Ip6InAddrErrors;
- 	unsigned long	Ip6InUnknownProtos;
- 	unsigned long	Ip6InTruncatedPkts;
- 	unsigned long	Ip6InDiscards;
- 	unsigned long	Ip6InDelivers;
- 	unsigned long	Ip6OutForwDatagrams;
- 	unsigned long	Ip6OutRequests;
- 	unsigned long	Ip6OutDiscards;
- 	unsigned long	Ip6OutNoRoutes;
- 	unsigned long	Ip6ReasmTimeout;
- 	unsigned long	Ip6ReasmReqds;
- 	unsigned long	Ip6ReasmOKs;
- 	unsigned long	Ip6ReasmFails;
- 	unsigned long	Ip6FragOKs;
- 	unsigned long	Ip6FragFails;
- 	unsigned long	Ip6FragCreates;
- 	unsigned long	Ip6InMcastPkts;
- 	unsigned long	Ip6OutMcastPkts;
-	unsigned long   __pad[0]; 
+	__u64	Ip6InReceives;
+ 	__u64	Ip6InHdrErrors;
+ 	__u64	Ip6InTooBigErrors;
+ 	__u64	Ip6InNoRoutes;
+ 	__u64	Ip6InAddrErrors;
+ 	__u64	Ip6InUnknownProtos;
+ 	__u64	Ip6InTruncatedPkts;
+ 	__u64	Ip6InDiscards;
+ 	__u64	Ip6InDelivers;
+ 	__u64	Ip6OutForwDatagrams;
+ 	__u64	Ip6OutRequests;
+ 	__u64	Ip6OutDiscards;
+ 	__u64	Ip6OutNoRoutes;
+ 	__u64	Ip6ReasmTimeout;
+ 	__u64	Ip6ReasmReqds;
+ 	__u64	Ip6ReasmOKs;
+ 	__u64	Ip6ReasmFails;
+ 	__u64	Ip6FragOKs;
+ 	__u64	Ip6FragFails;
+ 	__u64	Ip6FragCreates;
+ 	__u64	Ip6InMcastPkts;
+ 	__u64	Ip6OutMcastPkts;
+	__u64   __pad[0]; 
 };
  
 /*
@@ -105,34 +105,34 @@
  */
 struct icmp_mib
 {
- 	unsigned long	IcmpInMsgs;
- 	unsigned long	IcmpInErrors;
-  	unsigned long	IcmpInDestUnreachs;
- 	unsigned long	IcmpInTimeExcds;
- 	unsigned long	IcmpInParmProbs;
- 	unsigned long	IcmpInSrcQuenchs;
- 	unsigned long	IcmpInRedirects;
- 	unsigned long	IcmpInEchos;
- 	unsigned long	IcmpInEchoReps;
- 	unsigned long	IcmpInTimestamps;
- 	unsigned long	IcmpInTimestampReps;
- 	unsigned long	IcmpInAddrMasks;
- 	unsigned long	IcmpInAddrMaskReps;
- 	unsigned long	IcmpOutMsgs;
- 	unsigned long	IcmpOutErrors;
- 	unsigned long	IcmpOutDestUnreachs;
- 	unsigned long	IcmpOutTimeExcds;
- 	unsigned long	IcmpOutParmProbs;
- 	unsigned long	IcmpOutSrcQuenchs;
- 	unsigned long	IcmpOutRedirects;
- 	unsigned long	IcmpOutEchos;
- 	unsigned long	IcmpOutEchoReps;
- 	unsigned long	IcmpOutTimestamps;
- 	unsigned long	IcmpOutTimestampReps;
- 	unsigned long	IcmpOutAddrMasks;
- 	unsigned long	IcmpOutAddrMaskReps;
-	unsigned long	dummy;
-	unsigned long   __pad[0]; 
+ 	__u64	IcmpInMsgs;
+ 	__u64	IcmpInErrors;
+  	__u64	IcmpInDestUnreachs;
+ 	__u64	IcmpInTimeExcds;
+ 	__u64	IcmpInParmProbs;
+ 	__u64	IcmpInSrcQuenchs;
+ 	__u64	IcmpInRedirects;
+ 	__u64	IcmpInEchos;
+ 	__u64	IcmpInEchoReps;
+ 	__u64	IcmpInTimestamps;
+ 	__u64	IcmpInTimestampReps;
+ 	__u64	IcmpInAddrMasks;
+ 	__u64	IcmpInAddrMaskReps;
+ 	__u64	IcmpOutMsgs;
+ 	__u64	IcmpOutErrors;
+ 	__u64	IcmpOutDestUnreachs;
+ 	__u64	IcmpOutTimeExcds;
+ 	__u64	IcmpOutParmProbs;
+ 	__u64	IcmpOutSrcQuenchs;
+ 	__u64	IcmpOutRedirects;
+ 	__u64	IcmpOutEchos;
+ 	__u64	IcmpOutEchoReps;
+ 	__u64	IcmpOutTimestamps;
+ 	__u64	IcmpOutTimestampReps;
+ 	__u64	IcmpOutAddrMasks;
+ 	__u64	IcmpOutAddrMaskReps;
+	__u64	dummy;
+	__u64	__pad[0]; 
 };
 
 /*
@@ -140,40 +140,35 @@
  */
 struct icmpv6_mib
 {
-	unsigned long	Icmp6InMsgs;
-	unsigned long	Icmp6InErrors;
-
-	unsigned long	Icmp6InDestUnreachs;
-	unsigned long	Icmp6InPktTooBigs;
-	unsigned long	Icmp6InTimeExcds;
-	unsigned long	Icmp6InParmProblems;
-
-	unsigned long	Icmp6InEchos;
-	unsigned long	Icmp6InEchoReplies;
-	unsigned long	Icmp6InGroupMembQueries;
-	unsigned long	Icmp6InGroupMembResponses;
-	unsigned long	Icmp6InGroupMembReductions;
-	unsigned long	Icmp6InRouterSolicits;
-	unsigned long	Icmp6InRouterAdvertisements;
-	unsigned long	Icmp6InNeighborSolicits;
-	unsigned long	Icmp6InNeighborAdvertisements;
-	unsigned long	Icmp6InRedirects;
-
-	unsigned long	Icmp6OutMsgs;
-
-	unsigned long	Icmp6OutDestUnreachs;
-	unsigned long	Icmp6OutPktTooBigs;
-	unsigned long	Icmp6OutTimeExcds;
-	unsigned long	Icmp6OutParmProblems;
-
-	unsigned long	Icmp6OutEchoReplies;
-	unsigned long	Icmp6OutRouterSolicits;
-	unsigned long	Icmp6OutNeighborSolicits;
-	unsigned long	Icmp6OutNeighborAdvertisements;
-	unsigned long	Icmp6OutRedirects;
-	unsigned long	Icmp6OutGroupMembResponses;
-	unsigned long	Icmp6OutGroupMembReductions;
-	unsigned long   __pad[0]; 
+	__u64	Icmp6InMsgs;
+	__u64	Icmp6InErrors;
+	__u64	Icmp6InDestUnreachs;
+	__u64	Icmp6InPktTooBigs;
+	__u64	Icmp6InTimeExcds;
+	__u64	Icmp6InParmProblems;
+	__u64	Icmp6InEchos;
+	__u64	Icmp6InEchoReplies;
+	__u64	Icmp6InGroupMembQueries;
+	__u64	Icmp6InGroupMembResponses;
+	__u64	Icmp6InGroupMembReductions;
+	__u64	Icmp6InRouterSolicits;
+	__u64	Icmp6InRouterAdvertisements;
+	__u64	Icmp6InNeighborSolicits;
+	__u64	Icmp6InNeighborAdvertisements;
+	__u64	Icmp6InRedirects;
+	__u64	Icmp6OutMsgs;
+	__u64	Icmp6OutDestUnreachs;
+	__u64	Icmp6OutPktTooBigs;
+	__u64	Icmp6OutTimeExcds;
+	__u64	Icmp6OutParmProblems;
+	__u64	Icmp6OutEchoReplies;
+	__u64	Icmp6OutRouterSolicits;
+	__u64	Icmp6OutNeighborSolicits;
+	__u64	Icmp6OutNeighborAdvertisements;
+	__u64	Icmp6OutRedirects;
+	__u64	Icmp6OutGroupMembResponses;
+	__u64	Icmp6OutGroupMembReductions;
+	__u64   __pad[0]; 
 };
  
 /*
@@ -182,21 +177,21 @@
  */
 struct tcp_mib
 {
- 	unsigned long	TcpRtoAlgorithm;
- 	unsigned long	TcpRtoMin;
- 	unsigned long	TcpRtoMax;
- 	unsigned long	TcpMaxConn;
- 	unsigned long	TcpActiveOpens;
- 	unsigned long	TcpPassiveOpens;
- 	unsigned long	TcpAttemptFails;
- 	unsigned long	TcpEstabResets;
- 	unsigned long	TcpCurrEstab;
- 	unsigned long	TcpInSegs;
- 	unsigned long	TcpOutSegs;
- 	unsigned long	TcpRetransSegs;
- 	unsigned long	TcpInErrs;
- 	unsigned long	TcpOutRsts;
-	unsigned long   __pad[0]; 
+ 	__u64	TcpRtoAlgorithm;
+ 	__u64	TcpRtoMin;
+ 	__u64	TcpRtoMax;
+ 	__u64	TcpMaxConn;
+ 	__u64	TcpActiveOpens;
+ 	__u64	TcpPassiveOpens;
+ 	__u64	TcpAttemptFails;
+ 	__u64	TcpEstabResets;
+ 	__u64	TcpCurrEstab;
+ 	__u64	TcpInSegs;
+ 	__u64	TcpOutSegs;
+ 	__u64	TcpRetransSegs;
+ 	__u64	TcpInErrs;
+ 	__u64	TcpOutRsts;
+	__u64   __pad[0]; 
 };
  
 /*
@@ -205,110 +200,110 @@
  */
 struct udp_mib
 {
- 	unsigned long	UdpInDatagrams;
- 	unsigned long	UdpNoPorts;
- 	unsigned long	UdpInErrors;
- 	unsigned long	UdpOutDatagrams;
-	unsigned long   __pad[0];
+ 	__u64	UdpInDatagrams;
+ 	__u64	UdpNoPorts;
+ 	__u64	UdpInErrors;
+ 	__u64	UdpOutDatagrams;
+	__u64   __pad[0];
 }; 
 
 /* draft-ietf-sigtran-sctp-mib-07.txt */
 struct sctp_mib
 {
-	unsigned long   SctpCurrEstab;
-	unsigned long   SctpActiveEstabs;
-	unsigned long   SctpPassiveEstabs;
-	unsigned long   SctpAborteds;
-	unsigned long   SctpShutdowns;
-	unsigned long   SctpOutOfBlues;
-	unsigned long   SctpChecksumErrors;
-	unsigned long   SctpOutCtrlChunks;
-	unsigned long   SctpOutOrderChunks;
-	unsigned long   SctpOutUnorderChunks;
-	unsigned long   SctpInCtrlChunks;
-	unsigned long   SctpInOrderChunks;
-	unsigned long   SctpInUnorderChunks;
-	unsigned long   SctpFragUsrMsgs;
-	unsigned long   SctpReasmUsrMsgs;
-	unsigned long   SctpOutSCTPPacks;
-	unsigned long   SctpInSCTPPacks;
-	unsigned long   SctpRtoAlgorithm;
-	unsigned long   SctpRtoMin;
-	unsigned long   SctpRtoMax;
-	unsigned long   SctpRtoInitial;
-	unsigned long   SctpValCookieLife;
-	unsigned long   SctpMaxInitRetr;
-	unsigned long   __pad[0];
+	__u64   SctpCurrEstab;
+	__u64   SctpActiveEstabs;
+	__u64   SctpPassiveEstabs;
+	__u64   SctpAborteds;
+	__u64   SctpShutdowns;
+	__u64   SctpOutOfBlues;
+	__u64   SctpChecksumErrors;
+	__u64   SctpOutCtrlChunks;
+	__u64   SctpOutOrderChunks;
+	__u64   SctpOutUnorderChunks;
+	__u64   SctpInCtrlChunks;
+	__u64   SctpInOrderChunks;
+	__u64   SctpInUnorderChunks;
+	__u64   SctpFragUsrMsgs;
+	__u64   SctpReasmUsrMsgs;
+	__u64   SctpOutSCTPPacks;
+	__u64   SctpInSCTPPacks;
+	__u64   SctpRtoAlgorithm;
+	__u64   SctpRtoMin;
+	__u64   SctpRtoMax;
+	__u64   SctpRtoInitial;
+	__u64   SctpValCookieLife;
+	__u64   SctpMaxInitRetr;
+	__u64   __pad[0];
 };
 
 struct linux_mib 
 {
-	unsigned long	SyncookiesSent;
-	unsigned long	SyncookiesRecv;
-	unsigned long	SyncookiesFailed;
-	unsigned long	EmbryonicRsts;
-	unsigned long	PruneCalled; 
-	unsigned long	RcvPruned;
-	unsigned long	OfoPruned;
-	unsigned long	OutOfWindowIcmps; 
-	unsigned long	LockDroppedIcmps; 
-        unsigned long   ArpFilter;
-	unsigned long	TimeWaited; 
-	unsigned long	TimeWaitRecycled; 
-	unsigned long	TimeWaitKilled; 
-	unsigned long	PAWSPassiveRejected; 
-	unsigned long	PAWSActiveRejected; 
-	unsigned long	PAWSEstabRejected; 
-	unsigned long	DelayedACKs;
-	unsigned long	DelayedACKLocked;
-	unsigned long	DelayedACKLost;
-	unsigned long	ListenOverflows;
-	unsigned long	ListenDrops;
-	unsigned long	TCPPrequeued;
-	unsigned long	TCPDirectCopyFromBacklog;
-	unsigned long	TCPDirectCopyFromPrequeue;
-	unsigned long	TCPPrequeueDropped;
-	unsigned long	TCPHPHits;
-	unsigned long	TCPHPHitsToUser;
-	unsigned long	TCPPureAcks;
-	unsigned long	TCPHPAcks;
-	unsigned long	TCPRenoRecovery;
-	unsigned long	TCPSackRecovery;
-	unsigned long	TCPSACKReneging;
-	unsigned long	TCPFACKReorder;
-	unsigned long	TCPSACKReorder;
-	unsigned long	TCPRenoReorder;
-	unsigned long	TCPTSReorder;
-	unsigned long	TCPFullUndo;
-	unsigned long	TCPPartialUndo;
-	unsigned long	TCPDSACKUndo;
-	unsigned long	TCPLossUndo;
-	unsigned long	TCPLoss;
-	unsigned long	TCPLostRetransmit;
-	unsigned long	TCPRenoFailures;
-	unsigned long	TCPSackFailures;
-	unsigned long	TCPLossFailures;
-	unsigned long	TCPFastRetrans;
-	unsigned long	TCPForwardRetrans;
-	unsigned long	TCPSlowStartRetrans;
-	unsigned long	TCPTimeouts;
-	unsigned long	TCPRenoRecoveryFail;
-	unsigned long	TCPSackRecoveryFail;
-	unsigned long	TCPSchedulerFailed;
-	unsigned long	TCPRcvCollapsed;
-	unsigned long	TCPDSACKOldSent;
-	unsigned long	TCPDSACKOfoSent;
-	unsigned long	TCPDSACKRecv;
-	unsigned long	TCPDSACKOfoRecv;
-	unsigned long	TCPAbortOnSyn;
-	unsigned long	TCPAbortOnData;
-	unsigned long	TCPAbortOnClose;
-	unsigned long	TCPAbortOnMemory;
-	unsigned long	TCPAbortOnTimeout;
-	unsigned long	TCPAbortOnLinger;
-	unsigned long	TCPAbortFailed;
-	unsigned long	TCPMemoryPressures;
-	unsigned long   __pad[0];
+	__u64	SyncookiesSent;
+	__u64	SyncookiesRecv;
+	__u64	SyncookiesFailed;
+	__u64	EmbryonicRsts;
+	__u64	PruneCalled; 
+	__u64	RcvPruned;
+	__u64	OfoPruned;
+	__u64	OutOfWindowIcmps; 
+	__u64	LockDroppedIcmps; 
+	__u64   ArpFilter;
+	__u64	TimeWaited; 
+	__u64	TimeWaitRecycled; 
+	__u64	TimeWaitKilled; 
+	__u64	PAWSPassiveRejected; 
+	__u64	PAWSActiveRejected; 
+	__u64	PAWSEstabRejected; 
+	__u64	DelayedACKs;
+	__u64	DelayedACKLocked;
+	__u64	DelayedACKLost;
+	__u64	ListenOverflows;
+	__u64	ListenDrops;
+	__u64	TCPPrequeued;
+	__u64	TCPDirectCopyFromBacklog;
+	__u64	TCPDirectCopyFromPrequeue;
+	__u64	TCPPrequeueDropped;
+	__u64	TCPHPHits;
+	__u64	TCPHPHitsToUser;
+	__u64	TCPPureAcks;
+	__u64	TCPHPAcks;
+	__u64	TCPRenoRecovery;
+	__u64	TCPSackRecovery;
+	__u64	TCPSACKReneging;
+	__u64	TCPFACKReorder;
+	__u64	TCPSACKReorder;
+	__u64	TCPRenoReorder;
+	__u64	TCPTSReorder;
+	__u64	TCPFullUndo;
+	__u64	TCPPartialUndo;
+	__u64	TCPDSACKUndo;
+	__u64	TCPLossUndo;
+	__u64	TCPLoss;
+	__u64	TCPLostRetransmit;
+	__u64	TCPRenoFailures;
+	__u64	TCPSackFailures;
+	__u64	TCPLossFailures;
+	__u64	TCPFastRetrans;
+	__u64	TCPForwardRetrans;
+	__u64	TCPSlowStartRetrans;
+	__u64	TCPTimeouts;
+	__u64	TCPRenoRecoveryFail;
+	__u64	TCPSackRecoveryFail;
+	__u64	TCPSchedulerFailed;
+	__u64	TCPRcvCollapsed;
+	__u64	TCPDSACKOldSent;
+	__u64	TCPDSACKOfoSent;
+	__u64	TCPDSACKRecv;
+	__u64	TCPDSACKOfoRecv;
+	__u64	TCPAbortOnSyn;
+	__u64	TCPAbortOnData;
+	__u64	TCPAbortOnClose;
+	__u64	TCPAbortOnMemory;
+	__u64	TCPAbortOnTimeout;
+	__u64	TCPAbortOnLinger;
+	__u64	TCPAbortFailed;
+	__u64	TCPMemoryPressures;
+	__u64   __pad[0];
 };
 
 
diff -urN linux-2.6.1/net/ipv4/proc.c linux-2.6.1-ipv6mib2-64/net/ipv4/proc.c
--- linux-2.6.1/net/ipv4/proc.c	2004-01-08 22:59:05.000000000 -0800
+++ linux-2.6.1-ipv6mib2-64/net/ipv4/proc.c	2004-01-13 14:06:51.000000000 -0800
@@ -87,21 +87,21 @@
 	.release = single_release,
 };
 
-static unsigned long
+static __u64 
 fold_field(void *mib[], int nr)
 {
-	unsigned long res = 0;
+	__u64 res = 0;
 	int i;
 
 	for (i = 0; i < NR_CPUS; i++) {
 		if (!cpu_possible(i))
 			continue;
 		res +=
-		    *((unsigned long *) (((void *) per_cpu_ptr(mib[0], i)) +
-					 sizeof (unsigned long) * nr));
+		    *((__u64 *) (((void *) per_cpu_ptr(mib[0], i)) +
+					 sizeof (__u64) * nr));
 		res +=
-		    *((unsigned long *) (((void *) per_cpu_ptr(mib[1], i)) +
-					 sizeof (unsigned long) * nr));
+		    *((__u64 *) (((void *) per_cpu_ptr(mib[1], i)) +
+					 sizeof (__u64) * nr));
 	}
 	return res;
 }
@@ -121,8 +121,8 @@
 			ipv4_devconf.forwarding ? 1 : 2, sysctl_ip_default_ttl);
 
 	for (i = 0;
-	     i < offsetof(struct ip_mib, __pad) / sizeof(unsigned long); i++)
-		seq_printf(seq, " %lu",
+	     i < offsetof(struct ip_mib, __pad) / sizeof(__u64); i++)
+		seq_printf(seq, " %llu",
 			   fold_field((void **) ip_statistics, i));
 
 	seq_printf(seq, "\nIcmp: InMsgs InErrors InDestUnreachs InTimeExcds "
@@ -134,8 +134,8 @@
 			"OutAddrMasks OutAddrMaskReps\nIcmp:");
 
 	for (i = 0;
-	     i < offsetof(struct icmp_mib, dummy) / sizeof(unsigned long); i++)
-		seq_printf(seq, " %lu",
+	     i < offsetof(struct icmp_mib, dummy) / sizeof(__u64); i++)
+		seq_printf(seq, " %llu",
 			   fold_field((void **) icmp_statistics, i)); 
 
 	seq_printf(seq, "\nTcp: RtoAlgorithm RtoMin RtoMax MaxConn ActiveOpens "
@@ -143,13 +143,13 @@
 			"InSegs OutSegs RetransSegs InErrs OutRsts\nTcp:");
 
 	for (i = 0;
-	     i < offsetof(struct tcp_mib, __pad) / sizeof(unsigned long); i++) {
-		if (i == (offsetof(struct tcp_mib, TcpMaxConn) / sizeof(unsigned long)))
+	     i < offsetof(struct tcp_mib, __pad) / sizeof(__u64); i++) {
+		if (i == (offsetof(struct tcp_mib, TcpMaxConn) / sizeof(__u64)))
 			/* MaxConn field is negative, RFC 2012 */
 			seq_printf(seq, " %ld", 
-				   fold_field((void **) tcp_statistics, i));
+				  (long int)fold_field((void **) tcp_statistics, i));
 		else
-			seq_printf(seq, " %lu", 
+			seq_printf(seq, " %llu", 
 				   fold_field((void **) tcp_statistics, i));
 	}
 
@@ -157,8 +157,8 @@
 			"Udp:");
 
 	for (i = 0;
-	     i < offsetof(struct udp_mib, __pad) / sizeof(unsigned long); i++)
-		seq_printf(seq, " %lu", 
+	     i < offsetof(struct udp_mib, __pad) / sizeof(__u64); i++)
+		seq_printf(seq, " %llu", 
 				fold_field((void **) udp_statistics, i));
 
 	seq_putc(seq, '\n');
@@ -214,9 +214,9 @@
 		      " TCPAbortFailed TCPMemoryPressures\n"
 		      "TcpExt:");
 	for (i = 0;
-	     i < offsetof(struct linux_mib, __pad) / sizeof(unsigned long); 
+	     i < offsetof(struct linux_mib, __pad) / sizeof(__u64); 
 	     i++)
-		seq_printf(seq, " %lu", 
+		seq_printf(seq, " %llu", 
 		 	   fold_field((void **) net_statistics, i)); 
 	seq_putc(seq, '\n');
 	return 0;
diff -urN linux-2.6.1/net/ipv6/proc.c linux-2.6.1-ipv6mib2-64/net/ipv6/proc.c
--- linux-2.6.1/net/ipv6/proc.c	2004-01-08 22:59:26.000000000 -0800
+++ linux-2.6.1-ipv6mib2-64/net/ipv6/proc.c	2004-01-12 16:21:43.000000000 -0800
@@ -60,13 +60,14 @@
 struct snmp6_item
 {
 	char *name;
+	int   size;
 	int   offset;
 };
-#define SNMP6_SENTINEL	{ .name = NULL, .offset = 0 }
+#define SNMP6_SENTINEL	{ .name = NULL, .size = 0, .offset = 0 }
 
 static struct snmp6_item snmp6_ipv6_list[] = {
 /* ipv6 mib according to RFC 2465 */
-#define SNMP6_GEN(x) { .name = #x , .offset = offsetof(struct ipv6_mib, x) }
+#define SNMP6_GEN(x) { .name = #x , .size = sizeof(((struct ipv6_mib *)0)->x), .offset = offsetof(struct ipv6_mib, x) }
 	SNMP6_GEN(Ip6InReceives),
 	SNMP6_GEN(Ip6InHdrErrors),
 	SNMP6_GEN(Ip6InTooBigErrors),
@@ -104,7 +105,7 @@
 		OutRouterAdvertisements too.
 		OutGroupMembQueries too.
  */
-#define SNMP6_GEN(x) { .name = #x , .offset = offsetof(struct icmpv6_mib, x) }
+#define SNMP6_GEN(x) { .name = #x , .size = sizeof(((struct icmpv6_mib *)0)->x), .offset = offsetof(struct icmpv6_mib, x) }
 	SNMP6_GEN(Icmp6InMsgs),
 	SNMP6_GEN(Icmp6InErrors),
 	SNMP6_GEN(Icmp6InDestUnreachs),
@@ -138,7 +139,7 @@
 };
 
 static struct snmp6_item snmp6_udp6_list[] = {
-#define SNMP6_GEN(x) { .name = "Udp6" #x , .offset = offsetof(struct udp_mib, Udp##x) }
+#define SNMP6_GEN(x) { .name = "Udp6" #x , .size = sizeof(((struct udp_mib *)0)->Udp##x), .offset = offsetof(struct udp_mib, Udp##x) }
 	SNMP6_GEN(InDatagrams),
 	SNMP6_GEN(NoPorts),
 	SNMP6_GEN(InErrors),
@@ -147,22 +148,27 @@
 	SNMP6_SENTINEL
 };
 
-static unsigned long
-fold_field(void *mib[], int offt)
+static __u64 
+fold_field(void *mib[], int size, int offt)
 {
-        unsigned long res = 0;
+        __u64 res = 0;
         int i;
  
         for (i = 0; i < NR_CPUS; i++) {
                 if (!cpu_possible(i))
                         continue;
-                res +=
-                    *((unsigned long *) (((void *)per_cpu_ptr(mib[0], i)) +
-                                         offt));
-                res +=
-                    *((unsigned long *) (((void *)per_cpu_ptr(mib[1], i)) +
-                                         offt));
-        }
+		if (size == 4) {
+			res += *((__u32 *) 
+				(((void *)per_cpu_ptr(mib[0], i)) + offt));
+			res += *((__u32 *)
+				(((void *)per_cpu_ptr(mib[1], i)) + offt));
+		} else if (size == 8) {
+			res += *((__u64 *) 
+				(((void *)per_cpu_ptr(mib[0], i)) + offt));
+			res += *((__u32 *)
+				(((void *)per_cpu_ptr(mib[1], i)) + offt));
+		}
+	}
         return res;
 }
 
@@ -170,9 +176,9 @@
 snmp6_seq_show_item(struct seq_file *seq, void **mib, struct snmp6_item *itemlist)
 {
 	int i;
-	for (i=0; itemlist[i].name; i++)
-		seq_printf(seq, "%-32s\t%lu\n", itemlist[i].name, 
-				fold_field(mib, itemlist[i].offset));
+	for (i=0; itemlist[i].name; i++) 
+		seq_printf(seq, "%-32s\t%llu\n", itemlist[i].name, 
+			fold_field(mib, itemlist[i].size, itemlist[i].offset));
 }
 
 static int snmp6_seq_show(struct seq_file *seq, void *v)
diff -urN linux-2.6.1/net/sctp/proc.c linux-2.6.1-ipv6mib2-64/net/sctp/proc.c
--- linux-2.6.1/net/sctp/proc.c	2004-01-08 22:59:26.000000000 -0800
+++ linux-2.6.1-ipv6mib2-64/net/sctp/proc.c	2004-01-13 13:57:12.000000000 -0800
@@ -64,21 +64,21 @@
 /* Return the current value of a particular entry in the mib by adding its
  * per cpu counters.
  */ 
-static unsigned long
+static __u64
 fold_field(void *mib[], int nr)
 {
-	unsigned long res = 0;
+	__u64 res = 0;
 	int i;
 
 	for (i = 0; i < NR_CPUS; i++) {
 		if (!cpu_possible(i))
 			continue;
 		res +=
-		    *((unsigned long *) (((void *) per_cpu_ptr(mib[0], i)) +
-					 sizeof (unsigned long) * nr));
+		    *((__u64 *) (((void *) per_cpu_ptr(mib[0], i)) +
+					 sizeof (__u64) * nr));
 		res +=
-		    *((unsigned long *) (((void *) per_cpu_ptr(mib[1], i)) +
-					 sizeof (unsigned long) * nr));
+		    *((__u64 *) (((void *) per_cpu_ptr(mib[1], i)) +
+					 sizeof (__u64) * nr));
 	}
 	return res;
 }
@@ -89,7 +89,7 @@
 	int i;
 
 	for (i = 0; i < sizeof(sctp_snmp_list) / sizeof(char *); i++)
-		seq_printf(seq, "%-32s\t%ld\n", sctp_snmp_list[i],
+		seq_printf(seq, "%-32s\t%llu\n", sctp_snmp_list[i],
 			   fold_field((void **)sctp_statistics, i));
 
 	return 0;

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

* Re: [PATCH] IPv6 MIB:ipv6Prefix netlink notification
  2003-12-05 22:57   ` David S. Miller
@ 2004-01-14 22:54     ` Shirley Ma
  2004-01-15  8:58       ` David S. Miller
  2004-01-14 23:52     ` [PATCH] IPv6 MIB:ipv6RouterAdvert " Shirley Ma
                       ` (2 subsequent siblings)
  3 siblings, 1 reply; 27+ messages in thread
From: Shirley Ma @ 2004-01-14 22:54 UTC (permalink / raw)
  To: David S. Miller; +Cc: kuznet, netdev, xma

[-- Attachment #1: Type: text/plain, Size: 166 bytes --]

> Let's queue this up for 2.6.1, please resend it after 2.6.0 is
> released.

This patch is agaist 2.6.1 kernel.

Thanks
Shirley Ma
IBM Linux Technology Center

[-- Attachment #2: linux-2.6.1-ipv6mib3.patch --]
[-- Type: text/x-diff, Size: 4506 bytes --]

diff -urN linux-2.6.1/include/linux/rtnetlink.h linux-2.6.1-ipv6mib3/include/linux/rtnetlink.h
--- linux-2.6.1/include/linux/rtnetlink.h	2004-01-08 22:59:55.000000000 -0800
+++ linux-2.6.1-ipv6mib3/include/linux/rtnetlink.h	2004-01-13 10:26:07.000000000 -0800
@@ -44,7 +44,10 @@
 #define	RTM_DELTFILTER	(RTM_BASE+29)
 #define	RTM_GETTFILTER	(RTM_BASE+30)
 
-#define	RTM_MAX		(RTM_BASE+31)
+#define RTM_NEWPREFIX	(RTM_BASE+36)
+#define RTM_GETPREFIX	(RTM_BASE+38)
+
+#define	RTM_MAX		(RTM_BASE+39)
 
 /* 
    Generic structure for encapsulation of optional route information.
@@ -459,6 +462,34 @@
 	unsigned	ifi_change;		/* IFF_* change mask */
 };
 
+/********************************************************************
+ *		prefix information 
+ ****/
+
+struct prefixmsg
+{
+	unsigned char	prefix_family;
+	int		prefix_ifindex;
+	unsigned char	prefix_type;
+	unsigned char	prefix_len;
+	unsigned char	prefix_flags;
+};
+
+enum 
+{
+	PREFIX_UNSPEC,
+	PREFIX_ADDRESS,
+	PREFIX_CACHEINFO,
+};
+
+#define PREFIX_MAX	PREFIX_CACHEINFO
+
+struct prefix_cacheinfo
+{
+	__u32	preferred_time;
+	__u32	valid_time;
+};
+
 /* The struct should be in sync with struct net_device_stats */
 struct rtnl_link_stats
 {
@@ -615,6 +646,8 @@
 #define RTMGRP_DECnet_IFADDR    0x1000
 #define RTMGRP_DECnet_ROUTE     0x4000
 
+#define RTMGRP_IPV6_PREFIX	0x20000
+
 /* End of information exported to user level */
 
 #ifdef __KERNEL__
diff -urN linux-2.6.1/include/net/if_inet6.h linux-2.6.1-ipv6mib3/include/net/if_inet6.h
--- linux-2.6.1/include/net/if_inet6.h	2004-01-08 23:00:04.000000000 -0800
+++ linux-2.6.1-ipv6mib3/include/net/if_inet6.h	2004-01-13 10:26:07.000000000 -0800
@@ -25,6 +25,10 @@
 #define IF_RA_RCVD	0x20
 #define IF_RS_SENT	0x10
 
+/* prefix flags */
+#define IF_PREFIX_ONLINK	0x01
+#define IF_PREFIX_AUTOCONF	0x02
+
 #ifdef __KERNEL__
 
 struct inet6_ifaddr 
diff -urN linux-2.6.1/net/ipv6/addrconf.c linux-2.6.1-ipv6mib3/net/ipv6/addrconf.c
--- linux-2.6.1/net/ipv6/addrconf.c	2004-01-08 23:00:03.000000000 -0800
+++ linux-2.6.1-ipv6mib3/net/ipv6/addrconf.c	2004-01-13 10:26:07.000000000 -0800
@@ -138,6 +138,8 @@
 static void addrconf_rs_timer(unsigned long data);
 static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifa);
 
+static void inet6_prefix_notify(int event, struct inet6_dev *idev, 
+				struct prefix_info *pinfo);
 static int ipv6_chk_same_addr(const struct in6_addr *addr, struct net_device *dev);
 
 static struct notifier_block *inet6addr_chain;
@@ -1491,6 +1493,7 @@
 			addrconf_verify(0);
 		}
 	}
+	inet6_prefix_notify(RTM_NEWPREFIX, in6_dev, pinfo);
 	in6_dev_put(in6_dev);
 }
 
@@ -2802,6 +2805,66 @@
 	return skb->len;
 }
 
+static int inet6_fill_prefix(struct sk_buff *skb, struct inet6_dev *idev,
+			struct prefix_info *pinfo, u32 pid, u32 seq, int event)
+{
+	struct prefixmsg	*pmsg;
+	struct nlmsghdr 	*nlh;
+	unsigned char		*b = skb->tail;
+	struct prefix_cacheinfo	ci;
+
+	nlh = NLMSG_PUT(skb, pid, seq, event, sizeof(*pmsg));
+	
+	if (pid) 
+		nlh->nlmsg_flags |= NLM_F_MULTI;
+	
+	pmsg = NLMSG_DATA(nlh);
+	pmsg->prefix_family = AF_INET6;
+	pmsg->prefix_ifindex = idev->dev->ifindex;
+	pmsg->prefix_len = pinfo->prefix_len;
+	pmsg->prefix_type = pinfo->type;
+	
+	pmsg->prefix_flags = 0;
+	if (pinfo->onlink)
+		pmsg->prefix_flags |= IF_PREFIX_ONLINK;
+	if (pinfo->autoconf)
+		pmsg->prefix_flags |= IF_PREFIX_AUTOCONF;
+
+	RTA_PUT(skb, PREFIX_ADDRESS, sizeof(pinfo->prefix), &pinfo->prefix);
+
+	ci.preferred_time = ntohl(pinfo->prefered);
+	ci.valid_time = ntohl(pinfo->valid);
+	RTA_PUT(skb, PREFIX_CACHEINFO, sizeof(ci), &ci);
+
+	nlh->nlmsg_len = skb->tail - b;
+	return skb->len;
+
+nlmsg_failure:
+rtattr_failure:
+	skb_trim(skb, b - skb->data);
+	return -1;
+}
+
+static void inet6_prefix_notify(int event, struct inet6_dev *idev, 
+			 struct prefix_info *pinfo)
+{
+	struct sk_buff *skb;
+	int size = NLMSG_SPACE(sizeof(struct prefixmsg)+128);
+
+	skb = alloc_skb(size, GFP_ATOMIC);
+	if (!skb) {
+		netlink_set_err(rtnl, 0, RTMGRP_IPV6_PREFIX, ENOBUFS);
+		return;
+	}
+	if (inet6_fill_prefix(skb, idev, pinfo, 0, 0, event) < 0) {
+		kfree_skb(skb);
+		netlink_set_err(rtnl, 0, RTMGRP_IPV6_PREFIX, EINVAL);
+		return;
+	}
+	NETLINK_CB(skb).dst_groups = RTMGRP_IPV6_PREFIX;
+	netlink_broadcast(rtnl, skb, 0, RTMGRP_IPV6_PREFIX, GFP_ATOMIC);
+}
+
 static struct rtnetlink_link inet6_rtnetlink_table[RTM_MAX - RTM_BASE + 1] = {
 	[RTM_GETLINK - RTM_BASE] = { .dumpit	= inet6_dump_ifinfo, },
 	[RTM_NEWADDR - RTM_BASE] = { .doit	= inet6_rtm_newaddr, },

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

* [PATCH] IPv6 MIB:ipv6RouterAdvert netlink notification
  2003-12-05 22:57   ` David S. Miller
  2004-01-14 22:54     ` Shirley Ma
@ 2004-01-14 23:52     ` Shirley Ma
  2004-01-15  8:52       ` David S. Miller
  2004-01-15  0:21     ` [PATCH] IPv6 MIB:ipv6inetNetToMediaTable Shirley Ma
  2004-01-15  0:22     ` [PATCH] IPv6 MIB:ipv6DefaultRouterTable Shirley Ma
  3 siblings, 1 reply; 27+ messages in thread
From: Shirley Ma @ 2004-01-14 23:52 UTC (permalink / raw)
  To: David S. Miller; +Cc: kuznet, netdev, xma

[-- Attachment #1: Type: text/plain, Size: 137 bytes --]

Once receiving a router advertisement message,
a netlink notification event will be created.

This patch is against linux-2.6.1.



[-- Attachment #2: linux-2.6.1-ipv6mib8.patch --]
[-- Type: text/x-diff, Size: 4412 bytes --]

diff -urN linux-2.6.1/include/linux/rtnetlink.h linux-2.6.1-ipv6mib8/include/linux/rtnetlink.h
--- linux-2.6.1/include/linux/rtnetlink.h	2004-01-08 22:59:55.000000000 -0800
+++ linux-2.6.1-ipv6mib8/include/linux/rtnetlink.h	2004-01-13 10:45:20.000000000 -0800
@@ -44,7 +44,10 @@
 #define	RTM_DELTFILTER	(RTM_BASE+29)
 #define	RTM_GETTFILTER	(RTM_BASE+30)
 
-#define	RTM_MAX		(RTM_BASE+31)
+#define RTM_NEWRA	(RTM_BASE+32)
+#define RTM_GETRA	(RTM_BASE+34)
+
+#define	RTM_MAX		(RTM_BASE+35)
 
 /* 
    Generic structure for encapsulation of optional route information.
@@ -441,6 +444,38 @@
 };
 
 /*****************************************************************
+ *		Route Advertisement specific messages.
+ * ******/
+
+/* struct iframsg
+ * passes router advertisement specific information
+ */
+
+struct iframsg
+{
+	unsigned char   ifra_family;
+	unsigned	ifra_flags;
+	int		ifra_index;
+};
+
+enum
+{
+	IFRA_UNSPEC,
+	IFRA_LMTU,
+	IFRA_CACHEINFO
+};
+
+/* max_adver_interval, min_adver_interval should be gotten from user level */
+struct ifra_cacheinfo {
+	__u32		hop_limit;
+	__u32		lifetime;
+	__u32		reachable_time;
+	__u32		retrans_time;
+};
+
+#define IFRA_MAX IFRA_CACHEINFO
+
+/*****************************************************************
  *		Link layer specific messages.
  ****/
 
@@ -615,6 +650,8 @@
 #define RTMGRP_DECnet_IFADDR    0x1000
 #define RTMGRP_DECnet_ROUTE     0x4000
 
+#define RTMGRP_IPV6_IFRA	0x10000
+
 /* End of information exported to user level */
 
 #ifdef __KERNEL__
diff -urN linux-2.6.1/include/net/ndisc.h linux-2.6.1-ipv6mib8/include/net/ndisc.h
--- linux-2.6.1/include/net/ndisc.h	2004-01-08 22:59:55.000000000 -0800
+++ linux-2.6.1-ipv6mib8/include/net/ndisc.h	2004-01-13 10:45:20.000000000 -0800
@@ -98,6 +98,10 @@
 
 extern void			igmp6_cleanup(void);
 
+extern void			inet6_ifra_notify(int event,
+						  struct inet6_dev *idev,
+						  struct ra_msg *ra_msg);
+
 static inline struct neighbour * ndisc_get_neigh(struct net_device *dev, struct in6_addr *addr)
 {
 
diff -urN linux-2.6.1/net/ipv6/addrconf.c linux-2.6.1-ipv6mib8/net/ipv6/addrconf.c
--- linux-2.6.1/net/ipv6/addrconf.c	2004-01-08 23:00:03.000000000 -0800
+++ linux-2.6.1-ipv6mib8/net/ipv6/addrconf.c	2004-01-13 10:45:20.000000000 -0800
@@ -2802,6 +2802,62 @@
 	return skb->len;
 }
 
+static int inet6_fill_ifra(struct sk_buff *skb, struct inet6_dev *idev,
+			   struct ra_msg *ra_msg, u32 pid, u32 seq, int event)
+{
+	struct iframsg		*ifra;
+	struct nlmsghdr 	*nlh;
+	unsigned char		*b = skb->tail;
+	__u32			mtu = idev->dev->mtu;
+	struct ifra_cacheinfo	ci;
+
+	nlh = NLMSG_PUT(skb, pid, seq, event, sizeof(*ifra));
+	
+	if (pid) 
+		nlh->nlmsg_flags |= NLM_F_MULTI;
+	
+	ifra = NLMSG_DATA(nlh);
+	ifra->ifra_family = AF_INET6;
+	ifra->ifra_index = idev->dev->ifindex;
+	ifra->ifra_flags = idev->if_flags;
+
+	RTA_PUT(skb, IFRA_LMTU, sizeof(mtu), &mtu);
+
+	ci.hop_limit = ra_msg->icmph.icmp6_hop_limit;
+	ci.lifetime = ntohs(ra_msg->icmph.icmp6_rt_lifetime);
+	ci.reachable_time = ntohl(ra_msg->reachable_time);
+	ci.retrans_time = ntohl(ra_msg->retrans_timer);
+	RTA_PUT(skb, IFRA_CACHEINFO, sizeof(ci), &ci);
+
+	nlh->nlmsg_len = skb->tail - b;
+	return skb->len;
+
+nlmsg_failure:
+rtattr_failure:
+	skb_trim(skb, b - skb->data);
+	return -1;
+}
+
+void inet6_ifra_notify(int event, struct inet6_dev *idev, 
+			      struct ra_msg *ra_msg)
+{
+	struct sk_buff *skb;
+	int size = NLMSG_SPACE(sizeof(struct iframsg)+128);
+
+	skb = alloc_skb(size, GFP_ATOMIC);
+	if (!skb) {
+		netlink_set_err(rtnl, 0, RTMGRP_IPV6_IFRA, ENOBUFS);
+		return;
+	}
+	if (inet6_fill_ifra(skb, idev, ra_msg, 0, 0, event) < 0) {
+		kfree_skb(skb);
+		netlink_set_err(rtnl, 0, RTMGRP_IPV6_IFRA, EINVAL);
+		return;
+	}
+	NETLINK_CB(skb).dst_groups = RTMGRP_IPV6_IFRA;
+	netlink_broadcast(rtnl, skb, 0, RTMGRP_IPV6_IFRA, GFP_ATOMIC);
+}
+
 static struct rtnetlink_link inet6_rtnetlink_table[RTM_MAX - RTM_BASE + 1] = {
 	[RTM_GETLINK - RTM_BASE] = { .dumpit	= inet6_dump_ifinfo, },
 	[RTM_NEWADDR - RTM_BASE] = { .doit	= inet6_rtm_newaddr, },
diff -urN linux-2.6.1/net/ipv6/ndisc.c linux-2.6.1-ipv6mib8/net/ipv6/ndisc.c
--- linux-2.6.1/net/ipv6/ndisc.c	2004-01-08 22:59:44.000000000 -0800
+++ linux-2.6.1-ipv6mib8/net/ipv6/ndisc.c	2004-01-13 10:45:20.000000000 -0800
@@ -1190,6 +1190,7 @@
 out:
 	if (rt)
 		dst_release(&rt->u.dst);
+	inet6_ifra_notify(RTM_NEWRA, in6_dev, ra_msg);
 	in6_dev_put(in6_dev);
 }
 

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

* [PATCH] IPv6 MIB:ipv6inetNetToMediaTable
  2003-12-05 22:57   ` David S. Miller
  2004-01-14 22:54     ` Shirley Ma
  2004-01-14 23:52     ` [PATCH] IPv6 MIB:ipv6RouterAdvert " Shirley Ma
@ 2004-01-15  0:21     ` Shirley Ma
  2004-01-15  8:48       ` David S. Miller
  2004-01-15  9:04       ` YOSHIFUJI Hideaki / 吉藤英明
  2004-01-15  0:22     ` [PATCH] IPv6 MIB:ipv6DefaultRouterTable Shirley Ma
  3 siblings, 2 replies; 27+ messages in thread
From: Shirley Ma @ 2004-01-15  0:21 UTC (permalink / raw)
  To: David S. Miller; +Cc: kuznet, netdev, xma

[-- Attachment #1: Type: text/plain, Size: 92 bytes --]

This patch is against 2.6.1 kernel.

Thanks
Shirley Ma
IBM Linux Technology Center



[-- Attachment #2: linux-2.6.1-ipv6mib5.patch --]
[-- Type: text/x-diff, Size: 2150 bytes --]

diff -urN linux-2.6.1/include/linux/rtnetlink.h linux-2.6.1-ipv6mib5/include/linux/rtnetlink.h
--- linux-2.6.1/include/linux/rtnetlink.h	2004-01-08 22:59:55.000000000 -0800
+++ linux-2.6.1-ipv6mib5/include/linux/rtnetlink.h	2004-01-13 10:38:27.000000000 -0800
@@ -3,6 +3,7 @@
 
 #include <linux/netlink.h>
 
+#define TIME_DELTA(a,b) ((unsigned long)((long)(a) - (long)(b)))
 /****
  *		Routing/neighbour discovery messages.
  ****/
diff -urN linux-2.6.1/net/core/neighbour.c linux-2.6.1-ipv6mib5/net/core/neighbour.c
--- linux-2.6.1/net/core/neighbour.c	2004-01-08 22:59:06.000000000 -0800
+++ linux-2.6.1-ipv6mib5/net/core/neighbour.c	2004-01-14 15:38:57.000000000 -0800
@@ -1339,7 +1339,6 @@
 static int neigh_fill_info(struct sk_buff *skb, struct neighbour *n,
 			   u32 pid, u32 seq, int event)
 {
-	unsigned long now = jiffies;
 	unsigned char *b = skb->tail;
 	struct nda_cacheinfo ci;
 	int locked = 0;
@@ -1357,9 +1356,13 @@
 	ndm->ndm_state	 = n->nud_state;
 	if (n->nud_state & NUD_VALID)
 		RTA_PUT(skb, NDA_LLADDR, n->dev->addr_len, n->ha);
-	ci.ndm_used	 = now - n->used;
-	ci.ndm_confirmed = now - n->confirmed;
-	ci.ndm_updated	 = now - n->updated;
+	ci.ndm_used	 = (__u32)(TIME_DELTA(n->used, INITIAL_JIFFIES)/HZ*100
+			   + TIME_DELTA(n->used, INITIAL_JIFFIES)%HZ*100/HZ);
+	ci.ndm_confirmed = (__u32)(TIME_DELTA(n->confirmed, INITIAL_JIFFIES)/HZ
+			   *100 + TIME_DELTA(n->confirmed, INITIAL_JIFFIES)%HZ
+			   *100/HZ);
+	ci.ndm_updated	 = (__u32)(TIME_DELTA(n->updated, INITIAL_JIFFIES)/HZ*100
+			   + TIME_DELTA(n->updated, INITIAL_JIFFIES)%HZ*100/HZ);
 	ci.ndm_refcnt	 = atomic_read(&n->refcnt) - 1;
 	read_unlock_bh(&n->lock);
 	locked		 = 0;
diff -urN linux-2.6.1/net/ipv6/addrconf.c linux-2.6.1-ipv6mib5/net/ipv6/addrconf.c
--- linux-2.6.1/net/ipv6/addrconf.c	2004-01-08 23:00:03.000000000 -0800
+++ linux-2.6.1-ipv6mib5/net/ipv6/addrconf.c	2004-01-13 10:38:27.000000000 -0800
@@ -93,7 +93,6 @@
 #endif
 
 #define	INFINITY_LIFE_TIME	0xFFFFFFFF
-#define TIME_DELTA(a,b) ((unsigned long)((long)(a) - (long)(b)))
 
 #ifdef CONFIG_SYSCTL
 static void addrconf_sysctl_register(struct inet6_dev *idev, struct ipv6_devconf *p);

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

* [PATCH] IPv6 MIB:ipv6DefaultRouterTable
  2003-12-05 22:57   ` David S. Miller
                       ` (2 preceding siblings ...)
  2004-01-15  0:21     ` [PATCH] IPv6 MIB:ipv6inetNetToMediaTable Shirley Ma
@ 2004-01-15  0:22     ` Shirley Ma
  2004-01-15  9:03       ` YOSHIFUJI Hideaki / 吉藤英明
  3 siblings, 1 reply; 27+ messages in thread
From: Shirley Ma @ 2004-01-15  0:22 UTC (permalink / raw)
  To: David S. Miller; +Cc: kuznet, netdev, xma

[-- Attachment #1: Type: text/plain, Size: 91 bytes --]

This patch is agaist 2.6.1 kernel.

Thanks
Shirley Ma
IBM Linux Technology Center



[-- Attachment #2: linux-2.6.1-ipv6mib7.patch --]
[-- Type: text/x-diff, Size: 1121 bytes --]

diff -urN linux-2.6.1/include/linux/rtnetlink.h linux-2.6.1-ipv6mib7/include/linux/rtnetlink.h
--- linux-2.6.1/include/linux/rtnetlink.h	2004-01-08 22:59:55.000000000 -0800
+++ linux-2.6.1-ipv6mib7/include/linux/rtnetlink.h	2004-01-13 10:41:55.000000000 -0800
@@ -247,7 +247,7 @@
 {
 	__u32	rta_clntref;
 	__u32	rta_lastuse;
-	__s32	rta_expires;
+	__u32	rta_expires;	/* seconds */
 	__u32	rta_error;
 	__u32	rta_used;
 
diff -urN linux-2.6.1/net/ipv6/route.c linux-2.6.1-ipv6mib7/net/ipv6/route.c
--- linux-2.6.1/net/ipv6/route.c	2004-01-08 22:59:48.000000000 -0800
+++ linux-2.6.1-ipv6mib7/net/ipv6/route.c	2004-01-13 10:41:55.000000000 -0800
@@ -1535,8 +1535,8 @@
 		RTA_PUT(skb, RTA_OIF, sizeof(int), &rt->rt6i_dev->ifindex);
 	RTA_PUT(skb, RTA_PRIORITY, 4, &rt->rt6i_metric);
 	ci.rta_lastuse = jiffies_to_clock_t(jiffies - rt->u.dst.lastuse);
-	if (rt->rt6i_expires)
-		ci.rta_expires = jiffies_to_clock_t(rt->rt6i_expires - jiffies);
+	if (rt->rt6i_expires && time_after(rt->rt6i_expires, jiffies))
+		ci.rta_expires = (rt->rt6i_expires - jiffies)/HZ;
 	else
 		ci.rta_expires = 0;
 	ci.rta_used = rt->u.dst.__use;

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

* Re: [PATCH] IPv6 MIB:ipv6inetNetToMediaTable
  2004-01-15  0:21     ` [PATCH] IPv6 MIB:ipv6inetNetToMediaTable Shirley Ma
@ 2004-01-15  8:48       ` David S. Miller
  2004-01-15  9:04       ` YOSHIFUJI Hideaki / 吉藤英明
  1 sibling, 0 replies; 27+ messages in thread
From: David S. Miller @ 2004-01-15  8:48 UTC (permalink / raw)
  To: Shirley Ma; +Cc: kuznet, netdev, xma

On Wed, 14 Jan 2004 16:21:26 -0800
Shirley Ma <mashirle@us.ibm.com> wrote:

> This patch is against 2.6.1 kernel.

Can you explain what this patch is doing, and specifically what bug it is fixing?

I feel dense as I can't figure it out just by studying your patch and the code it
touches :-)

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

* Re: [PATCH] IPv6 MIB:ipv6RouterAdvert netlink notification
  2004-01-14 23:52     ` [PATCH] IPv6 MIB:ipv6RouterAdvert " Shirley Ma
@ 2004-01-15  8:52       ` David S. Miller
  2004-01-15  9:10         ` YOSHIFUJI Hideaki / 吉藤英明
  0 siblings, 1 reply; 27+ messages in thread
From: David S. Miller @ 2004-01-15  8:52 UTC (permalink / raw)
  To: Shirley Ma; +Cc: kuznet, netdev, xma

On Wed, 14 Jan 2004 15:52:51 -0800
Shirley Ma <mashirle@us.ibm.com> wrote:

> Once receiving a router advertisement message,
> a netlink notification event will be created.
> 
> This patch is against linux-2.6.1.

This patch looks fine, except I can't see how RTM_GETRA is used anywhere.
Even if it will be used by some future change, please remove it until that
later change is made.

So please either show where RTM_GETRA is used or regenerate the patch with
that macro definition removed.

Thanks.

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

* Re: [PATCH]snmp6 64-bit counter support in proc.c
  2004-01-14 22:52       ` Shirley Ma
@ 2004-01-15  8:57         ` David S. Miller
  0 siblings, 0 replies; 27+ messages in thread
From: David S. Miller @ 2004-01-15  8:57 UTC (permalink / raw)
  To: Shirley Ma; +Cc: kuznet, netdev, xma

On Wed, 14 Jan 2004 14:52:51 -0800
Shirley Ma <mashirle@us.ibm.com> wrote:

> > "sizeof(unsigned long)" evaluates to 8 on 64-bit systems,
> > yet you assume it always evaluated to 4 as on 32-bit systems.
> >
> > Maybe it would be wiser to explicitly use 'u32' and 'u64' for
> > the types of the snmp counters?
> >
> > This has always been a sore area.
> 
> This is the new patch against 2.6.1 kernel.

I am personally fine with this patch, but I do believe some folks might find
it controversial (for whatever reason) to move all of these stats over to 64-bits.

So I'm going to let this sit for another day or two so people can voice any
objections they may have.

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

* Re: [PATCH] IPv6 MIB:ipv6Prefix netlink notification
  2004-01-14 22:54     ` Shirley Ma
@ 2004-01-15  8:58       ` David S. Miller
  0 siblings, 0 replies; 27+ messages in thread
From: David S. Miller @ 2004-01-15  8:58 UTC (permalink / raw)
  To: Shirley Ma; +Cc: kuznet, netdev, xma

On Wed, 14 Jan 2004 14:54:27 -0800
Shirley Ma <mashirle@us.ibm.com> wrote:

> > Let's queue this up for 2.6.1, please resend it after 2.6.0 is
> > released.
> 
> This patch is agaist 2.6.1 kernel.

Applied, thanks Shirley.

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

* Re: [PATCH] IPv6 MIB:ipv6DefaultRouterTable
  2004-01-15  0:22     ` [PATCH] IPv6 MIB:ipv6DefaultRouterTable Shirley Ma
@ 2004-01-15  9:03       ` YOSHIFUJI Hideaki / 吉藤英明
  0 siblings, 0 replies; 27+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2004-01-15  9:03 UTC (permalink / raw)
  To: mashirle; +Cc: davem, kuznet, netdev, xma

In article <200401141622.09299.mashirle@us.ibm.com> (at Wed, 14 Jan 2004 16:22:09 -0800), Shirley Ma <mashirle@us.ibm.com> says:

> This patch is agaist 2.6.1 kernel.

Wrong. Do not change user interface.

--yoshfuji

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

* Re: [PATCH] IPv6 MIB:ipv6inetNetToMediaTable
  2004-01-15  0:21     ` [PATCH] IPv6 MIB:ipv6inetNetToMediaTable Shirley Ma
  2004-01-15  8:48       ` David S. Miller
@ 2004-01-15  9:04       ` YOSHIFUJI Hideaki / 吉藤英明
  1 sibling, 0 replies; 27+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2004-01-15  9:04 UTC (permalink / raw)
  To: mashirle; +Cc: davem, kuznet, netdev, xma

In article <200401141621.26317.mashirle@us.ibm.com> (at Wed, 14 Jan 2004 16:21:26 -0800), Shirley Ma <mashirle@us.ibm.com> says:

> This patch is against 2.6.1 kernel.

Wrong. Do not change interface.

--yoshfuji

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

* Re: [PATCH] IPv6 MIB:ipv6RouterAdvert netlink notification
  2004-01-15  8:52       ` David S. Miller
@ 2004-01-15  9:10         ` YOSHIFUJI Hideaki / 吉藤英明
  0 siblings, 0 replies; 27+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2004-01-15  9:10 UTC (permalink / raw)
  To: mashirle; +Cc: kuznet, netdev, xma, davem

In article <20040115005252.6e6f1d81.davem@redhat.com> (at Thu, 15 Jan 2004 00:52:52 -0800), "David S. Miller" <davem@redhat.com> says:

> > Once receiving a router advertisement message,
> > a netlink notification event will be created.
> > 
> > This patch is against linux-2.6.1.
> 
> This patch looks fine, except I can't see how RTM_GETRA is used anywhere.
> Even if it will be used by some future change, please remove it until that
> later change is made.

Hmm, why do we need this?  What kind of usage?
I think you can do this in user space by opening raw socket.

--yoshfuji

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

* Re: [PATCH] IPv6 MIB:ipv6RouterAdvert netlink notification
@ 2004-01-15 22:31 Shirley Ma
  2004-01-15 23:04 ` Shirley Ma
  2004-01-16  1:37 ` YOSHIFUJI Hideaki / 吉藤英明
  0 siblings, 2 replies; 27+ messages in thread
From: Shirley Ma @ 2004-01-15 22:31 UTC (permalink / raw)
  To: David S. Miller; +Cc: mashirle, kuznet, netdev

[-- Attachment #1: Type: text/plain, Size: 1030 bytes --]





This patch is going to be used by SNMP for ipv6RouterAdvert Table. I will
remove this Micro, and resubmit the patch.

Thanks
Shirley Ma
IBM Linux Technology Center
15300 SW Koll Parkway
Beaverton, OR 97006-6063
Phone: (503) 578-7638
FAX:      (503) 578-3228



"David S. Miller" <davem@redhat.com> on 01/15/2004 12:52:52 AM

To:    mashirle@us.ltcfwd.linux.ibm.com
cc:    kuznet@ms2.inr.ac.ru, netdev@oss.sgi.com, Shirley
       Ma/Beaverton/IBM@IBMUS
Subject:    Re: [PATCH] IPv6 MIB:ipv6RouterAdvert netlink notification


On Wed, 14 Jan 2004 15:52:51 -0800
Shirley Ma <mashirle@us.ibm.com> wrote:

> Once receiving a router advertisement message,
> a netlink notification event will be created.
>
> This patch is against linux-2.6.1.

This patch looks fine, except I can't see how RTM_GETRA is used anywhere.
Even if it will be used by some future change, please remove it until that
later change is made.

So please either show where RTM_GETRA is used or regenerate the patch with
that macro definition removed.

Thanks.


[-- Attachment #2: Type: text/html, Size: 1386 bytes --]

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

* Re: [PATCH] IPv6 MIB:ipv6RouterAdvert netlink notification
  2004-01-15 22:31 [PATCH] IPv6 MIB:ipv6RouterAdvert netlink notification Shirley Ma
@ 2004-01-15 23:04 ` Shirley Ma
  2004-01-15 23:04   ` David S. Miller
  2004-01-16  1:37 ` YOSHIFUJI Hideaki / 吉藤英明
  1 sibling, 1 reply; 27+ messages in thread
From: Shirley Ma @ 2004-01-15 23:04 UTC (permalink / raw)
  To: Shirley Ma, David S. Miller; +Cc: kuznet, netdev

[-- Attachment #1: Type: text/plain, Size: 202 bytes --]

> So please either show where RTM_GETRA is used or regenerate the patch with
> that macro definition removed.

This is the new patch for 2.6.1. 

Thanks
Shirley Ma
IBM Linux Technology Center


[-- Attachment #2: linux-2.6.1-ipv6mib8.patch --]
[-- Type: text/x-diff, Size: 4378 bytes --]

diff -urN linux-2.6.1/include/linux/rtnetlink.h linux-2.6.1-ipv6mib8/include/linux/rtnetlink.h
--- linux-2.6.1/include/linux/rtnetlink.h	2004-01-08 22:59:55.000000000 -0800
+++ linux-2.6.1-ipv6mib8/include/linux/rtnetlink.h	2004-01-15 14:39:49.000000000 -0800
@@ -44,7 +44,9 @@
 #define	RTM_DELTFILTER	(RTM_BASE+29)
 #define	RTM_GETTFILTER	(RTM_BASE+30)
 
-#define	RTM_MAX		(RTM_BASE+31)
+#define RTM_NEWRA	(RTM_BASE+32)
+
+#define	RTM_MAX		(RTM_BASE+35)
 
 /* 
    Generic structure for encapsulation of optional route information.
@@ -441,6 +443,38 @@
 };
 
 /*****************************************************************
+ *		Route Advertisement specific messages.
+ * ******/
+
+/* struct iframsg
+ * passes router advertisement specific information
+ */
+
+struct iframsg
+{
+	unsigned char   ifra_family;
+	unsigned	ifra_flags;
+	int		ifra_index;
+};
+
+enum
+{
+	IFRA_UNSPEC,
+	IFRA_LMTU,
+	IFRA_CACHEINFO
+};
+
+/* max_adver_interval, min_adver_interval should be gotten from user level */
+struct ifra_cacheinfo {
+	__u32		hop_limit;
+	__u32		lifetime;
+	__u32		reachable_time;
+	__u32		retrans_time;
+};
+
+#define IFRA_MAX IFRA_CACHEINFO
+
+/*****************************************************************
  *		Link layer specific messages.
  ****/
 
@@ -615,6 +649,8 @@
 #define RTMGRP_DECnet_IFADDR    0x1000
 #define RTMGRP_DECnet_ROUTE     0x4000
 
+#define RTMGRP_IPV6_IFRA	0x10000
+
 /* End of information exported to user level */
 
 #ifdef __KERNEL__
diff -urN linux-2.6.1/include/net/ndisc.h linux-2.6.1-ipv6mib8/include/net/ndisc.h
--- linux-2.6.1/include/net/ndisc.h	2004-01-08 22:59:55.000000000 -0800
+++ linux-2.6.1-ipv6mib8/include/net/ndisc.h	2004-01-13 10:45:20.000000000 -0800
@@ -98,6 +98,10 @@
 
 extern void			igmp6_cleanup(void);
 
+extern void			inet6_ifra_notify(int event,
+						  struct inet6_dev *idev,
+						  struct ra_msg *ra_msg);
+
 static inline struct neighbour * ndisc_get_neigh(struct net_device *dev, struct in6_addr *addr)
 {
 
diff -urN linux-2.6.1/net/ipv6/addrconf.c linux-2.6.1-ipv6mib8/net/ipv6/addrconf.c
--- linux-2.6.1/net/ipv6/addrconf.c	2004-01-08 23:00:03.000000000 -0800
+++ linux-2.6.1-ipv6mib8/net/ipv6/addrconf.c	2004-01-13 10:45:20.000000000 -0800
@@ -2802,6 +2802,62 @@
 	return skb->len;
 }
 
+static int inet6_fill_ifra(struct sk_buff *skb, struct inet6_dev *idev,
+			   struct ra_msg *ra_msg, u32 pid, u32 seq, int event)
+{
+	struct iframsg		*ifra;
+	struct nlmsghdr 	*nlh;
+	unsigned char		*b = skb->tail;
+	__u32			mtu = idev->dev->mtu;
+	struct ifra_cacheinfo	ci;
+
+	nlh = NLMSG_PUT(skb, pid, seq, event, sizeof(*ifra));
+	
+	if (pid) 
+		nlh->nlmsg_flags |= NLM_F_MULTI;
+	
+	ifra = NLMSG_DATA(nlh);
+	ifra->ifra_family = AF_INET6;
+	ifra->ifra_index = idev->dev->ifindex;
+	ifra->ifra_flags = idev->if_flags;
+
+	RTA_PUT(skb, IFRA_LMTU, sizeof(mtu), &mtu);
+
+	ci.hop_limit = ra_msg->icmph.icmp6_hop_limit;
+	ci.lifetime = ntohs(ra_msg->icmph.icmp6_rt_lifetime);
+	ci.reachable_time = ntohl(ra_msg->reachable_time);
+	ci.retrans_time = ntohl(ra_msg->retrans_timer);
+	RTA_PUT(skb, IFRA_CACHEINFO, sizeof(ci), &ci);
+
+	nlh->nlmsg_len = skb->tail - b;
+	return skb->len;
+
+nlmsg_failure:
+rtattr_failure:
+	skb_trim(skb, b - skb->data);
+	return -1;
+}
+
+void inet6_ifra_notify(int event, struct inet6_dev *idev, 
+			      struct ra_msg *ra_msg)
+{
+	struct sk_buff *skb;
+	int size = NLMSG_SPACE(sizeof(struct iframsg)+128);
+
+	skb = alloc_skb(size, GFP_ATOMIC);
+	if (!skb) {
+		netlink_set_err(rtnl, 0, RTMGRP_IPV6_IFRA, ENOBUFS);
+		return;
+	}
+	if (inet6_fill_ifra(skb, idev, ra_msg, 0, 0, event) < 0) {
+		kfree_skb(skb);
+		netlink_set_err(rtnl, 0, RTMGRP_IPV6_IFRA, EINVAL);
+		return;
+	}
+	NETLINK_CB(skb).dst_groups = RTMGRP_IPV6_IFRA;
+	netlink_broadcast(rtnl, skb, 0, RTMGRP_IPV6_IFRA, GFP_ATOMIC);
+}
+
 static struct rtnetlink_link inet6_rtnetlink_table[RTM_MAX - RTM_BASE + 1] = {
 	[RTM_GETLINK - RTM_BASE] = { .dumpit	= inet6_dump_ifinfo, },
 	[RTM_NEWADDR - RTM_BASE] = { .doit	= inet6_rtm_newaddr, },
diff -urN linux-2.6.1/net/ipv6/ndisc.c linux-2.6.1-ipv6mib8/net/ipv6/ndisc.c
--- linux-2.6.1/net/ipv6/ndisc.c	2004-01-08 22:59:44.000000000 -0800
+++ linux-2.6.1-ipv6mib8/net/ipv6/ndisc.c	2004-01-13 10:45:20.000000000 -0800
@@ -1190,6 +1190,7 @@
 out:
 	if (rt)
 		dst_release(&rt->u.dst);
+	inet6_ifra_notify(RTM_NEWRA, in6_dev, ra_msg);
 	in6_dev_put(in6_dev);
 }
 

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

* Re: [PATCH] IPv6 MIB:ipv6RouterAdvert netlink notification
  2004-01-15 23:04 ` Shirley Ma
@ 2004-01-15 23:04   ` David S. Miller
  0 siblings, 0 replies; 27+ messages in thread
From: David S. Miller @ 2004-01-15 23:04 UTC (permalink / raw)
  To: Shirley Ma; +Cc: xma, kuznet, netdev

On Thu, 15 Jan 2004 15:04:26 -0800
Shirley Ma <mashirle@us.ibm.com> wrote:

> > So please either show where RTM_GETRA is used or regenerate the patch with
> > that macro definition removed.
> 
> This is the new patch for 2.6.1. 

Thanks Shirley, I'm applying this.

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

* Re: [PATCH] IPv6 MIB:ipv6RouterAdvert netlink notification
  2004-01-15 22:31 [PATCH] IPv6 MIB:ipv6RouterAdvert netlink notification Shirley Ma
  2004-01-15 23:04 ` Shirley Ma
@ 2004-01-16  1:37 ` YOSHIFUJI Hideaki / 吉藤英明
  1 sibling, 0 replies; 27+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2004-01-16  1:37 UTC (permalink / raw)
  To: davem, xma; +Cc: mashirle, kuznet, netdev, yoshfuji

In article <OFB4F51C5A.FC479F2C-ON87256E1C.007B64B8@us.ibm.com> (at Thu, 15 Jan 2004 14:31:47 -0800), Shirley Ma <xma@us.ibm.com> says:

> This patch is going to be used by SNMP for ipv6RouterAdvert Table. I will
> remove this Micro, and resubmit the patch.

This patch is conceptually wrong.

I think you're misunderstanding the darft.
ipv6RouterAdvertTable contains information used to create router
advertisements on router. Not on host.

Patch should be rejected.

>From draft-ietf-ipv6-rfc2011-update-05.txt:

--- cut here 
3.2.9.  Router Advertisement Table

This table contains the non-routing information that an IPv6 router
would use in constructing a router advertisement message.  It does not
contain information about the prefixes or other routing specific
information that the router might advertise.  The router should acquire
such information from either the routing tables or from some routing
table specific MIB.

This table is only required for IPv6 router entities.
--- cut here 
-- 
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@linux-ipv6.org>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA

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

* Re: [PATCH] IPv6 MIB:ipv6RouterAdvert netlink notification
@ 2004-01-16 18:38 Shirley Ma
  2004-01-16 19:17 ` YOSHIFUJI Hideaki / 吉藤英明
  0 siblings, 1 reply; 27+ messages in thread
From: Shirley Ma @ 2004-01-16 18:38 UTC (permalink / raw)
  To: David S. Miller
  Cc: YOSHIFUJI Hideaki / _$B5HF#1QL@, mashirle, kuznet, netdev,
	yoshfuji

[-- Attachment #1: Type: text/plain, Size: 1151 bytes --]





Thank Yoshfuji to point out.

But the patch is still needed for the Router, so it should be put in
ndisc_router_discovery() when it's determined as a router. Are you OK with
that?

Thanks
Shirley Ma
IBM Linux Technology Center
15300 SW Koll Parkway
Beaverton, OR 97006-6063
Phone: (503) 578-7638
FAX:      (503) 578-3228



"David S. Miller" <davem@redhat.com> on 01/16/2004 02:01:34 AM

To:    "YOSHIFUJI Hideaki / _$B5HF#1QL@" <yoshfuji@linux-ipv6.org>
cc:    Shirley Ma/Beaverton/IBM@IBMUS, mashirle@us.ltcfwd.linux.ibm.com,
       kuznet@ms2.inr.ac.ru, netdev@oss.sgi.com, yoshfuji@linux-ipv6.org
Subject:    Re: [PATCH] IPv6 MIB:ipv6RouterAdvert netlink notification


On Fri, 16 Jan 2004 10:37:10 +0900 (JST)
YOSHIFUJI Hideaki / _$B5HF#1QL@ <yoshfuji@linux-ipv6.org> wrote:

> In article <OFB4F51C5A.FC479F2C-ON87256E1C.007B64B8@us.ibm.com> (at Thu,
15 Jan 2004 14:31:47 -0800), Shirley Ma <xma@us.ibm.com> says:
>
> > This patch is going to be used by SNMP for ipv6RouterAdvert Table. I
will
> > remove this Micro, and resubmit the patch.
>
> This patch is conceptually wrong.

Ok, since this is controversial I'll back it out of my tree.


[-- Attachment #2: Type: text/html, Size: 1537 bytes --]

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

* Re: [PATCH] IPv6 MIB:ipv6RouterAdvert netlink notification
  2004-01-16 18:38 Shirley Ma
@ 2004-01-16 19:17 ` YOSHIFUJI Hideaki / 吉藤英明
  0 siblings, 0 replies; 27+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2004-01-16 19:17 UTC (permalink / raw)
  To: xma; +Cc: davem, mashirle, kuznet, netdev, yoshfuji

In article <OFDFE3736C.20FD7F98-ON87256E1D.00662F80@us.ibm.com> (at Fri, 16 Jan 2004 10:38:49 -0800), Shirley Ma <xma@us.ibm.com> says:

> But the patch is still needed for the Router, so it should be put in
> ndisc_router_discovery() when it's determined as a router. Are you OK with
> that?

I don't understand why it is needed.
radvd is respoinsible for those information.

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

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

* Re: [PATCH] IPv6 MIB:ipv6RouterAdvert netlink notification
@ 2004-01-16 19:41 Shirley Ma
  2004-01-16 20:08 ` David S. Miller
  2004-01-16 20:23 ` YOSHIFUJI Hideaki / 吉藤英明
  0 siblings, 2 replies; 27+ messages in thread
From: Shirley Ma @ 2004-01-16 19:41 UTC (permalink / raw)
  To: YOSHIFUJI Hideaki / 吉藤英明
  Cc: davem, mashirle, kuznet, netdev, yoshfuji

[-- Attachment #1: Type: text/plain, Size: 1501 bytes --]






Yes. radvd should provide all these information. But radvd doesn't support
this right now. I talked to someone who is patching SNMP to support new IP
MIBs, he said it's better to support this through netlink, since netlink
supports all other MIBs. Does netlink support user-user communication?

Anyway I will talk to radvd maintainers to ask them to support this if you
think this netlink notification is not needed.

Thanks
Shirley Ma
IBM Linux Technology Center
15300 SW Koll Parkway
Beaverton, OR 97006-6063
Phone: (503) 578-7638
FAX:      (503) 578-3228



YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>@oss.sgi.com on
01/16/2004 11:17:25 AM

Sent by:    netdev-bounce@oss.sgi.com


To:    Shirley Ma/Beaverton/IBM@IBMUS
cc:    davem@redhat.com, mashirle@us.ltcfwd.linux.ibm.com,
       kuznet@ms2.inr.ac.ru, netdev@oss.sgi.com, yoshfuji@linux-ipv6.org
Subject:    Re: [PATCH] IPv6 MIB:ipv6RouterAdvert netlink notification


In article <OFDFE3736C.20FD7F98-ON87256E1D.00662F80@us.ibm.com> (at Fri, 16
Jan 2004 10:38:49 -0800), Shirley Ma <xma@us.ibm.com> says:

> But the patch is still needed for the Router, so it should be put in
> ndisc_router_discovery() when it's determined as a router. Are you OK
with
> that?

I don't understand why it is needed.
radvd is respoinsible for those information.

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



[-- Attachment #2: Type: text/html, Size: 1846 bytes --]

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

* Re: [PATCH] IPv6 MIB:ipv6RouterAdvert netlink notification
  2004-01-16 19:41 Shirley Ma
@ 2004-01-16 20:08 ` David S. Miller
  2004-01-16 20:23 ` YOSHIFUJI Hideaki / 吉藤英明
  1 sibling, 0 replies; 27+ messages in thread
From: David S. Miller @ 2004-01-16 20:08 UTC (permalink / raw)
  To: Shirley Ma; +Cc: yoshfuji, mashirle, kuznet, netdev

On Fri, 16 Jan 2004 11:41:59 -0800
Shirley Ma <xma@us.ibm.com> wrote:

> Does netlink support user-user communication?

Yes, it does.

One thing I want people to keep in mind in these discussions, while I understand
the concerns being addressed and discussed, I think it would be somewhat rediculious
for one to be required to go to multiple places just to put a complete ipv6 mib together.

For example, a bunch of procfs files, some netlink stuff, and some status files emitted
by some userlevel daemon.  This is the situation I'd like to see avoided.

It looks like we can push all of this stuff over netlink, which would be ideal.

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

* Re: [PATCH] IPv6 MIB:ipv6RouterAdvert netlink notification
  2004-01-16 19:41 Shirley Ma
  2004-01-16 20:08 ` David S. Miller
@ 2004-01-16 20:23 ` YOSHIFUJI Hideaki / 吉藤英明
  1 sibling, 0 replies; 27+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2004-01-16 20:23 UTC (permalink / raw)
  To: xma; +Cc: davem, mashirle, kuznet, netdev, yoshfuji

In article <OF6E7E4DFA.6824D151-ON87256E1D.006A89B5@us.ibm.com> (at Fri, 16 Jan 2004 11:41:59 -0800), Shirley Ma <xma@us.ibm.com> says:

> Yes. radvd should provide all these information. But radvd doesn't support
> this right now. I talked to someone who is patching SNMP to support new IP
> MIBs, he said it's better to support this through netlink, since netlink
> supports all other MIBs. Does netlink support user-user communication?

Yes, netlink is one option and is possibly a good candidate.
I believe netlink supports user-user communication and 
rtadvd can use it to provide information to other entities.

> Anyway I will talk to radvd maintainers to ask them to support this if you
> think this netlink notification is not needed.

I do not think netlink RA notification is required in kernel.
What you (or the radvd maintainer) need to do is to 
allocate some constants and structures for the message.

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

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

end of thread, other threads:[~2004-01-16 20:23 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-20  0:21 IPv6 MIB:ipv6PrefixTable implementation Shirley Ma
2003-12-02 12:40 ` kuznet
2003-12-05 20:14   ` [PATCH]snmp6 64-bit counter support in proc.c Shirley Ma
2003-12-05 20:31     ` David S. Miller
2004-01-14 22:52       ` Shirley Ma
2004-01-15  8:57         ` David S. Miller
2003-12-05 21:51 ` [PATCH] IPv6 MIB:ipv6Prefix netlink notification Shirley Ma
2003-12-05 22:57   ` David S. Miller
2004-01-14 22:54     ` Shirley Ma
2004-01-15  8:58       ` David S. Miller
2004-01-14 23:52     ` [PATCH] IPv6 MIB:ipv6RouterAdvert " Shirley Ma
2004-01-15  8:52       ` David S. Miller
2004-01-15  9:10         ` YOSHIFUJI Hideaki / 吉藤英明
2004-01-15  0:21     ` [PATCH] IPv6 MIB:ipv6inetNetToMediaTable Shirley Ma
2004-01-15  8:48       ` David S. Miller
2004-01-15  9:04       ` YOSHIFUJI Hideaki / 吉藤英明
2004-01-15  0:22     ` [PATCH] IPv6 MIB:ipv6DefaultRouterTable Shirley Ma
2004-01-15  9:03       ` YOSHIFUJI Hideaki / 吉藤英明
  -- strict thread matches above, loose matches on Subject: below --
2004-01-15 22:31 [PATCH] IPv6 MIB:ipv6RouterAdvert netlink notification Shirley Ma
2004-01-15 23:04 ` Shirley Ma
2004-01-15 23:04   ` David S. Miller
2004-01-16  1:37 ` YOSHIFUJI Hideaki / 吉藤英明
2004-01-16 18:38 Shirley Ma
2004-01-16 19:17 ` YOSHIFUJI Hideaki / 吉藤英明
2004-01-16 19:41 Shirley Ma
2004-01-16 20:08 ` David S. Miller
2004-01-16 20:23 ` YOSHIFUJI Hideaki / 吉藤英明

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).