Update of /cvsroot/leaf/src/bering-uclibc/apps/ppp
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv4408
Modified Files:
buildtool.cfg buildtool.mk
Added Files:
ppp-2.4.4-ipv4zones-0.1.1.patch
Log Message:
apply ipv4zones patch provided by NiTro
--- NEW FILE: ppp-2.4.4-ipv4zones-0.1.1.patch ---
diff -Naur --exclude='*.orig' ppp-2.4.4.orig/include/linux/ppp_defs.h
ppp-2.4.4/include/linux/ppp_defs.h
--- ppp-2.4.4.orig/include/linux/ppp_defs.h 2002-12-06 11:49:15.000000000
+0200
+++ ppp-2.4.4/include/linux/ppp_defs.h 2008-12-03 16:21:40.000000000 +0200
@@ -137,6 +137,12 @@
__u32 ppp_opackets; /* packets sent */
__u32 ppp_oerrors; /* transmit errors */
__u32 ppp_olqrs; /* # LQR frames sent */
+#ifdef CONFIG_PPP_IPV4ZONES
+ __u32 ppp_opackets_zones[CONFIG_PPP_IPV4ZONES_COUNT];
+ __u32 ppp_ipackets_zones[CONFIG_PPP_IPV4ZONES_COUNT];
+ __u32 ppp_obytes_zones[CONFIG_PPP_IPV4ZONES_COUNT];
+ __u32 ppp_ibytes_zones[CONFIG_PPP_IPV4ZONES_COUNT];
+#endif /* CONFIG_PPP_IPV4ZONES */
};
struct vjstat {
diff -Naur --exclude='*.orig' ppp-2.4.4.orig/pppd/Makefile.linux
ppp-2.4.4/pppd/Makefile.linux
--- ppp-2.4.4.orig/pppd/Makefile.linux 2008-12-03 16:20:43.000000000 +0200
+++ ppp-2.4.4/pppd/Makefile.linux 2008-12-03 16:21:40.000000000 +0200
@@ -75,6 +75,8 @@
MAXOCTETS=y
+PPP_IPV4ZONES=y
+
INCLUDE_DIRS= -I../include
COMPILE_FLAGS= -DHAVE_PATHS_H -DIPX_CHANGE -DHAVE_MMAP
@@ -93,6 +95,9 @@
CFLAGS += -DMPPE=1
endif
endif
+ifdef PPP_IPV4ZONES
+CFLAGS += -DCONFIG_PPP_IPV4ZONES=1 -DCONFIG_PPP_IPV4ZONES_COUNT=4
+endif
# EAP SRP-SHA1
ifdef USE_SRP
diff -Naur --exclude='*.orig' ppp-2.4.4.orig/pppd/plugins/radius/etc/dictionary
ppp-2.4.4/pppd/plugins/radius/etc/dictionary
--- ppp-2.4.4.orig/pppd/plugins/radius/etc/dictionary 2002-11-09
13:24:42.000000000 +0200
+++ ppp-2.4.4/pppd/plugins/radius/etc/dictionary 2008-12-03
16:22:29.000000000 +0200
@@ -251,3 +251,4 @@
VALUE Octets-Direction MaxSession 4
INCLUDE /etc/radiusclient/dictionary.microsoft
+INCLUDE /etc/radiusclient/dictionary.pppd
diff -Naur --exclude='*.orig'
ppp-2.4.4.orig/pppd/plugins/radius/etc/dictionary.pppd
ppp-2.4.4/pppd/plugins/radius/etc/dictionary.pppd
--- ppp-2.4.4.orig/pppd/plugins/radius/etc/dictionary.pppd 1970-01-01
03:00:00.000000000 +0300
+++ ppp-2.4.4/pppd/plugins/radius/etc/dictionary.pppd 2008-12-03
16:21:40.000000000 +0200
@@ -0,0 +1,22 @@
+#
+# Experimental extensions, configuration only (for check-items)
+# Names/numbers as per the MERIT extensions (if possible).
+#
+VENDOR PPPD 1979
+
+ATTRIBUTE PPPD-Input-Octets-Zones-0 230 integer PPPD
+ATTRIBUTE PPPD-Output-Octets-Zones-0 231 integer PPPD
+ATTRIBUTE PPPD-Input-Packets-Zones-0 232 integer PPPD
+ATTRIBUTE PPPD-Output-Packets-Zones-0 233 integer PPPD
+ATTRIBUTE PPPD-Input-Octets-Zones-1 234 integer PPPD
+ATTRIBUTE PPPD-Output-Octets-Zones-1 235 integer PPPD
+ATTRIBUTE PPPD-Input-Packets-Zones-1 236 integer PPPD
+ATTRIBUTE PPPD-Output-Packets-Zones-1 237 integer PPPD
+ATTRIBUTE PPPD-Input-Octets-Zones-2 238 integer PPPD
+ATTRIBUTE PPPD-Output-Octets-Zones-2 239 integer PPPD
+ATTRIBUTE PPPD-Input-Packets-Zones-2 240 integer PPPD
+ATTRIBUTE PPPD-Output-Packets-Zones-2 241 integer PPPD
+ATTRIBUTE PPPD-Input-Octets-Zones-3 242 integer PPPD
+ATTRIBUTE PPPD-Output-Octets-Zones-3 243 integer PPPD
+ATTRIBUTE PPPD-Input-Packets-Zones-3 244 integer PPPD
+ATTRIBUTE PPPD-Output-Packets-Zones-3 245 integer PPPD
diff -Naur --exclude='*.orig' ppp-2.4.4.orig/pppd/plugins/radius/Makefile.linux
ppp-2.4.4/pppd/plugins/radius/Makefile.linux
--- ppp-2.4.4.orig/pppd/plugins/radius/Makefile.linux 2006-06-04
08:04:14.000000000 +0300
+++ ppp-2.4.4/pppd/plugins/radius/Makefile.linux 2008-12-03
16:21:40.000000000 +0200
@@ -22,6 +22,8 @@
# Uncomment the next lint to include support for traffic limiting
MAXOCTETS=y
+PPP_IPV4ZONES=y
+
ifdef CHAPMS
CFLAGS += -DCHAPMS=1
ifdef MPPE
@@ -31,6 +33,9 @@
ifdef MAXOCTETS
CFLAGS += -DMAXOCTETS=1
endif
+ifdef PPP_IPV4ZONES
+CFLAGS += -DCONFIG_PPP_IPV4ZONES=1 -DCONFIG_PPP_IPV4ZONES_COUNT=4
+endif
all: $(PLUGIN)
diff -Naur --exclude='*.orig' ppp-2.4.4.orig/pppd/plugins/radius/radius.c
ppp-2.4.4/pppd/plugins/radius/radius.c
--- ppp-2.4.4.orig/pppd/plugins/radius/radius.c 2006-05-22 03:01:40.000000000
+0300
+++ ppp-2.4.4/pppd/plugins/radius/radius.c 2008-12-03 16:21:40.000000000
+0200
@@ -977,6 +977,25 @@
av_type = link_stats.pkts_in;
rc_avpair_add(&send, PW_ACCT_INPUT_PACKETS, &av_type, 0, VENDOR_NONE);
+
+#ifdef CONFIG_PPP_IPV4ZONES
+ do {
+ int i;
+ for (i = 0; i < CONFIG_PPP_IPV4ZONES_COUNT; i++) {
+ av_type = link_stats.pkts_out_zones[i];
+ rc_avpair_add(&send, PW_ACCT_OUTPUT_PACKETS_ZONES +
i*4, &av_type, 0, VENDOR_PPPD);
+
+ av_type = link_stats.pkts_in_zones[i];
+ rc_avpair_add(&send, PW_ACCT_INPUT_PACKETS_ZONES + i*4,
&av_type, 0, VENDOR_PPPD);
+
+ av_type = link_stats.bytes_out_zones[i];
+ rc_avpair_add(&send, PW_ACCT_OUTPUT_OCTETS_ZONES + i*4,
&av_type, 0, VENDOR_PPPD);
+
+ av_type = link_stats.bytes_in_zones[i];
+ rc_avpair_add(&send, PW_ACCT_INPUT_OCTETS_ZONES + i*4,
&av_type, 0, VENDOR_PPPD);
+ }
+ } while (0);
+#endif /* CONFIG_PPP_IPV4ZONES */
}
if (*remote_number) {
@@ -1125,6 +1144,25 @@
av_type = link_stats.pkts_in;
rc_avpair_add(&send, PW_ACCT_INPUT_PACKETS, &av_type, 0, VENDOR_NONE);
+
+#ifdef CONFIG_PPP_IPV4ZONES
+ do {
+ int i;
+ for (i = 0; i < CONFIG_PPP_IPV4ZONES_COUNT; i++) {
+ av_type = link_stats.pkts_out_zones[i];
+ rc_avpair_add(&send, PW_ACCT_OUTPUT_PACKETS_ZONES +
i*4, &av_type, 0, VENDOR_PPPD);
+
+ av_type = link_stats.pkts_in_zones[i];
+ rc_avpair_add(&send, PW_ACCT_INPUT_PACKETS_ZONES + i*4,
&av_type, 0, VENDOR_PPPD);
+
+ av_type = link_stats.bytes_out_zones[i];
+ rc_avpair_add(&send, PW_ACCT_OUTPUT_OCTETS_ZONES + i*4,
&av_type, 0, VENDOR_PPPD);
+
+ av_type = link_stats.bytes_in_zones[i];
+ rc_avpair_add(&send, PW_ACCT_INPUT_OCTETS_ZONES + i*4,
&av_type, 0, VENDOR_PPPD);
+ }
+ } while (0);
+#endif /* CONFIG_PPP_IPV4ZONES */
}
if (*remote_number) {
diff -Naur --exclude='*.orig' ppp-2.4.4.orig/pppd/plugins/radius/radiusclient.h
ppp-2.4.4/pppd/plugins/radius/radiusclient.h
--- ppp-2.4.4.orig/pppd/plugins/radius/radiusclient.h 2004-11-14
09:26:26.000000000 +0200
+++ ppp-2.4.4/pppd/plugins/radius/radiusclient.h 2008-12-03
16:21:40.000000000 +0200
@@ -181,6 +181,13 @@
#define PW_SESSION_OCTETS_LIMIT 227 /* integer */
#define PW_OCTETS_DIRECTION 228 /* integer */
+#ifdef CONFIG_PPP_IPV4ZONES
+#define PW_ACCT_INPUT_OCTETS_ZONES 230 /* integer */
+#define PW_ACCT_OUTPUT_OCTETS_ZONES 231 /* integer */
+#define PW_ACCT_INPUT_PACKETS_ZONES 232 /* integer */
+#define PW_ACCT_OUTPUT_PACKETS_ZONES 233 /* integer */
+#endif
+
/* Integer Translations */
/* SERVICE TYPES */
@@ -292,6 +299,7 @@
/* Vendor codes */
#define VENDOR_NONE (-1)
#define VENDOR_MICROSOFT 311
+#define VENDOR_PPPD 1979
/* Server data structures */
diff -Naur --exclude='*.orig' ppp-2.4.4.orig/pppd/pppd.h ppp-2.4.4/pppd/pppd.h
--- ppp-2.4.4.orig/pppd/pppd.h 2008-12-03 16:20:43.000000000 +0200
+++ ppp-2.4.4/pppd/pppd.h 2008-12-03 16:21:40.000000000 +0200
@@ -174,6 +174,12 @@
unsigned int bytes_out;
unsigned int pkts_in;
unsigned int pkts_out;
+#ifdef CONFIG_PPP_IPV4ZONES
+ unsigned int pkts_out_zones[CONFIG_PPP_IPV4ZONES_COUNT];
+ unsigned int pkts_in_zones[CONFIG_PPP_IPV4ZONES_COUNT];
+ unsigned int bytes_out_zones[CONFIG_PPP_IPV4ZONES_COUNT];
+ unsigned int bytes_in_zones[CONFIG_PPP_IPV4ZONES_COUNT];
+#endif /* CONFIG_PPP_IPV4ZONES */
};
/* Used for storing a sequence of words. Usually malloced. */
diff -Naur --exclude='*.orig' ppp-2.4.4.orig/pppd/sys-linux.c
ppp-2.4.4/pppd/sys-linux.c
--- ppp-2.4.4.orig/pppd/sys-linux.c 2005-08-27 01:44:35.000000000 +0300
+++ ppp-2.4.4/pppd/sys-linux.c 2008-12-03 16:21:40.000000000 +0200
@@ -1351,6 +1351,12 @@
stats->bytes_out = req.stats.p.ppp_obytes;
stats->pkts_in = req.stats.p.ppp_ipackets;
stats->pkts_out = req.stats.p.ppp_opackets;
+#ifdef CONFIG_PPP_IPV4ZONES
+ memcpy(stats->pkts_out_zones, &req.stats.p.ppp_opackets_zones,
sizeof(stats->pkts_out_zones));
+ memcpy(stats->pkts_in_zones, &req.stats.p.ppp_ipackets_zones,
sizeof(stats->pkts_in_zones));
+ memcpy(stats->bytes_out_zones, &req.stats.p.ppp_obytes_zones,
sizeof(stats->bytes_out_zones));
+ memcpy(stats->bytes_in_zones, &req.stats.p.ppp_ibytes_zones,
sizeof(stats->bytes_in_zones));
+#endif /* CONFIG_PPP_IPV4ZONES */
return 1;
}
Index: buildtool.cfg
===================================================================
RCS file: /cvsroot/leaf/src/bering-uclibc/apps/ppp/buildtool.cfg,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** buildtool.cfg 13 Feb 2007 22:02:47 -0000 1.15
--- buildtool.cfg 28 Jan 2009 16:55:34 -0000 1.16
***************
*** 53,56 ****
--- 53,64 ----
</File>
+
+ <File ppp-2.4.4-ipv4zones-0.1.1.patch>
+ Server = local
+ Revision = HEAD
+ envname = PPP_PATCH6
+ Directory = ppp
+ </File>
+
<File dsl-provider.atm>
Server = cvs-sourceforge
***************
*** 134,138 ****
<ppp>
Version = 2.4.4
! Revision = 3
Help <<EOF
--- 142,146 ----
<ppp>
Version = 2.4.4
! Revision = 4
Help <<EOF
Index: buildtool.mk
===================================================================
RCS file: /cvsroot/leaf/src/bering-uclibc/apps/ppp/buildtool.mk,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** buildtool.mk 13 Feb 2007 22:02:47 -0000 1.13
--- buildtool.mk 28 Jan 2009 16:55:34 -0000 1.14
***************
*** 11,14 ****
--- 11,15 ----
cat $(PPP_PATCH3) | patch -d $(PPP_DIR) -p1
cat $(PPP_PATCH4) | patch -d $(PPP_DIR) -p1
+ cat $(PPP_PATCH6) | patch -d $(PPP_DIR) -p1
zcat $(PPP_PATCH5) | patch -d $(PPP_DIR) -p1
touch $(PPP_DIR)/.source
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
leaf-cvs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/leaf-cvs-commits