Browse code

gdb, gdbm, geoip-api-c, gettext, glibmm, tar, rpm, net-snmp : package version update

Change-Id: Ia9e2cb17a9351c3a14a34cfebef2007f0c9980e8
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/5689
Reviewed-by: Sharath George
Tested-by: Sharath George

Keerthana K authored on 2018/09/15 04:05:40
Showing 16 changed files
... ...
@@ -1,6 +1,6 @@
1 1
 Name:           apparmor
2 2
 Version:        2.13
3
-Release:        1%{?dist}
3
+Release:        2%{?dist}
4 4
 Summary:        AppArmor is an effective and easy-to-use Linux application security system.
5 5
 License:        GNU LGPL v2.1
6 6
 URL:            https://launchpad.net/apparmor
... ...
@@ -370,8 +370,10 @@ make DESTDIR=%{buildroot} install
370 370
 
371 371
 %files -n ruby-apparmor
372 372
 %defattr(-,root,root)
373
-%{_libdir}/ruby/site_ruby/2.4.0/x86_64-linux/LibAppArmor.so
373
+%{_libdir}/ruby/site_ruby/*
374 374
 
375 375
 %changelog
376
+*   Thu Sep 20 2018 Keerthana K <keerthanak@vmware.com> 2.13-2
377
+-   Updated the ruby packagefor latest version.
376 378
 *   Thu Aug 30 2018 Keerthana K <keerthanak@vmware.com> 2.13-1
377 379
 -   Initial Apparmor package for Photon.
... ...
@@ -1,11 +1,11 @@
1 1
 Summary:        C debugger
2 2
 Name:           gdb
3
-Version:        7.12.1
4
-Release:        8%{?dist}
3
+Version:        8.2
4
+Release:        1%{?dist}
5 5
 License:        GPLv2+
6 6
 URL:            http://www.gnu.org/software/%{name}
7 7
 Source0:        http://ftp.gnu.org/gnu/gdb/%{name}-%{version}.tar.xz
8
-%define sha1    gdb=ef77c5345d6f9fdcdf7a5d8503301242b701936e
8
+%define sha1    gdb=ee66294d87a109f88a459d0da5d0bb2da5135f45
9 9
 Group:          Development/Tools
10 10
 Vendor:         VMware, Inc.
11 11
 Distribution:   Photon
... ...
@@ -80,6 +80,8 @@ make %{?_smp_mflags} check || tail gdb/testsuite/gdb.sum  | grep "# of unexpecte
80 80
 %{_mandir}/*/*
81 81
 
82 82
 %changelog
83
+*   Fri Sep 14 2018 Keerthana K <keerthanak@vmware.com> 8.2-1
84
+-   Update to version 8.2
83 85
 *   Thu Dec 07 2017 Alexey Makhalov <amakhalov@vmware.com> 7.12.1-8
84 86
 -   Enable LZMA support
85 87
 *   Tue Nov 14 2017 Alexey Makhalov <amakhalov@vmware.com> 7.12.1-7
... ...
@@ -1,14 +1,14 @@
1 1
 Summary:        The GNU Database Manager
2 2
 Name:           gdbm
3
-Version:        1.13
4
-Release:        3%{?dist}
3
+Version:        1.18
4
+Release:        1%{?dist}
5 5
 License:        GPLv3+
6 6
 URL:            http://www.gnu.org/software/gdbm
7 7
 Group:          Applications/Databases
8 8
 Vendor:         VMware, Inc.
9 9
 Distribution:   Photon
10 10
 Source0:        http://ftp.gnu.org/gnu/gdbm/%{name}-%{version}.tar.gz
11
-%define sha1    gdbm=7f2a8301497bbcac91808b011ca533380914fd21
11
+%define sha1    gdbm=0f1056ab3beb1bf09dad06f8083f2c79716a5b1b
12 12
 
13 13
 %description
14 14
 This is a disk file format database which stores key/data-pairs in
... ...
@@ -69,6 +69,8 @@ make %{?_smp_mflags} check
69 69
 %{_mandir}/man3/*
70 70
 
71 71
 %changelog
72
+*   Fri Sep 14 2018 Keerthana K <keerthanak@vmware.com> 1.18-1
73
+-   Update to version 1.18
72 74
 *   Fri Jun 23 2017 Xiaolin Li <xiaolinl@vmware.com> 1.13-3
73 75
 -   Add devel package.
74 76
 *   Tue May 02 2017 Anish Swaminathan <anishs@vmware.com> 1.13-2
... ...
@@ -1,11 +1,11 @@
1 1
 Summary:        Library to find geographical and network information of an IP address
2 2
 Name:           geoip-api-c
3
-Version:        1.6.10
3
+Version:        1.6.12
4 4
 Release:        1%{?dist}
5 5
 License:        LGPLv2+
6 6
 URL:            https://github.com/maxmind/geoip-api-c
7 7
 Source0:        https://github.com/maxmind/geoip-api-c/releases/download/v%{version}/GeoIP-%{version}.tar.gz 
8
-%define sha1 GeoIP=d37a12bae0e375344288f6fe80c281cf9e6e107d
8
+%define sha1 GeoIP=ac1a6809afbb7624aff2f6e12ceb300b12de1715
9 9
 Group:          Development/Libraries
10 10
 Vendor:         VMware, Inc.
11 11
 Distribution:   Photon
... ...
@@ -60,6 +60,8 @@ make %{?_smp_mflags} -k check
60 60
 %{_libdir}/pkgconfig/geoip.pc
61 61
 
62 62
 %changelog
63
+*   Fri Sep 14 2018 Keerthana K <keerthanak@vmware.com> 1.6.12-1
64
+-   Update to version 1.6.12
63 65
 *   Wed Apr 05 2017 Danut Moraru <dmoraru@vmware.com> 1.6.10-1
64 66
 -   Upgrade geoip-api-c to 1.6.10
65 67
 *   Wed Jul 27 2016 Anish Swaminathan <anishs@vmware.com> 1.6.9-1
... ...
@@ -1,6 +1,6 @@
1 1
 Summary:	Utilities for internationalization and localization
2 2
 Name:		gettext
3
-Version:	0.19.8
3
+Version:	0.19.8.1
4 4
 Release:	1%{?dist}
5 5
 License:	GPLv3
6 6
 URL:		http://www.gnu.org/software/gettext
... ...
@@ -8,7 +8,7 @@ Group:		Applications/System
8 8
 Vendor:		VMware, Inc.
9 9
 Distribution:	Photon
10 10
 Source0:	http://ftp.gnu.org/gnu/gettext/%{name}-%{version}.tar.xz
11
-%define sha1 gettext=dc551d4783edf691c1f0095ca927d3128b5093e8
11
+%define sha1 gettext=e0fe90ede22f7f16bbde7bdea791a835f2773fc9
12 12
 
13 13
 %description
14 14
 These allow programs to be compiled with NLS
... ...
@@ -48,12 +48,14 @@ make %{?_smp_mflags} check
48 48
 %{_libdir}/*.so
49 49
 %{_libdir}/*.a
50 50
 %{_datarootdir}/aclocal/*
51
-%{_datarootdir}/%{name}-%{version}/*
51
+%{_datadir}/*
52 52
 %{_defaultdocdir}/%{name}-%{version}/*
53 53
 %{_datarootdir}/%{name}/*
54 54
 %{_mandir}/*
55 55
 
56 56
 %changelog
57
+*       Fri Sep 14 2018 Keerthana K <keerthanak@vmware.com> 0.19.8.1-1
58
+-       Update to version 0.19.8.1
57 59
 *	Wed Apr 05 2017 Danut Moraru <dmoraru@vmware.com> 0.19.8-1
58 60
 -	Upgrade to 0.19.8
59 61
 *	Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 0.19.5.1-2
... ...
@@ -1,14 +1,14 @@
1 1
 Summary:	C++ interface to the glib
2 2
 Name:		glibmm
3
-Version:	2.50.1
4
-Release:	2%{?dist}
3
+Version:	2.56.0
4
+Release:	1%{?dist}
5 5
 License:	LGPLv2+
6 6
 URL:		http://ftp.gnome.org/pub/GNOME/sources/glibmm
7 7
 Group:		Applications/System
8 8
 Vendor:		VMware, Inc.
9 9
 Distribution:	Photon
10 10
 Source0:	http://ftp.gnome.org/pub/GNOME/sources/glibmm/2.53/%{name}-%{version}.tar.xz
11
-%define sha1 glibmm=07ceb53b995f10ae0f9c572fb11febaa3e33d669
11
+%define sha1 glibmm=d733d9206d706d53058749f92dfb319bb189c289
12 12
 BuildRequires:	python2 >= 2.7
13 13
 BuildRequires:	libsigc++ >= 2.10.0
14 14
 BuildRequires:	glib-devel glib-schemas
... ...
@@ -66,6 +66,8 @@ export GIO_EXTRA_MODULES=/usr/lib/gio/modules; make check
66 66
 %{_datadir}/*
67 67
 
68 68
 %changelog
69
+*   Fri Sep 14 2018 Keerthana K <keerthanak@vmware.com> 2.56.0-1
70
+-   Update to version 2.56.0
69 71
 *   Thu Aug 24 2017 Rongrong Qiu <rqiu@vmware.com> 2.50.1-2
70 72
 -   add buildrequires for make check for bug 1900286
71 73
 *   Thu May 26 2017 Harish Udaiya Kumar <hudaiykumar@vmware.com> 2.50.1-1
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:	GIO-based library with Unix/Linux specific API
2 2
 Name:		libgsystem
3 3
 Version:	2015.2
4
-Release:	1%{?dist}
4
+Release:	2%{?dist}
5 5
 Group:		Development/Libraries
6 6
 Source0:	http://ftp.gnome.org/pub/GNOME/sources/libgsystem/%{version}/%{name}-%{version}.tar.gz
7 7
 %define sha1 libgsystem=d7f12beb17d3a3b288d68ca2cdcb595f9e5fccea
... ...
@@ -84,12 +84,15 @@ rm -rf $RPM_BUILD_ROOT
84 84
 %{_datadir}/gir-*/*.gir
85 85
 
86 86
 %changelog
87
+*   Tue Sep 18 2018 Keerthana K <keerthanak@vmware.com> 2015.2-2
88
+-   Removed % from autosetup in the changelog to address the
89
+-   build break with latest RPM version.
87 90
 *   Wed Apr 26 2017 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 2015.2-1
88 91
 -   Updated to version 2015.2
89 92
 *   Thu Nov 24 2016 Alexey Makhalov <amakhalov@vmware.com> 2015.1-4
90 93
 -   BuildRequired attr-devel.
91 94
 *   Thu Nov 17 2016 Alexey Makhalov <amakhalov@vmware.com> 2015.1-3
92
--   Use %setup instead of %autosetup
95
+-   Use setup instead of autosetup
93 96
 *   Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 2015.1-2
94 97
 -   GA - Bump release of all rpms
95 98
 *   Mon Nov 24 2014 Divya Thaluru <dthaluru@vmware.com> 2014.2-1
96 99
deleted file mode 100644
... ...
@@ -1,1650 +0,0 @@
1
-718183 - Provide native systemd unit file
2
-
3
-Gathered from following upstream git commits and backported to 5.7.
4
-
5
-commit 19499c3c90bf9d7b2b9e5d08baa26cc6bba28a11
6
-Author: Jan Safranek <jsafranek@users.sourceforge.net>
7
-Date:   Mon Aug 8 15:48:54 2011 +0200
8
-
9
-    CHANGES: snmpd: integrated with systemd, see README.systemd for details.
10
-    
11
-    It brings sd-daemon.c and .h directly downloaded from systemd. I've made very
12
-    few changes to it to match our NETSNMP_NO_SYSTEMD and include paths.
13
-
14
-commit fef6cddfdb94da1a6b1fb768af62918b80f11fd3
15
-Author: Jan Safranek <jsafranek@users.sourceforge.net>
16
-Date:   Mon Aug 8 15:48:54 2011 +0200
17
-
18
-    CHANGES: snmptrapd: integrate systemd notification support.
19
-
20
-commit 0641e43c694c485cbbffef0556efc4641bd3ff50
21
-Author: Jan Safranek <jsafranek@users.sourceforge.net>
22
-Date:   Mon Aug 8 15:48:54 2011 +0200
23
-
24
-    Add sd_find_inet_socket() and sd_find_inet_unisx() helpers into
25
-    system-specific code. This will help us to find various sockets
26
-    created by systemd much easier.
27
-
28
-commit 76530a89f1c8bbd0b63acce63e10d5d4812a1a16
29
-Author: Jan Safranek <jsafranek@users.sourceforge.net>
30
-Date:   Mon Aug 8 15:48:54 2011 +0200
31
-
32
-    Check sockets created by systemd when opening new server sockets.
33
-    
34
-    systemd can pass sockets to our daemons during startup using LISTEN_FDS
35
-    environment variable. So check this variable when opening new listening
36
-    socket - maybe system has already opened the socket for us.
37
-
38
-commit bf108d7f1354f6276fc43c129963f2c49b9fc242
39
-Author: Jan Safranek <jsafranek@users.sourceforge.net>
40
-Date:   Mon Aug 8 15:48:54 2011 +0200
41
-
42
-    Added sample systemd service files.
43
-
44
-commit 884ec488a6596380ba283d707827dd926a52e0b2
45
-Author: Jan Safranek <jsafranek@users.sourceforge.net>
46
-Date:   Mon Aug 8 15:48:55 2011 +0200
47
-
48
-    Run autoheader+autoconf.
49
-
50
-commit 86132e3f1e6ef7b4e0b96d8fa24e37c81b71b0e0
51
-Author: Jan Safranek <jsafranek@users.sourceforge.net>
52
-Date:   Tue Aug 9 10:53:43 2011 +0200
53
-
54
-    Update systemd documentation and samples.
55
-    
56
-    - add socket unit for snmpd to paralelize boot
57
-    - update WantedBy in socket units as recommended by http://0pointer.de/blog/projects/socket-activation.html
58
-    - rephrase README.systemd
59
-
60
-diff -up net-snmp-5.7.3/agent/snmpd.c.MPGqYh net-snmp-5.7.3/agent/snmpd.c
61
-+++ net-snmp-5.7.3/agent/snmpd.c	2015-02-17 13:34:05.736221851 +0100
62
-@@ -164,6 +164,10 @@ typedef long    fd_mask;
63
- 
64
- #endif
65
- 
66
-+#ifndef NETSNMP_NO_SYSTEMD
67
-+#include <net-snmp/library/sd-daemon.h>
68
-+#endif
69
-+
70
- netsnmp_feature_want(logging_file)
71
- netsnmp_feature_want(logging_stdio)
72
- netsnmp_feature_want(logging_syslog)
73
-@@ -443,18 +447,26 @@ main(int argc, char *argv[])
74
-     int             agent_mode = -1;
75
-     char           *pid_file = NULL;
76
-     char            option_compatability[] = "-Le";
77
-+    int             prepared_sockets = 0;
78
- #if HAVE_GETPID
79
-     int fd;
80
-     FILE           *PID;
81
- #endif
82
- 
83
- #ifndef WIN32
84
-+#ifndef NETSNMP_NO_SYSYSTEMD
85
-+    /* check if systemd has sockets for us and don't close them */
86
-+    prepared_sockets = netsnmp_sd_listen_fds(0);
87
-+#endif /* NETSNMP_NO_SYSYSTEMD */
88
-+
89
-     /*
90
-      * close all non-standard file descriptors we may have
91
-      * inherited from the shell.
92
-      */
93
--    for (i = getdtablesize() - 1; i > 2; --i) {
94
--        (void) close(i);
95
-+    if (!prepared_sockets) {
96
-+        for (i = getdtablesize() - 1; i > 2; --i) {
97
-+            (void) close(i);
98
-+        }
99
-     }
100
- #endif /* #WIN32 */
101
-     
102
-@@ -1107,6 +1119,19 @@ main(int argc, char *argv[])
103
-     netsnmp_addrcache_initialise();
104
- 
105
-     /*
106
-+     * Let systemd know we're up.
107
-+     */
108
-+#ifndef NETSNMP_NO_SYSTEMD
109
-+    netsnmp_sd_notify(1, "READY=1\n");
110
-+    if (prepared_sockets)
111
-+        /*
112
-+         * Clear the environment variable, we already processed all the sockets
113
-+         * by now.
114
-+         */
115
-+        netsnmp_sd_listen_fds(1);
116
-+#endif
117
-+
118
-+    /*
119
-      * Forever monitor the dest_port for incoming PDUs.  
120
-      */
121
-     DEBUGMSGTL(("snmpd/main", "We're up.  Starting to process data.\n"));
122
-diff -up net-snmp-5.7.3/apps/snmptrapd.c.MPGqYh net-snmp-5.7.3/apps/snmptrapd.c
123
-+++ net-snmp-5.7.3/apps/snmptrapd.c	2015-02-17 13:34:05.736221851 +0100
124
-@@ -125,6 +125,10 @@ SOFTWARE.
125
- 
126
- #include <net-snmp/net-snmp-features.h>
127
- 
128
-+#ifndef NETSNMP_NO_SYSTEMD
129
-+#include <net-snmp/library/sd-daemon.h>
130
-+#endif
131
-+
132
- #ifndef BSD4_3
133
- #define BSD4_2
134
- #endif
135
-@@ -657,15 +661,22 @@ main(int argc, char *argv[])
136
-     int             agentx_subagent = 1;
137
- #endif
138
-     netsnmp_trapd_handler *traph;
139
-+    int             prepared_sockets = 0;
140
- 
141
- 
142
- #ifndef WIN32
143
-+#ifndef NETSNMP_NO_SYSTEMD
144
-+    /* check if systemd has sockets for us and don't close them */
145
-+    prepared_sockets = netsnmp_sd_listen_fds(0);
146
-+#endif
147
-     /*
148
-      * close all non-standard file descriptors we may have
149
-      * inherited from the shell.
150
-      */
151
--    for (i = getdtablesize() - 1; i > 2; --i) {
152
--        (void) close(i);
153
-+    if (!prepared_sockets) {
154
-+        for (i = getdtablesize() - 1; i > 2; --i) {
155
-+            (void) close(i);
156
-+        }
157
-     }
158
- #endif /* #WIN32 */
159
-     
160
-@@ -1318,6 +1329,19 @@ main(int argc, char *argv[])
161
- #endif
162
- #endif
163
- 
164
-+    /*
165
-+     * Let systemd know we're up.
166
-+     */
167
-+#ifndef NETSNMP_NO_SYSTEMD
168
-+    netsnmp_sd_notify(1, "READY=1\n");
169
-+    if (prepared_sockets)
170
-+        /*
171
-+         * Clear the environment variable, we already processed all the sockets
172
-+         * by now.
173
-+         */
174
-+        netsnmp_sd_listen_fds(1);
175
-+#endif
176
-+
177
- #ifdef WIN32SERVICE
178
-     trapd_status = SNMPTRAPD_RUNNING;
179
- #endif
180
-diff -up net-snmp-5.7.3/configure.d/config_modules_lib.MPGqYh net-snmp-5.7.3/configure.d/config_modules_lib
181
-+++ net-snmp-5.7.3/configure.d/config_modules_lib	2015-02-17 13:34:05.737221850 +0100
182
-@@ -53,6 +53,14 @@ if test "x$PARTIALTARGETOS" = "xmingw32"
183
-   other_ftobjs_list="$other_ftobjs_list winpipe.ft"
184
- fi
185
- 
186
-+# Linux systemd
187
-+if test "x$with_systemd" == "xyes"; then
188
-+  other_src_list="$other_src_list sd-daemon.c"
189
-+  other_objs_list="$other_objs_list sd-daemon.o"
190
-+  other_lobjs_list="$other_lobjs_list sd-daemon.lo"
191
-+  other_ftobjs_list="$other_ftobjs_list sd-daemon.ft"
192
-+fi
193
-+
194
- AC_SUBST(other_src_list)
195
- AC_SUBST(other_objs_list)
196
- AC_SUBST(other_lobjs_list)
197
-diff -up net-snmp-5.7.3/configure.d/config_project_with_enable.MPGqYh net-snmp-5.7.3/configure.d/config_project_with_enable
198
-+++ net-snmp-5.7.3/configure.d/config_project_with_enable	2015-02-17 13:34:05.737221850 +0100
199
-@@ -690,6 +690,15 @@ if test "x$with_dummy_values" != "xyes";
200
-      data for])
201
- fi
202
- 
203
-+NETSNMP_ARG_WITH(systemd,
204
-+[  --with-systemd                 Provide systemd support. See README.systemd
205
-+                                  for details.])
206
-+# Define unless specifically suppressed (i.e., option defaults to false).
207
-+if test "x$with_systemd" != "xyes"; then
208
-+  AC_DEFINE(NETSNMP_NO_SYSTEMD, 1,
209
-+    [If you don't want to integrate with systemd.])
210
-+fi
211
-+
212
- NETSNMP_ARG_ENABLE(set-support,
213
- [  --disable-set-support           Do not allow SNMP set requests.])
214
- if test "x$enable_set_support" = "xno"; then
215
-diff -up net-snmp-5.7.3/configure.MPGqYh net-snmp-5.7.3/configure
216
-+++ net-snmp-5.7.3/configure	2015-02-17 13:34:05.744221845 +0100
217
-@@ -951,6 +951,8 @@ with_kmem_usage
218
- enable_kmem_usage
219
- with_dummy_values
220
- enable_dummy_values
221
-+with_systemd
222
-+enable_systemd
223
- enable_set_support
224
- with_set_support
225
- with_sys_contact
226
-@@ -1867,6 +1869,8 @@ Configuring the agent:
227
-                                   This is technically not compliant with the
228
-                                   SNMP specifications, but was how the agent
229
-                                   operated for versions < 4.0.
230
-+  --with-systemd                 Provide systemd support. See README.systemd
231
-+                                  for details.
232
-   --with-sys-contact="who@where"  Default system contact.
233
-                                     (Default: LOGIN@DOMAINNAME)
234
-   --with-sys-location="location"  Default system location.
235
-@@ -4398,6 +4402,24 @@ $as_echo "#define NETSNMP_NO_DUMMY_VALUE
236
- 
237
- fi
238
- 
239
-+
240
-+# Check whether --with-systemd was given.
241
-+if test "${with_systemd+set}" = set; then :
242
-+  withval=$with_systemd;
243
-+fi
244
-+
245
-+   # Check whether --enable-systemd was given.
246
-+if test "${enable_systemd+set}" = set; then :
247
-+  enableval=$enable_systemd; as_fn_error $? "Invalid option. Use --with-systemd/--without-systemd instead" "$LINENO" 5
248
-+fi
249
-+
250
-+# Define unless specifically suppressed (i.e., option defaults to false).
251
-+if test "x$with_systemd" != "xyes"; then
252
-+
253
-+$as_echo "#define NETSNMP_NO_SYSTEMD 1" >>confdefs.h
254
-+
255
-+fi
256
-+
257
- # Check whether --enable-set-support was given.
258
- if test "${enable_set_support+set}" = set; then :
259
-   enableval=$enable_set_support;
260
-@@ -18639,6 +18661,14 @@ if test "x$PARTIALTARGETOS" = "xmingw32"
261
-   other_ftobjs_list="$other_ftobjs_list winpipe.ft"
262
- fi
263
- 
264
-+# Linux systemd
265
-+if test "x$with_systemd" == "xyes"; then
266
-+  other_src_list="$other_src_list sd-daemon.c"
267
-+  other_objs_list="$other_objs_list sd-daemon.o"
268
-+  other_lobjs_list="$other_lobjs_list sd-daemon.lo"
269
-+  other_ftobjs_list="$other_ftobjs_list sd-daemon.ft"
270
-+fi
271
-+
272
- 
273
- 
274
- 
275
-diff -up net-snmp-5.7.3/dist/snmpd.service.MPGqYh net-snmp-5.7.3/dist/snmpd.service
276
-+++ net-snmp-5.7.3/dist/snmpd.service	2015-02-17 13:34:05.745221844 +0100
277
-@@ -0,0 +1,18 @@
278
-+#
279
-+# SNMP agent service file for systemd
280
-+#
281
-+#
282
-+# The service should be enabled, i.e. snmpd should start during machine boot.
283
-+# Socket activation shall not be used. See README.systemd for details.
284
-+
285
-+[Unit]
286
-+Description=Simple Network Management Protocol (SNMP) daemon.
287
-+After=syslog.target network.target
288
-+
289
-+[Service]
290
-+# Type=notify is also supported. It should be set when snmpd.socket is not used.
291
-+Type=simple
292
-+ExecStart=/usr/sbin/snmpd -f
293
-+
294
-+[Install]
295
-+WantedBy=multi-user.target
296
-diff -up net-snmp-5.7.3/dist/snmpd.socket.MPGqYh net-snmp-5.7.3/dist/snmpd.socket
297
-+++ net-snmp-5.7.3/dist/snmpd.socket	2015-02-17 13:34:05.745221844 +0100
298
-@@ -0,0 +1,17 @@
299
-+[Unit]
300
-+Description=Socket listening for SNMP and AgentX messages
301
-+
302
-+[Socket]
303
-+ListenDatagram=0.0.0.0:161
304
-+# Uncomment other listening addresses as needed - TCP, UDP6, TCP6.
305
-+# It must match listening addresses/ports defined in snmpd.service
306
-+# or snmpd.conf.
307
-+# ListenStream=0.0.0.0:161
308
-+# ListenDatagram=[::]:161
309
-+# ListenStream=[::]:161
310
-+#
311
-+# Uncomment AgentX socket if snmpd.conf enables AgentX protocol.
312
-+# ListenStream=/var/agentx/master
313
-+
314
-+[Install]
315
-+WantedBy=sockets.target
316
-diff -up net-snmp-5.7.3/dist/snmptrapd.service.MPGqYh net-snmp-5.7.3/dist/snmptrapd.service
317
-+++ net-snmp-5.7.3/dist/snmptrapd.service	2015-02-17 13:34:05.745221844 +0100
318
-@@ -0,0 +1,16 @@
319
-+#
320
-+# SNMP trap-processing service file for systemd
321
-+#
322
-+
323
-+[Unit]
324
-+Description=Simple Network Management Protocol (SNMP) Trap daemon.
325
-+After=syslog.target network.target
326
-+
327
-+[Service]
328
-+# Type=notify is also supported. It should be set when snmptrapd.socket is not
329
-+# used.
330
-+Type=simple
331
-+ExecStart=/usr/sbin/snmptrapd -f
332
-+
333
-+[Install]
334
-+WantedBy=multi-user.target
335
-diff -up net-snmp-5.7.3/dist/snmptrapd.socket.MPGqYh net-snmp-5.7.3/dist/snmptrapd.socket
336
-+++ net-snmp-5.7.3/dist/snmptrapd.socket	2015-02-17 13:34:05.745221844 +0100
337
-@@ -0,0 +1,14 @@
338
-+[Unit]
339
-+Description=Socket listening for SNMP trap messages
340
-+
341
-+[Socket]
342
-+ListenDatagram=0.0.0.0:162
343
-+# Uncomment other listening addresses as needed - TCP, UDP6, TCP6.
344
-+# It must match listening addresses/ports defined in snmptrapd.service
345
-+# or snmptrapd.conf.
346
-+# ListenStream=0.0.0.0:162
347
-+# ListenDatagram=[::]:162
348
-+# ListenStream=[::]:162
349
-+
350
-+[Install]
351
-+WantedBy=sockets.target
352
-diff -up net-snmp-5.7.3/include/net-snmp/library/sd-daemon.h.MPGqYh net-snmp-5.7.3/include/net-snmp/library/sd-daemon.h
353
-+++ net-snmp-5.7.3/include/net-snmp/library/sd-daemon.h	2015-02-17 13:34:05.746221843 +0100
354
-@@ -0,0 +1,286 @@
355
-+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
356
-+
357
-+#ifndef SNMPD_SD_DAEMON_H
358
-+#define SNMPD_SD_DAEMON_H
359
-+
360
-+/***
361
-+  Copyright 2010 Lennart Poettering
362
-+
363
-+  Permission is hereby granted, free of charge, to any person
364
-+  obtaining a copy of this software and associated documentation files
365
-+  (the "Software"), to deal in the Software without restriction,
366
-+  including without limitation the rights to use, copy, modify, merge,
367
-+  publish, distribute, sublicense, and/or sell copies of the Software,
368
-+  and to permit persons to whom the Software is furnished to do so,
369
-+  subject to the following conditions:
370
-+
371
-+  The above copyright notice and this permission notice shall be
372
-+  included in all copies or substantial portions of the Software.
373
-+
374
-+  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
375
-+  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
376
-+  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
377
-+  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
378
-+  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
379
-+  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
380
-+  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
381
-+  SOFTWARE.
382
-+***/
383
-+
384
-+#include <sys/types.h>
385
-+#include <inttypes.h>
386
-+
387
-+#ifdef __cplusplus
388
-+extern "C" {
389
-+#endif
390
-+
391
-+/*
392
-+  Reference implementation of a few systemd related interfaces for
393
-+  writing daemons. These interfaces are trivial to implement. To
394
-+  simplify porting we provide this reference implementation.
395
-+  Applications are welcome to reimplement the algorithms described
396
-+  here if they do not want to include these two source files.
397
-+
398
-+  The following functionality is provided:
399
-+
400
-+  - Support for logging with log levels on stderr
401
-+  - File descriptor passing for socket-based activation
402
-+  - Daemon startup and status notification
403
-+  - Detection of systemd boots
404
-+
405
-+  You may compile this with -DDISABLE_SYSTEMD to disable systemd
406
-+  support. This makes all those calls NOPs that are directly related to
407
-+  systemd (i.e. only sd_is_xxx() will stay useful).
408
-+
409
-+  Since this is drop-in code we don't want any of our symbols to be
410
-+  exported in any case. Hence we declare hidden visibility for all of
411
-+  them.
412
-+
413
-+  You may find an up-to-date version of these source files online:
414
-+
415
-+  http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.h
416
-+  http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.c
417
-+
418
-+  This should compile on non-Linux systems, too, but with the
419
-+  exception of the sd_is_xxx() calls all functions will become NOPs.
420
-+
421
-+  See sd-daemon(7) for more information.
422
-+*/
423
-+
424
-+#ifndef _sd_printf_attr_
425
-+#if __GNUC__ >= 4
426
-+#define _sd_printf_attr_(a,b) __attribute__ ((format (printf, a, b)))
427
-+#else
428
-+#define _sd_printf_attr_(a,b)
429
-+#endif
430
-+#endif
431
-+
432
-+/*
433
-+  Log levels for usage on stderr:
434
-+
435
-+          fprintf(stderr, SD_NOTICE "Hello World!\n");
436
-+
437
-+  This is similar to printk() usage in the kernel.
438
-+*/
439
-+#define SD_EMERG   "<0>"  /* system is unusable */
440
-+#define SD_ALERT   "<1>"  /* action must be taken immediately */
441
-+#define SD_CRIT    "<2>"  /* critical conditions */
442
-+#define SD_ERR     "<3>"  /* error conditions */
443
-+#define SD_WARNING "<4>"  /* warning conditions */
444
-+#define SD_NOTICE  "<5>"  /* normal but significant condition */
445
-+#define SD_INFO    "<6>"  /* informational */
446
-+#define SD_DEBUG   "<7>"  /* debug-level messages */
447
-+
448
-+/* The first passed file descriptor is fd 3 */
449
-+#define SD_LISTEN_FDS_START 3
450
-+
451
-+/*
452
-+  Returns how many file descriptors have been passed, or a negative
453
-+  errno code on failure. Optionally, removes the $LISTEN_FDS and
454
-+  $LISTEN_PID file descriptors from the environment (recommended, but
455
-+  problematic in threaded environments). If r is the return value of
456
-+  this function you'll find the file descriptors passed as fds
457
-+  SD_LISTEN_FDS_START to SD_LISTEN_FDS_START+r-1. Returns a negative
458
-+  errno style error code on failure. This function call ensures that
459
-+  the FD_CLOEXEC flag is set for the passed file descriptors, to make
460
-+  sure they are not passed on to child processes. If FD_CLOEXEC shall
461
-+  not be set, the caller needs to unset it after this call for all file
462
-+  descriptors that are used.
463
-+
464
-+  See sd_listen_fds(3) for more information.
465
-+*/
466
-+int netsnmp_sd_listen_fds(int unset_environment);
467
-+
468
-+/*
469
-+  Helper call for identifying a passed file descriptor. Returns 1 if
470
-+  the file descriptor is a FIFO in the file system stored under the
471
-+  specified path, 0 otherwise. If path is NULL a path name check will
472
-+  not be done and the call only verifies if the file descriptor
473
-+  refers to a FIFO. Returns a negative errno style error code on
474
-+  failure.
475
-+
476
-+  See sd_is_fifo(3) for more information.
477
-+*/
478
-+int netsnmp_sd_is_fifo(int fd, const char *path);
479
-+
480
-+/*
481
-+  Helper call for identifying a passed file descriptor. Returns 1 if
482
-+  the file descriptor is a special character device on the file
483
-+  system stored under the specified path, 0 otherwise.
484
-+  If path is NULL a path name check will not be done and the call
485
-+  only verifies if the file descriptor refers to a special character.
486
-+  Returns a negative errno style error code on failure.
487
-+
488
-+  See sd_is_special(3) for more information.
489
-+*/
490
-+int netsnmp_sd_is_special(int fd, const char *path);
491
-+
492
-+/*
493
-+  Helper call for identifying a passed file descriptor. Returns 1 if
494
-+  the file descriptor is a socket of the specified family (AF_INET,
495
-+  ...) and type (SOCK_DGRAM, SOCK_STREAM, ...), 0 otherwise. If
496
-+  family is 0 a socket family check will not be done. If type is 0 a
497
-+  socket type check will not be done and the call only verifies if
498
-+  the file descriptor refers to a socket. If listening is > 0 it is
499
-+  verified that the socket is in listening mode. (i.e. listen() has
500
-+  been called) If listening is == 0 it is verified that the socket is
501
-+  not in listening mode. If listening is < 0 no listening mode check
502
-+  is done. Returns a negative errno style error code on failure.
503
-+
504
-+  See sd_is_socket(3) for more information.
505
-+*/
506
-+int netsnmp_sd_is_socket(int fd, int family, int type, int listening);
507
-+
508
-+/*
509
-+  Helper call for identifying a passed file descriptor. Returns 1 if
510
-+  the file descriptor is an Internet socket, of the specified family
511
-+  (either AF_INET or AF_INET6) and the specified type (SOCK_DGRAM,
512
-+  SOCK_STREAM, ...), 0 otherwise. If version is 0 a protocol version
513
-+  check is not done. If type is 0 a socket type check will not be
514
-+  done. If port is 0 a socket port check will not be done. The
515
-+  listening flag is used the same way as in sd_is_socket(). Returns a
516
-+  negative errno style error code on failure.
517
-+
518
-+  See sd_is_socket_inet(3) for more information.
519
-+*/
520
-+int netsnmp_sd_is_socket_inet(int fd, int family, int type, int listening, uint16_t port);
521
-+
522
-+/*
523
-+  Helper call for identifying a passed file descriptor. Returns 1 if
524
-+  the file descriptor is an AF_UNIX socket of the specified type
525
-+  (SOCK_DGRAM, SOCK_STREAM, ...) and path, 0 otherwise. If type is 0
526
-+  a socket type check will not be done. If path is NULL a socket path
527
-+  check will not be done. For normal AF_UNIX sockets set length to
528
-+  0. For abstract namespace sockets set length to the length of the
529
-+  socket name (including the initial 0 byte), and pass the full
530
-+  socket path in path (including the initial 0 byte). The listening
531
-+  flag is used the same way as in sd_is_socket(). Returns a negative
532
-+  errno style error code on failure.
533
-+
534
-+  See sd_is_socket_unix(3) for more information.
535
-+*/
536
-+int netsnmp_sd_is_socket_unix(int fd, int type, int listening, const char *path, size_t length);
537
-+
538
-+/*
539
-+  Informs systemd about changed daemon state. This takes a number of
540
-+  newline separated environment-style variable assignments in a
541
-+  string. The following variables are known:
542
-+
543
-+     READY=1      Tells systemd that daemon startup is finished (only
544
-+                  relevant for services of Type=notify). The passed
545
-+                  argument is a boolean "1" or "0". Since there is
546
-+                  little value in signaling non-readiness the only
547
-+                  value daemons should send is "READY=1".
548
-+
549
-+     STATUS=...   Passes a single-line status string back to systemd
550
-+                  that describes the daemon state. This is free-from
551
-+                  and can be used for various purposes: general state
552
-+                  feedback, fsck-like programs could pass completion
553
-+                  percentages and failing programs could pass a human
554
-+                  readable error message. Example: "STATUS=Completed
555
-+                  66% of file system check..."
556
-+
557
-+     ERRNO=...    If a daemon fails, the errno-style error code,
558
-+                  formatted as string. Example: "ERRNO=2" for ENOENT.
559
-+
560
-+     BUSERROR=... If a daemon fails, the D-Bus error-style error
561
-+                  code. Example: "BUSERROR=org.freedesktop.DBus.Error.TimedOut"
562
-+
563
-+     MAINPID=...  The main pid of a daemon, in case systemd did not
564
-+                  fork off the process itself. Example: "MAINPID=4711"
565
-+
566
-+  Daemons can choose to send additional variables. However, it is
567
-+  recommended to prefix variable names not listed above with X_.
568
-+
569
-+  Returns a negative errno-style error code on failure. Returns > 0
570
-+  if systemd could be notified, 0 if it couldn't possibly because
571
-+  systemd is not running.
572
-+
573
-+  Example: When a daemon finished starting up, it could issue this
574
-+  call to notify systemd about it:
575
-+
576
-+     sd_notify(0, "READY=1");
577
-+
578
-+  See sd_notifyf() for more complete examples.
579
-+
580
-+  See sd_notify(3) for more information.
581
-+*/
582
-+int netsnmp_sd_notify(int unset_environment, const char *state);
583
-+
584
-+/*
585
-+  Similar to sd_notify() but takes a format string.
586
-+
587
-+  Example 1: A daemon could send the following after initialization:
588
-+
589
-+     sd_notifyf(0, "READY=1\n"
590
-+                   "STATUS=Processing requests...\n"
591
-+                   "MAINPID=%lu",
592
-+                   (unsigned long) getpid());
593
-+
594
-+  Example 2: A daemon could send the following shortly before
595
-+  exiting, on failure:
596
-+
597
-+     sd_notifyf(0, "STATUS=Failed to start up: %s\n"
598
-+                   "ERRNO=%i",
599
-+                   strerror(errno),
600
-+                   errno);
601
-+
602
-+  See sd_notifyf(3) for more information.
603
-+*/
604
-+int netsnmp_sd_notifyf(int unset_environment, const char *format, ...) _sd_printf_attr_(2,3);
605
-+
606
-+/*
607
-+  Returns > 0 if the system was booted with systemd. Returns < 0 on
608
-+  error. Returns 0 if the system was not booted with systemd. Note
609
-+  that all of the functions above handle non-systemd boots just
610
-+  fine. You should NOT protect them with a call to this function. Also
611
-+  note that this function checks whether the system, not the user
612
-+  session is controlled by systemd. However the functions above work
613
-+  for both user and system services.
614
-+
615
-+  See sd_booted(3) for more information.
616
-+*/
617
-+int netsnmp_sd_booted(void);
618
-+
619
-+/**
620
-+ * Find an socket with given parameters. See man sd_is_socket_inet for
621
-+ * description of the arguments.
622
-+ *
623
-+ * Returns the file descriptor if it is found, 0 otherwise.
624
-+ */
625
-+int netsnmp_sd_find_inet_socket(int family, int type, int listening, int port);
626
-+
627
-+/**
628
-+ * Find an unix socket with given parameters. See man sd_is_socket_unix for
629
-+ * description of the arguments.
630
-+ *
631
-+ * Returns the file descriptor if it is found, 0 otherwise.
632
-+ */
633
-+int
634
-+netsnmp_sd_find_unix_socket(int type, int listening, const char *path);
635
-+
636
-+#ifdef __cplusplus
637
-+}
638
-+#endif
639
-+
640
-+#endif /* SNMPD_SD_DAEMON_H */
641
-diff -up net-snmp-5.7.3/include/net-snmp/net-snmp-config.h.in.MPGqYh net-snmp-5.7.3/include/net-snmp/net-snmp-config.h.in
642
-+++ net-snmp-5.7.3/include/net-snmp/net-snmp-config.h.in	2015-02-17 13:34:05.746221843 +0100
643
-@@ -1410,6 +1410,9 @@
644
- /* If you don't have root access don't exit upon kmem errors */
645
- #undef NETSNMP_NO_ROOT_ACCESS
646
- 
647
-+/* If you don't want to integrate with systemd. */
648
-+#undef NETSNMP_NO_SYSTEMD
649
-+
650
- /* Define if you want to remove all SET/write access from the code */
651
- #undef NETSNMP_NO_WRITE_SUPPORT
652
- 
653
-diff -up net-snmp-5.7.3/README.systemd.MPGqYh net-snmp-5.7.3/README.systemd
654
-+++ net-snmp-5.7.3/README.systemd	2015-02-17 13:34:05.747221843 +0100
655
-@@ -0,0 +1,41 @@
656
-+README.systemd
657
-+--------------
658
-+Net-SNMP provides two daemons, which support systemd system manager. 
659
-+See http://www.freedesktop.org/wiki/Software/systemd to learn how
660
-+systemd works. Both socket activation and notification is supported by these
661
-+daemons.
662
-+
663
-+To enable systemd support, the sources must be compiled with
664
-+--with-systemd configure option.
665
-+
666
-+snmpd - The SNMP agent
667
-+----------------------
668
-+Socket activation od snmpd daemon is implemented, but it's discouraged.
669
-+The reason is simple - snmpd not only listens and processes SNMP requests
670
-+from network, but also gathers system statistics counters, sends traps and
671
-+communicates with subagents. It even opens few netlink sockets.
672
-+
673
-+In other words, snmpd should run from system start to properly work.
674
-+This can be done in two ways:
675
-+1) either as snmpd service unit with 'Type=notification' and without a socket
676
-+   unit
677
-+2) or as snmpd service unit with 'Type=simple', appropriate socket socket unit
678
-+   and the snmpd service enabled. This way systemd creates the snmpd listening
679
-+   socket early during boot and passes the sockets to snmpd slightly later
680
-+   (but still during machine boot). This way systemd can paralelize start of
681
-+   services, which depend on snmpd. Admins must adjust the socket file manually,
682
-+   depending if the snmpd support AgentX, IPv6, SMUX etc.
683
-+
684
-+snmpd should be started with '-f' command line parameter to disable forking -
685
-+systemd does that for us automatically.
686
-+
687
-+
688
-+snmptrapd - The trap processing daemon
689
-+--------------------------------------
690
-+snmptrapd supports full socket activation and also notification (if needed).
691
-+Both 'Type=simple' (with appropriate socket unit) and 'Type=notify' services
692
-+will work. Again, '-f' parameter should be provided on snmptrapd command line.
693
-+
694
-+If integration with SNMP agent using AgentX protocol is enabled, snmptrapd should
695
-+start during boot and not after first SNMP trap arrives. Same rules as for snmpd
696
-+applies then.
697
-\ No newline at end of file
698
-diff -up net-snmp-5.7.3/snmplib/sd-daemon.c.MPGqYh net-snmp-5.7.3/snmplib/sd-daemon.c
699
-+++ net-snmp-5.7.3/snmplib/sd-daemon.c	2015-02-17 13:34:05.747221843 +0100
700
-@@ -0,0 +1,532 @@
701
-+/*
702
-+ * Systemd integration parts.
703
-+ *
704
-+ * Most of this file is directly copied from systemd sources.
705
-+ * Changes:
706
-+ * - all functions were renamed to have netsnmp_ prefix
707
-+ * - includes were  changed to match Net-SNMP style.
708
-+ * - removed gcc export macros
709
-+ * - removed POSIX message queues
710
-+ */
711
-+
712
-+#include <net-snmp/net-snmp-config.h>
713
-+#include <net-snmp/net-snmp-features.h>
714
-+#include <net-snmp/types.h>
715
-+#include <net-snmp/library/snmp_debug.h>
716
-+
717
-+#ifndef NETSNMP_NO_SYSTEMD
718
-+
719
-+/***
720
-+  Copyright 2010 Lennart Poettering
721
-+
722
-+  Permission is hereby granted, free of charge, to any person
723
-+  obtaining a copy of this software and associated documentation files
724
-+  (the "Software"), to deal in the Software without restriction,
725
-+  including without limitation the rights to use, copy, modify, merge,
726
-+  publish, distribute, sublicense, and/or sell copies of the Software,
727
-+  and to permit persons to whom the Software is furnished to do so,
728
-+  subject to the following conditions:
729
-+
730
-+  The above copyright notice and this permission notice shall be
731
-+  included in all copies or substantial portions of the Software.
732
-+
733
-+  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
734
-+  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
735
-+  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
736
-+  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
737
-+  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
738
-+  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
739
-+  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
740
-+  SOFTWARE.
741
-+***/
742
-+
743
-+#ifndef _GNU_SOURCE
744
-+#define _GNU_SOURCE
745
-+#endif
746
-+
747
-+#include <sys/types.h>
748
-+#include <sys/stat.h>
749
-+#include <sys/socket.h>
750
-+#include <sys/un.h>
751
-+#include <sys/fcntl.h>
752
-+#include <netinet/in.h>
753
-+#include <stdlib.h>
754
-+#include <errno.h>
755
-+#include <unistd.h>
756
-+#include <string.h>
757
-+#include <stdarg.h>
758
-+#include <stdio.h>
759
-+#include <stddef.h>
760
-+#include <limits.h>
761
-+
762
-+#include <net-snmp/library/sd-daemon.h>
763
-+
764
-+int netsnmp_sd_listen_fds(int unset_environment) {
765
-+
766
-+        int r, fd;
767
-+        const char *e;
768
-+        char *p = NULL;
769
-+        unsigned long l;
770
-+
771
-+        if (!(e = getenv("LISTEN_PID"))) {
772
-+                r = 0;
773
-+                goto finish;
774
-+        }
775
-+
776
-+        errno = 0;
777
-+        l = strtoul(e, &p, 10);
778
-+
779
-+        if (errno != 0) {
780
-+                r = -errno;
781
-+                goto finish;
782
-+        }
783
-+
784
-+        if (!p || *p || l <= 0) {
785
-+                r = -EINVAL;
786
-+                goto finish;
787
-+        }
788
-+
789
-+        /* Is this for us? */
790
-+        if (getpid() != (pid_t) l) {
791
-+                r = 0;
792
-+                goto finish;
793
-+        }
794
-+
795
-+        if (!(e = getenv("LISTEN_FDS"))) {
796
-+                r = 0;
797
-+                goto finish;
798
-+        }
799
-+
800
-+        errno = 0;
801
-+        l = strtoul(e, &p, 10);
802
-+
803
-+        if (errno != 0) {
804
-+                r = -errno;
805
-+                goto finish;
806
-+        }
807
-+
808
-+        if (!p || *p) {
809
-+                r = -EINVAL;
810
-+                goto finish;
811
-+        }
812
-+
813
-+        for (fd = SD_LISTEN_FDS_START; fd < SD_LISTEN_FDS_START + (int) l; fd ++) {
814
-+                int flags;
815
-+
816
-+                if ((flags = fcntl(fd, F_GETFD)) < 0) {
817
-+                        r = -errno;
818
-+                        goto finish;
819
-+                }
820
-+
821
-+                if (flags & FD_CLOEXEC)
822
-+                        continue;
823
-+
824
-+                if (fcntl(fd, F_SETFD, flags | FD_CLOEXEC) < 0) {
825
-+                        r = -errno;
826
-+                        goto finish;
827
-+                }
828
-+        }
829
-+
830
-+        r = (int) l;
831
-+
832
-+finish:
833
-+        if (unset_environment) {
834
-+                unsetenv("LISTEN_PID");
835
-+                unsetenv("LISTEN_FDS");
836
-+        }
837
-+
838
-+        return r;
839
-+}
840
-+
841
-+int netsnmp_sd_is_fifo(int fd, const char *path) {
842
-+        struct stat st_fd;
843
-+
844
-+        if (fd < 0)
845
-+                return -EINVAL;
846
-+
847
-+        memset(&st_fd, 0, sizeof(st_fd));
848
-+        if (fstat(fd, &st_fd) < 0)
849
-+                return -errno;
850
-+
851
-+        if (!S_ISFIFO(st_fd.st_mode))
852
-+                return 0;
853
-+
854
-+        if (path) {
855
-+                struct stat st_path;
856
-+
857
-+                memset(&st_path, 0, sizeof(st_path));
858
-+                if (stat(path, &st_path) < 0) {
859
-+
860
-+                        if (errno == ENOENT || errno == ENOTDIR)
861
-+                                return 0;
862
-+
863
-+                        return -errno;
864
-+                }
865
-+
866
-+                return
867
-+                        st_path.st_dev == st_fd.st_dev &&
868
-+                        st_path.st_ino == st_fd.st_ino;
869
-+        }
870
-+
871
-+        return 1;
872
-+}
873
-+
874
-+int netsnmp_sd_is_special(int fd, const char *path) {
875
-+        struct stat st_fd;
876
-+
877
-+        if (fd < 0)
878
-+                return -EINVAL;
879
-+
880
-+        if (fstat(fd, &st_fd) < 0)
881
-+                return -errno;
882
-+
883
-+        if (!S_ISREG(st_fd.st_mode) && !S_ISCHR(st_fd.st_mode))
884
-+                return 0;
885
-+
886
-+        if (path) {
887
-+                struct stat st_path;
888
-+
889
-+                if (stat(path, &st_path) < 0) {
890
-+
891
-+                        if (errno == ENOENT || errno == ENOTDIR)
892
-+                                return 0;
893
-+
894
-+                        return -errno;
895
-+                }
896
-+
897
-+                if (S_ISREG(st_fd.st_mode) && S_ISREG(st_path.st_mode))
898
-+                        return
899
-+                                st_path.st_dev == st_fd.st_dev &&
900
-+                                st_path.st_ino == st_fd.st_ino;
901
-+                else if (S_ISCHR(st_fd.st_mode) && S_ISCHR(st_path.st_mode))
902
-+                        return st_path.st_rdev == st_fd.st_rdev;
903
-+                else
904
-+                        return 0;
905
-+        }
906
-+
907
-+        return 1;
908
-+}
909
-+
910
-+static int sd_is_socket_internal(int fd, int type, int listening) {
911
-+        struct stat st_fd;
912
-+
913
-+        if (fd < 0 || type < 0)
914
-+                return -EINVAL;
915
-+
916
-+        if (fstat(fd, &st_fd) < 0)
917
-+                return -errno;
918
-+
919
-+        if (!S_ISSOCK(st_fd.st_mode))
920
-+                return 0;
921
-+
922
-+        if (type != 0) {
923
-+                int other_type = 0;
924
-+                socklen_t l = sizeof(other_type);
925
-+
926
-+                if (getsockopt(fd, SOL_SOCKET, SO_TYPE, &other_type, &l) < 0)
927
-+                        return -errno;
928
-+
929
-+                if (l != sizeof(other_type))
930
-+                        return -EINVAL;
931
-+
932
-+                if (other_type != type)
933
-+                        return 0;
934
-+        }
935
-+
936
-+        if (listening >= 0) {
937
-+                int accepting = 0;
938
-+                socklen_t l = sizeof(accepting);
939
-+
940
-+                if (getsockopt(fd, SOL_SOCKET, SO_ACCEPTCONN, &accepting, &l) < 0)
941
-+                        return -errno;
942
-+
943
-+                if (l != sizeof(accepting))
944
-+                        return -EINVAL;
945
-+
946
-+                if (!accepting != !listening)
947
-+                        return 0;
948
-+        }
949
-+
950
-+        return 1;
951
-+}
952
-+
953
-+union sockaddr_union {
954
-+        struct sockaddr sa;
955
-+        struct sockaddr_in in4;
956
-+        struct sockaddr_in6 in6;
957
-+        struct sockaddr_un un;
958
-+        struct sockaddr_storage storage;
959
-+};
960
-+
961
-+int netsnmp_sd_is_socket(int fd, int family, int type, int listening) {
962
-+        int r;
963
-+
964
-+        if (family < 0)
965
-+                return -EINVAL;
966
-+
967
-+        if ((r = sd_is_socket_internal(fd, type, listening)) <= 0)
968
-+                return r;
969
-+
970
-+        if (family > 0) {
971
-+                union sockaddr_union sockaddr;
972
-+                socklen_t l;
973
-+
974
-+                memset(&sockaddr, 0, sizeof(sockaddr));
975
-+                l = sizeof(sockaddr);
976
-+
977
-+                if (getsockname(fd, &sockaddr.sa, &l) < 0)
978
-+                        return -errno;
979
-+
980
-+                if (l < sizeof(sa_family_t))
981
-+                        return -EINVAL;
982
-+
983
-+                return sockaddr.sa.sa_family == family;
984
-+        }
985
-+
986
-+        return 1;
987
-+}
988
-+
989
-+int netsnmp_sd_is_socket_inet(int fd, int family, int type, int listening, uint16_t port) {
990
-+        union sockaddr_union sockaddr;
991
-+        socklen_t l;
992
-+        int r;
993
-+
994
-+        if (family != 0 && family != AF_INET && family != AF_INET6)
995
-+                return -EINVAL;
996
-+
997
-+        if ((r = sd_is_socket_internal(fd, type, listening)) <= 0)
998
-+                return r;
999
-+
1000
-+        memset(&sockaddr, 0, sizeof(sockaddr));
1001
-+        l = sizeof(sockaddr);
1002
-+
1003
-+        if (getsockname(fd, &sockaddr.sa, &l) < 0)
1004
-+                return -errno;
1005
-+
1006
-+        if (l < sizeof(sa_family_t))
1007
-+                return -EINVAL;
1008
-+
1009
-+        if (sockaddr.sa.sa_family != AF_INET &&
1010
-+            sockaddr.sa.sa_family != AF_INET6)
1011
-+                return 0;
1012
-+
1013
-+        if (family > 0)
1014
-+                if (sockaddr.sa.sa_family != family)
1015
-+                        return 0;
1016
-+
1017
-+        if (port > 0) {
1018
-+                if (sockaddr.sa.sa_family == AF_INET) {
1019
-+                        if (l < sizeof(struct sockaddr_in))
1020
-+                                return -EINVAL;
1021
-+
1022
-+                        return htons(port) == sockaddr.in4.sin_port;
1023
-+                } else {
1024
-+                        if (l < sizeof(struct sockaddr_in6))
1025
-+                                return -EINVAL;
1026
-+
1027
-+                        return htons(port) == sockaddr.in6.sin6_port;
1028
-+                }
1029
-+        }
1030
-+
1031
-+        return 1;
1032
-+}
1033
-+
1034
-+int netsnmp_sd_is_socket_unix(int fd, int type, int listening, const char *path, size_t length) {
1035
-+        union sockaddr_union sockaddr;
1036
-+        socklen_t l;
1037
-+        int r;
1038
-+
1039
-+        if ((r = sd_is_socket_internal(fd, type, listening)) <= 0)
1040
-+                return r;
1041
-+
1042
-+        memset(&sockaddr, 0, sizeof(sockaddr));
1043
-+        l = sizeof(sockaddr);
1044
-+
1045
-+        if (getsockname(fd, &sockaddr.sa, &l) < 0)
1046
-+                return -errno;
1047
-+
1048
-+        if (l < sizeof(sa_family_t))
1049
-+                return -EINVAL;
1050
-+
1051
-+        if (sockaddr.sa.sa_family != AF_UNIX)
1052
-+                return 0;
1053
-+
1054
-+        if (path) {
1055
-+                if (length <= 0)
1056
-+                        length = strlen(path);
1057
-+
1058
-+                if (length <= 0)
1059
-+                        /* Unnamed socket */
1060
-+                        return l == offsetof(struct sockaddr_un, sun_path);
1061
-+
1062
-+                if (path[0])
1063
-+                        /* Normal path socket */
1064
-+                        return
1065
-+                                (l >= offsetof(struct sockaddr_un, sun_path) + length + 1) &&
1066
-+                                memcmp(path, sockaddr.un.sun_path, length+1) == 0;
1067
-+                else
1068
-+                        /* Abstract namespace socket */
1069
-+                        return
1070
-+                                (l == offsetof(struct sockaddr_un, sun_path) + length) &&
1071
-+                                memcmp(path, sockaddr.un.sun_path, length) == 0;
1072
-+        }
1073
-+
1074
-+        return 1;
1075
-+}
1076
-+
1077
-+int netsnmp_sd_notify(int unset_environment, const char *state) {
1078
-+        int fd = -1, r;
1079
-+        struct msghdr msghdr;
1080
-+        struct iovec iovec;
1081
-+        union sockaddr_union sockaddr;
1082
-+        const char *e;
1083
-+
1084
-+        if (!state) {
1085
-+                r = -EINVAL;
1086
-+                goto finish;
1087
-+        }
1088
-+
1089
-+        if (!(e = getenv("NOTIFY_SOCKET")))
1090
-+                return 0;
1091
-+
1092
-+        /* Must be an abstract socket, or an absolute path */
1093
-+        if ((e[0] != '@' && e[0] != '/') || e[1] == 0) {
1094
-+                r = -EINVAL;
1095
-+                goto finish;
1096
-+        }
1097
-+
1098
-+        if ((fd = socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0)) < 0) {
1099
-+                r = -errno;
1100
-+                goto finish;
1101
-+        }
1102
-+
1103
-+        memset(&sockaddr, 0, sizeof(sockaddr));
1104
-+        sockaddr.sa.sa_family = AF_UNIX;
1105
-+        strncpy(sockaddr.un.sun_path, e, sizeof(sockaddr.un.sun_path));
1106
-+
1107
-+        if (sockaddr.un.sun_path[0] == '@')
1108
-+                sockaddr.un.sun_path[0] = 0;
1109
-+
1110
-+        memset(&iovec, 0, sizeof(iovec));
1111
-+        iovec.iov_base = (char *)state;
1112
-+        iovec.iov_len = strlen(state);
1113
-+
1114
-+        memset(&msghdr, 0, sizeof(msghdr));
1115
-+        msghdr.msg_name = &sockaddr;
1116
-+        msghdr.msg_namelen = offsetof(struct sockaddr_un, sun_path) + strlen(e);
1117
-+
1118
-+        if (msghdr.msg_namelen > sizeof(struct sockaddr_un))
1119
-+                msghdr.msg_namelen = sizeof(struct sockaddr_un);
1120
-+
1121
-+        msghdr.msg_iov = &iovec;
1122
-+        msghdr.msg_iovlen = 1;
1123
-+
1124
-+        if (sendmsg(fd, &msghdr, MSG_NOSIGNAL) < 0) {
1125
-+                r = -errno;
1126
-+                goto finish;
1127
-+        }
1128
-+
1129
-+        r = 1;
1130
-+
1131
-+finish:
1132
-+        if (unset_environment)
1133
-+                unsetenv("NOTIFY_SOCKET");
1134
-+
1135
-+        if (fd >= 0)
1136
-+                close(fd);
1137
-+
1138
-+        return r;
1139
-+}
1140
-+
1141
-+int netsnmp_sd_notifyf(int unset_environment, const char *format, ...) {
1142
-+        va_list ap;
1143
-+        char *p = NULL;
1144
-+        int r;
1145
-+
1146
-+        va_start(ap, format);
1147
-+        r = vasprintf(&p, format, ap);
1148
-+        va_end(ap);
1149
-+
1150
-+        if (r < 0 || !p)
1151
-+                return -ENOMEM;
1152
-+
1153
-+        r = netsnmp_sd_notify(unset_environment, p);
1154
-+        free(p);
1155
-+
1156
-+        return r;
1157
-+}
1158
-+
1159
-+int netsnmp_sd_booted(void) {
1160
-+        struct stat a, b;
1161
-+
1162
-+        /* We simply test whether the systemd cgroup hierarchy is
1163
-+         * mounted */
1164
-+
1165
-+        if (lstat("/sys/fs/cgroup", &a) < 0)
1166
-+                return 0;
1167
-+
1168
-+        if (lstat("/sys/fs/cgroup/systemd", &b) < 0)
1169
-+                return 0;
1170
-+
1171
-+        return a.st_dev != b.st_dev;
1172
-+}
1173
-+
1174
-+/* End of original sd-daemon.c from systemd sources */
1175
-+
1176
-+int
1177
-+netsnmp_sd_find_inet_socket(int family, int type, int listening, int port)
1178
-+{
1179
-+    int count, fd;
1180
-+
1181
-+    count = netsnmp_sd_listen_fds(0);
1182
-+    if (count <= 0) {
1183
-+        DEBUGMSGTL(("systemd:find_inet_socket", "No LISTEN_FDS found.\n"));
1184
-+        return 0;
1185
-+    }
1186
-+    DEBUGMSGTL(("systemd:find_inet_socket", "LISTEN_FDS reports %d sockets.\n",
1187
-+            count));
1188
-+
1189
-+    for (fd = 3; fd < 3+count; fd++) {
1190
-+        int rc = netsnmp_sd_is_socket_inet(fd, family, type, listening, port);
1191
-+        if (rc < 0)
1192
-+            DEBUGMSGTL(("systemd:find_inet_socket",
1193
-+                    "sd_is_socket_inet error: %d\n", rc));
1194
-+        if (rc > 0) {
1195
-+            DEBUGMSGTL(("systemd:find_inet_socket",
1196
-+                    "Found the socket in LISTEN_FDS\n"));
1197
-+            return fd;
1198
-+        }
1199
-+    }
1200
-+    DEBUGMSGTL(("systemd:find_inet_socket", "Socket not found in LISTEN_FDS\n"));
1201
-+    return 0;
1202
-+}
1203
-+
1204
-+int
1205
-+netsnmp_sd_find_unix_socket(int type, int listening, const char *path)
1206
-+{
1207
-+    int count, fd;
1208
-+
1209
-+    count = netsnmp_sd_listen_fds(0);
1210
-+    if (count <= 0) {
1211
-+        DEBUGMSGTL(("systemd:find_unix_socket", "No LISTEN_FDS found.\n"));
1212
-+        return 0;
1213
-+    }
1214
-+    DEBUGMSGTL(("systemd:find_unix_socket", "LISTEN_FDS reports %d sockets.\n",
1215
-+            count));
1216
-+
1217
-+    for (fd = 3; fd < 3+count; fd++) {
1218
-+        int rc = netsnmp_sd_is_socket_unix(fd, type, listening, path, 0);
1219
-+        if (rc < 0)
1220
-+            DEBUGMSGTL(("systemd:find_unix_socket",
1221
-+                    "netsnmp_sd_is_socket_unix error: %d\n", rc));
1222
-+        if (rc > 0) {
1223
-+            DEBUGMSGTL(("systemd:find_unix_socket",
1224
-+                    "Found the socket in LISTEN_FDS\n"));
1225
-+            return fd;
1226
-+        }
1227
-+    }
1228
-+    DEBUGMSGTL(("systemd:find_unix_socket", "Socket not found in LISTEN_FDS\n"));
1229
-+    return 0;
1230
-+}
1231
-+
1232
-+#endif /* ! NETSNMP_NO_SYSTEMD */
1233
-diff -up net-snmp-5.7.3/snmplib/transports/snmpTCPDomain.c.MPGqYh net-snmp-5.7.3/snmplib/transports/snmpTCPDomain.c
1234
-+++ net-snmp-5.7.3/snmplib/transports/snmpTCPDomain.c	2015-02-17 13:34:05.748221842 +0100
1235
-@@ -43,6 +43,10 @@
1236
- #include <net-snmp/library/snmpTCPBaseDomain.h>
1237
- #include <net-snmp/library/tools.h>
1238
- 
1239
-+#ifndef NETSNMP_NO_SYSTEMD
1240
-+#include <net-snmp/library/sd-daemon.h>
1241
-+#endif
1242
-+
1243
- /*
1244
-  * needs to be in sync with the definitions in snmplib/snmpUDPDomain.c
1245
-  * and perl/agent/agent.xs
1246
-@@ -149,6 +153,7 @@ netsnmp_tcp_transport(struct sockaddr_in
1247
-     netsnmp_transport *t = NULL;
1248
-     netsnmp_udp_addr_pair *addr_pair = NULL;
1249
-     int rc = 0;
1250
-+    int socket_initialized = 0;
1251
- 
1252
- #ifdef NETSNMP_NO_LISTEN_SUPPORT
1253
-     if (local)
1254
-@@ -178,7 +183,19 @@ netsnmp_tcp_transport(struct sockaddr_in
1255
-     t->domain_length =
1256
-         sizeof(netsnmp_snmpTCPDomain) / sizeof(netsnmp_snmpTCPDomain[0]);
1257
- 
1258
--    t->sock = socket(PF_INET, SOCK_STREAM, 0);
1259
-+#ifndef NETSNMP_NO_SYSTEMD
1260
-+    /*
1261
-+     * Maybe the socket was already provided by systemd...
1262
-+     */
1263
-+    if (local) {
1264
-+        t->sock = netsnmp_sd_find_inet_socket(PF_INET, SOCK_STREAM, 1,
1265
-+                ntohs(addr->sin_port));
1266
-+        if (t->sock)
1267
-+            socket_initialized = 1;
1268
-+    }
1269
-+#endif
1270
-+    if (!socket_initialized)
1271
-+        t->sock = socket(PF_INET, SOCK_STREAM, 0);
1272
-     if (t->sock < 0) {
1273
-         netsnmp_transport_free(t);
1274
-         return NULL;
1275
-@@ -215,11 +232,13 @@ netsnmp_tcp_transport(struct sockaddr_in
1276
-         setsockopt(t->sock, SOL_SOCKET, SO_REUSEADDR, (void *)&opt,
1277
- 		   sizeof(opt));
1278
- 
1279
--        rc = bind(t->sock, (struct sockaddr *)addr, sizeof(struct sockaddr));
1280
--        if (rc != 0) {
1281
--            netsnmp_socketbase_close(t);
1282
--            netsnmp_transport_free(t);
1283
--            return NULL;
1284
-+        if (!socket_initialized) {
1285
-+            rc = bind(t->sock, (struct sockaddr *)addr, sizeof(struct sockaddr));
1286
-+            if (rc != 0) {
1287
-+                netsnmp_socketbase_close(t);
1288
-+                netsnmp_transport_free(t);
1289
-+                return NULL;
1290
-+            }
1291
-         }
1292
- 
1293
-         /*
1294
-@@ -235,12 +254,13 @@ netsnmp_tcp_transport(struct sockaddr_in
1295
-         /*
1296
-          * Now sit here and wait for connections to arrive.  
1297
-          */
1298
--
1299
--        rc = listen(t->sock, NETSNMP_STREAM_QUEUE_LEN);
1300
--        if (rc != 0) {
1301
--            netsnmp_socketbase_close(t);
1302
--            netsnmp_transport_free(t);
1303
--            return NULL;
1304
-+        if (!socket_initialized) {
1305
-+            rc = listen(t->sock, NETSNMP_STREAM_QUEUE_LEN);
1306
-+            if (rc != 0) {
1307
-+                netsnmp_socketbase_close(t);
1308
-+                netsnmp_transport_free(t);
1309
-+                return NULL;
1310
-+            }
1311
-         }
1312
-         
1313
-         /*
1314
-diff -up net-snmp-5.7.3/snmplib/transports/snmpTCPIPv6Domain.c.MPGqYh net-snmp-5.7.3/snmplib/transports/snmpTCPIPv6Domain.c
1315
-+++ net-snmp-5.7.3/snmplib/transports/snmpTCPIPv6Domain.c	2015-02-17 13:34:05.748221842 +0100
1316
-@@ -49,6 +49,10 @@
1317
- #include <net-snmp/library/snmpTCPBaseDomain.h>
1318
- #include <net-snmp/library/tools.h>
1319
- 
1320
-+#ifndef NETSNMP_NO_SYSTEMD
1321
-+#include <net-snmp/library/sd-daemon.h>
1322
-+#endif
1323
-+
1324
- #include "inet_ntop.h"
1325
- 
1326
- oid netsnmp_TCPIPv6Domain[] = { TRANSPORT_DOMAIN_TCP_IPV6 };
1327
-@@ -140,6 +144,7 @@ netsnmp_tcp6_transport(struct sockaddr_i
1328
- {
1329
-     netsnmp_transport *t = NULL;
1330
-     int             rc = 0;
1331
-+    int             socket_initialized = 0;
1332
- 
1333
- #ifdef NETSNMP_NO_LISTEN_SUPPORT
1334
-     if (local)
1335
-@@ -174,7 +179,19 @@ netsnmp_tcp6_transport(struct sockaddr_i
1336
-     t->domain = netsnmp_TCPIPv6Domain;
1337
-     t->domain_length = sizeof(netsnmp_TCPIPv6Domain) / sizeof(oid);
1338
- 
1339
--    t->sock = socket(PF_INET6, SOCK_STREAM, 0);
1340
-+#ifndef NETSNMP_NO_SYSTEMD
1341
-+    /*
1342
-+     * Maybe the socket was already provided by systemd...
1343
-+     */
1344
-+    if (local) {
1345
-+        t->sock = netsnmp_sd_find_inet_socket(PF_INET6, SOCK_STREAM, 1,
1346
-+                ntohs(addr->sin6_port));
1347
-+        if (t->sock)
1348
-+            socket_initialized = 1;
1349
-+    }
1350
-+#endif
1351
-+    if (!socket_initialized)
1352
-+        t->sock = socket(PF_INET6, SOCK_STREAM, 0);
1353
-     if (t->sock < 0) {
1354
-         netsnmp_transport_free(t);
1355
-         return NULL;
1356
-@@ -220,12 +237,14 @@ netsnmp_tcp6_transport(struct sockaddr_i
1357
- 
1358
-         setsockopt(t->sock, SOL_SOCKET, SO_REUSEADDR, (void *)&opt, sizeof(opt));
1359
- 
1360
--        rc = bind(t->sock, (struct sockaddr *) addr,
1361
--		  sizeof(struct sockaddr_in6));
1362
--        if (rc != 0) {
1363
--            netsnmp_socketbase_close(t);
1364
--            netsnmp_transport_free(t);
1365
--            return NULL;
1366
-+        if (!socket_initialized) {
1367
-+            rc = bind(t->sock, (struct sockaddr *) addr,
1368
-+                    sizeof(struct sockaddr_in6));
1369
-+            if (rc != 0) {
1370
-+                netsnmp_socketbase_close(t);
1371
-+                netsnmp_transport_free(t);
1372
-+                return NULL;
1373
-+            }
1374
-         }
1375
- 
1376
-         /*
1377
-@@ -242,11 +261,13 @@ netsnmp_tcp6_transport(struct sockaddr_i
1378
-          * Now sit here and wait for connections to arrive.  
1379
-          */
1380
- 
1381
--        rc = listen(t->sock, NETSNMP_STREAM_QUEUE_LEN);
1382
--        if (rc != 0) {
1383
--            netsnmp_socketbase_close(t);
1384
--            netsnmp_transport_free(t);
1385
--            return NULL;
1386
-+        if (!socket_initialized) {
1387
-+            rc = listen(t->sock, NETSNMP_STREAM_QUEUE_LEN);
1388
-+            if (rc != 0) {
1389
-+                netsnmp_socketbase_close(t);
1390
-+                netsnmp_transport_free(t);
1391
-+                return NULL;
1392
-+            }
1393
-         }
1394
-         
1395
-         /*
1396
-diff -up net-snmp-5.7.3/snmplib/transports/snmpUDPIPv4BaseDomain.c.MPGqYh net-snmp-5.7.3/snmplib/transports/snmpUDPIPv4BaseDomain.c
1397
-+++ net-snmp-5.7.3/snmplib/transports/snmpUDPIPv4BaseDomain.c	2015-02-17 13:36:22.744123462 +0100
1398
-@@ -40,6 +40,10 @@
1399
- 
1400
- #include <net-snmp/library/snmpSocketBaseDomain.h>
1401
- 
1402
-+#ifndef NETSNMP_NO_SYSTEMD
1403
-+#include <net-snmp/library/sd-daemon.h>
1404
-+#endif
1405
-+
1406
- #if defined(HAVE_IP_PKTINFO) || defined(HAVE_IP_RECVDSTADDR)
1407
- int netsnmp_udpipv4_recvfrom(int s, void *buf, int len, struct sockaddr *from,
1408
-                              socklen_t *fromlen, struct sockaddr *dstip,
1409
-@@ -64,6 +68,7 @@ netsnmp_udpipv4base_transport(struct soc
1410
-     char           *client_socket = NULL;
1411
-     netsnmp_indexed_addr_pair addr_pair;
1412
-     socklen_t       local_addr_len;
1413
-+    int             socket_initialized = 0;
1414
- 
1415
- #ifdef NETSNMP_NO_LISTEN_SUPPORT
1416
-     if (local)
1417
-@@ -88,7 +93,20 @@ netsnmp_udpipv4base_transport(struct soc
1418
-         free(str);
1419
-     }
1420
- 
1421
--    t->sock = socket(PF_INET, SOCK_DGRAM, 0);
1422
-+#ifndef NETSNMP_NO_SYSTEMD
1423
-+    /*
1424
-+     * Maybe the socket was already provided by systemd...
1425
-+     */
1426
-+    if (local) {
1427
-+        t->sock = netsnmp_sd_find_inet_socket(PF_INET, SOCK_DGRAM, -1,
1428
-+                ntohs(addr->sin_port));
1429
-+        if (t->sock)
1430
-+            socket_initialized = 1;
1431
-+    }
1432
-+#endif
1433
-+    if (!socket_initialized)
1434
-+        t->sock = socket(PF_INET, SOCK_DGRAM, 0);
1435
-+
1436
-     DEBUGMSGTL(("UDPBase", "openned socket %d as local=%d\n", t->sock, local)); 
1437
-     if (t->sock < 0) {
1438
-         netsnmp_transport_free(t);
1439
-@@ -151,12 +169,14 @@ netsnmp_udpipv4base_transport(struct soc
1440
-             }
1441
-         }
1442
- #endif /* !defined(WIN32) */
1443
--        rc = bind(t->sock, (struct sockaddr *) addr,
1444
--                  sizeof(struct sockaddr));
1445
--        if (rc != 0) {
1446
--            netsnmp_socketbase_close(t);
1447
--            netsnmp_transport_free(t);
1448
--            return NULL;
1449
-+        if (!socket_initialized) {
1450
-+            rc = bind(t->sock, (struct sockaddr *) addr,
1451
-+                    sizeof(struct sockaddr));
1452
-+            if (rc != 0) {
1453
-+                netsnmp_socketbase_close(t);
1454
-+                netsnmp_transport_free(t);
1455
-+                return NULL;
1456
-+            }
1457
-         }
1458
-         t->data = NULL;
1459
-         t->data_length = 0;
1460
-diff -up net-snmp-5.7.3/snmplib/transports/snmpUDPIPv6Domain.c.MPGqYh net-snmp-5.7.3/snmplib/transports/snmpUDPIPv6Domain.c
1461
-+++ net-snmp-5.7.3/snmplib/transports/snmpUDPIPv6Domain.c	2015-02-17 13:37:16.256087147 +0100
1462
-@@ -67,6 +67,10 @@ static const struct in6_addr in6addr_any
1463
- #include <net-snmp/library/snmpSocketBaseDomain.h>
1464
- #include <net-snmp/library/tools.h>
1465
- 
1466
-+#ifndef NETSNMP_NO_SYSTEMD
1467
-+#include <net-snmp/library/sd-daemon.h>
1468
-+#endif
1469
-+
1470
- #include "inet_ntop.h"
1471
- #include "inet_pton.h"
1472
- 
1473
-@@ -190,6 +194,7 @@ netsnmp_udp6_transport(struct sockaddr_i
1474
- {
1475
-     netsnmp_transport *t = NULL;
1476
-     int             rc = 0;
1477
-+    int             socket_initialized = 0;
1478
- 
1479
- #ifdef NETSNMP_NO_LISTEN_SUPPORT
1480
-     if (local)
1481
-@@ -217,7 +222,19 @@ netsnmp_udp6_transport(struct sockaddr_i
1482
-     t->domain_length =
1483
-         sizeof(netsnmp_UDPIPv6Domain) / sizeof(netsnmp_UDPIPv6Domain[0]);
1484
- 
1485
--    t->sock = socket(PF_INET6, SOCK_DGRAM, 0);
1486
-+#ifndef NETSNMP_NO_SYSTEMD
1487
-+    /*
1488
-+     * Maybe the socket was already provided by systemd...
1489
-+     */
1490
-+    if (local) {
1491
-+        t->sock = netsnmp_sd_find_inet_socket(PF_INET6, SOCK_DGRAM, -1,
1492
-+                ntohs(addr->sin6_port));
1493
-+        if (t->sock)
1494
-+            socket_initialized = 1;
1495
-+    }
1496
-+#endif
1497
-+    if (!socket_initialized)
1498
-+        t->sock = socket(PF_INET6, SOCK_DGRAM, 0);
1499
-     if (t->sock < 0) {
1500
-         netsnmp_transport_free(t);
1501
-         return NULL;
1502
-@@ -242,13 +259,14 @@ netsnmp_udp6_transport(struct sockaddr_i
1503
-             } 
1504
-         }
1505
- #endif
1506
--
1507
--        rc = bind(t->sock, (struct sockaddr *) addr,
1508
--		  sizeof(struct sockaddr_in6));
1509
--        if (rc != 0) {
1510
--            netsnmp_socketbase_close(t);
1511
--            netsnmp_transport_free(t);
1512
--            return NULL;
1513
-+        if (!socket_initialized) {
1514
-+            rc = bind(t->sock, (struct sockaddr *) addr,
1515
-+                    sizeof(struct sockaddr_in6));
1516
-+            if (rc != 0) {
1517
-+                netsnmp_socketbase_close(t);
1518
-+                netsnmp_transport_free(t);
1519
-+                return NULL;
1520
-+            }
1521
-         }
1522
-         t->local = (unsigned char*)malloc(18);
1523
-         if (t->local == NULL) {
1524
-diff -up net-snmp-5.7.3/snmplib/transports/snmpUnixDomain.c.MPGqYh net-snmp-5.7.3/snmplib/transports/snmpUnixDomain.c
1525
-+++ net-snmp-5.7.3/snmplib/transports/snmpUnixDomain.c	2015-02-17 13:34:05.749221841 +0100
1526
-@@ -37,6 +37,10 @@
1527
- #include <net-snmp/library/system.h> /* mkdirhier */
1528
- #include <net-snmp/library/tools.h>
1529
- 
1530
-+#ifndef NETSNMP_NO_SYSTEMD
1531
-+#include <net-snmp/library/sd-daemon.h>
1532
-+#endif
1533
-+
1534
- netsnmp_feature_child_of(transport_unix_socket_all, transport_all)
1535
- netsnmp_feature_child_of(unix_socket_paths, transport_unix_socket_all)
1536
- 
1537
-@@ -295,6 +299,7 @@ netsnmp_unix_transport(struct sockaddr_u
1538
-     netsnmp_transport *t = NULL;
1539
-     sockaddr_un_pair *sup = NULL;
1540
-     int             rc = 0;
1541
-+    int             socket_initialized = 0;
1542
- 
1543
- #ifdef NETSNMP_NO_LISTEN_SUPPORT
1544
-     /* SPECIAL CIRCUMSTANCE: We still want AgentX to be able to operate,
1545
-@@ -333,7 +338,18 @@ netsnmp_unix_transport(struct sockaddr_u
1546
-     t->data_length = sizeof(sockaddr_un_pair);
1547
-     sup = (sockaddr_un_pair *) t->data;
1548
- 
1549
--    t->sock = socket(PF_UNIX, SOCK_STREAM, 0);
1550
-+#ifndef NETSNMP_NO_SYSTEMD
1551
-+    /*
1552
-+     * Maybe the socket was already provided by systemd...
1553
-+     */
1554
-+    if (local) {
1555
-+        t->sock = netsnmp_sd_find_unix_socket(SOCK_STREAM, 1, addr->sun_path);
1556
-+        if (t->sock)
1557
-+            socket_initialized = 1;
1558
-+    }
1559
-+#endif
1560
-+    if (!socket_initialized)
1561
-+        t->sock = socket(PF_UNIX, SOCK_STREAM, 0);
1562
-     if (t->sock < 0) {
1563
-         netsnmp_transport_free(t);
1564
-         return NULL;
1565
-@@ -357,25 +373,26 @@ netsnmp_unix_transport(struct sockaddr_u
1566
- 
1567
-         t->flags |= NETSNMP_TRANSPORT_FLAG_LISTEN;
1568
- 
1569
--        unlink(addr->sun_path);
1570
--        rc = bind(t->sock, (struct sockaddr *) addr, SUN_LEN(addr));
1571
--
1572
--        if (rc != 0 && errno == ENOENT && create_path) {
1573
--            rc = mkdirhier(addr->sun_path, create_mode, 1);
1574
-+        if (!socket_initialized) {
1575
-+            unlink(addr->sun_path);
1576
-+            rc = bind(t->sock, (struct sockaddr *) addr, SUN_LEN(addr));
1577
-+            if (rc != 0 && errno == ENOENT && create_path) {
1578
-+                rc = mkdirhier(addr->sun_path, create_mode, 1);
1579
-+                if (rc != 0) {
1580
-+                    netsnmp_unix_close(t);
1581
-+                    netsnmp_transport_free(t);
1582
-+                    return NULL;
1583
-+                }
1584
-+                rc = bind(t->sock, (struct sockaddr *) addr, SUN_LEN(addr));
1585
-+            }
1586
-             if (rc != 0) {
1587
-+                DEBUGMSGTL(("netsnmp_unix_transport",
1588
-+                        "couldn't bind \"%s\", errno %d (%s)\n",
1589
-+                        addr->sun_path, errno, strerror(errno)));
1590
-                 netsnmp_unix_close(t);
1591
-                 netsnmp_transport_free(t);
1592
-                 return NULL;
1593
-             }
1594
--            rc = bind(t->sock, (struct sockaddr *) addr, SUN_LEN(addr));
1595
--        }
1596
--        if (rc != 0) {
1597
--            DEBUGMSGTL(("netsnmp_unix_transport",
1598
--                        "couldn't bind \"%s\", errno %d (%s)\n",
1599
--                        addr->sun_path, errno, strerror(errno)));
1600
--            netsnmp_unix_close(t);
1601
--            netsnmp_transport_free(t);
1602
--            return NULL;
1603
-         }
1604
- 
1605
-         /*
1606
-@@ -391,16 +408,17 @@ netsnmp_unix_transport(struct sockaddr_u
1607
-          * Now sit here and listen for connections to arrive.
1608
-          */
1609
- 
1610
--        rc = listen(t->sock, NETSNMP_STREAM_QUEUE_LEN);
1611
--        if (rc != 0) {
1612
--            DEBUGMSGTL(("netsnmp_unix_transport",
1613
--                        "couldn't listen to \"%s\", errno %d (%s)\n",
1614
--                        addr->sun_path, errno, strerror(errno)));
1615
--            netsnmp_unix_close(t);
1616
--            netsnmp_transport_free(t);
1617
--            return NULL;
1618
-+        if (!socket_initialized) {
1619
-+            rc = listen(t->sock, NETSNMP_STREAM_QUEUE_LEN);
1620
-+            if (rc != 0) {
1621
-+                DEBUGMSGTL(("netsnmp_unix_transport",
1622
-+                            "couldn't listen to \"%s\", errno %d (%s)\n",
1623
-+                            addr->sun_path, errno, strerror(errno)));
1624
-+                netsnmp_unix_close(t);
1625
-+                netsnmp_transport_free(t);
1626
-+                return NULL;
1627
-+            }
1628
-         }
1629
--
1630
-     } else {
1631
-         t->remote = (u_char *)malloc(strlen(addr->sun_path));
1632
-         if (t->remote == NULL) {
1633 1
deleted file mode 100644
... ...
@@ -1,121 +0,0 @@
1
-+++ b/snmplib/snmp_api.c
2
-@@ -4350,10 +4350,9 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length)
3
-     u_char          type;
4
-     u_char          msg_type;
5
-     u_char         *var_val;
6
--    int             badtype = 0;
7
-     size_t          len;
8
-     size_t          four;
9
--    netsnmp_variable_list *vp = NULL;
10
-+    netsnmp_variable_list *vp = NULL, *vplast = NULL;
11
-     oid             objid[MAX_OID_LEN];
12
-     u_char         *p;
13
- 
14
-@@ -4493,40 +4681,26 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length)
15
-                               (ASN_SEQUENCE | ASN_CONSTRUCTOR),
16
-                               "varbinds");
17
-     if (data == NULL)
18
--        return -1;
19
-+        goto fail;
20
- 
21
-     /*
22
-      * get each varBind sequence 
23
-      */
24
-     while ((int) *length > 0) {
25
--        netsnmp_variable_list *vptemp;
26
--        vptemp = (netsnmp_variable_list *) malloc(sizeof(*vptemp));
27
--        if (NULL == vptemp) {
28
--            return -1;
29
--        }
30
--        if (NULL == vp) {
31
--            pdu->variables = vptemp;
32
--        } else {
33
--            vp->next_variable = vptemp;
34
--        }
35
--        vp = vptemp;
36
-+        vp = SNMP_MALLOC_TYPEDEF(netsnmp_variable_list);
37
-+        if (NULL == vp)
38
-+            goto fail;
39
- 
40
--        vp->next_variable = NULL;
41
--        vp->val.string = NULL;
42
-         vp->name_length = MAX_OID_LEN;
43
--        vp->name = NULL;
44
--        vp->index = 0;
45
--        vp->data = NULL;
46
--        vp->dataFreeHook = NULL;
47
-         DEBUGDUMPSECTION("recv", "VarBind");
48
-         data = snmp_parse_var_op(data, objid, &vp->name_length, &vp->type,
49
-                                  &vp->val_len, &var_val, length);
50
-         if (data == NULL)
51
--            return -1;
52
-+            goto fail;
53
-         if (snmp_set_var_objid(vp, objid, vp->name_length))
54
--            return -1;
55
-+            goto fail;
56
- 
57
-         len = MAX_PACKET_LENGTH;
58
-         DEBUGDUMPHEADER("recv", "Value");
59
-         switch ((short) vp->type) {
60
-         case ASN_INTEGER:
61
-@@ -4533,7 +4533,7 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length)
62
-                 vp->val.string = (u_char *) malloc(vp->val_len);
63
-             }
64
-             if (vp->val.string == NULL) {
65
--                return -1;
66
-+                goto fail;
67
-             }
68
-             p = asn_parse_string(var_val, &len, &vp->type, vp->val.string,
69
-                              &vp->val_len);
70
-@@ -4541,7 +4526,7 @@
71
-             vp->val_len *= sizeof(oid);
72
-             vp->val.objid = (oid *) malloc(vp->val_len);
73
-             if (vp->val.objid == NULL) {
74
--                return -1;
75
-+                goto fail;
76
-             }
77
-             memmove(vp->val.objid, objid, vp->val_len);
78
-             break;
79
-@@ -4631,21 +4631,37 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length)
80
-         case ASN_BIT_STR:
81
-             vp->val.bitstring = (u_char *) malloc(vp->val_len);
82
-             if (vp->val.bitstring == NULL) {
83
--                return -1;
84
-+                goto fail;
85
-             }
86
-             p = asn_parse_bitstring(var_val, &len, &vp->type,
87
-                                 vp->val.bitstring, &vp->val_len);
88
-             if (!p)
89
--                return -1;
90
-+                goto fail;
91
-             break;
92
-         default:
93
-             snmp_log(LOG_ERR, "bad type returned (%x)\n", vp->type);
94
--            badtype = -1;
95
-+            goto fail;
96
-             break;
97
-         }
98
-         DEBUGINDENTADD(-4);
99
-+
100
-+        if (NULL == vplast) {
101
-+            pdu->variables = vp;
102
-+        } else {
103
-+            vplast->next_variable = vp;
104
-+        }
105
-+        vplast = vp;
106
-+        vp = NULL;
107
-     }
108
--    return badtype;
109
-+    return 0;
110
-+
111
-+  fail:
112
-+    DEBUGMSGTL(("recv", "error while parsing VarBindList\n"));
113
-+    /** if we were parsing a var, remove it from the pdu and free it */
114
-+    if (vp)
115
-+        snmp_free_var(vp);
116
-+
117
-+    return -1;
118
- }
119
- 
120
- /*
121 1
deleted file mode 100644
... ...
@@ -1,149 +0,0 @@
1
-From: Bart Van Assche <bvanassche@acm.org>
2
-Date: Sun, 24 Jul 2016 18:58:18 -0800
3
-Subject: Fix Perl module compilation
4
-
5
-Avoid that building the Net-SNMP Perl modules fails as follows:
6
-ERROR from evaluation of /sources/net-snmp-5.7.3/perl/ASN/Makefile.PL:Bizarre
7
-copy of HASH in list assignment at /usr/lib/perl5/site_perl/5.24.0/Carp.pm line 229.
8
-+++ b/perl/ASN/Makefile.PL
9
-@@ -7,9 +7,7 @@
10
- # See lib/ExtUtils/MakeMaker.pm for details of how to influence
11
- # the contents of the Makefile that is written.
12
- 
13
--%MakeParams = InitMakeParams();
14
--
15
--WriteMakefile(%MakeParams);
16
-+WriteMakefile(InitMakeParams());
17
- 
18
- Check_Version();
19
-
20
-+++ b/perl/Makefile.PL
21
-@@ -3,9 +3,7 @@
22
- use Getopt::Long;
23
- require 5;
24
-
25
--%MakeParams = InitMakeParams();
26
--
27
--WriteMakefile(%MakeParams);
28
-+WriteMakefile(InitMakeParams());
29
-
30
- sub InitMakeParams {
31
-     $nsconfig="net-snmp-config"; # in path by default
32
-+++ b/perl/OID/Makefile.PL
33
-@@ -6,11 +6,8 @@
34
- use Config;
35
- use Getopt::Long;
36
- my $lib_version;
37
--my %MakeParams = ();
38
--
39
--%MakeParams = InitMakeParams();
40
--
41
--WriteMakefile(%MakeParams);
42
-+
43
-+WriteMakefile(InitMakeParams());
44
- 
45
- Check_Version();
46
-
47
-+++ b/perl/SNMP/Makefile.PL
48
-@@ -3,15 +3,12 @@
49
- use Config;
50
- use Getopt::Long;
51
- my $lib_version;
52
--my %MakeParams = ();
53
- my $opts;
54
- 
55
- # See lib/ExtUtils/MakeMaker.pm for details of how to influence
56
- # the contents of the Makefile that is written.
57
- 
58
--%MakeParams = InitMakeParams();
59
--
60
--WriteMakefile(%MakeParams);
61
-+WriteMakefile(InitMakeParams());
62
- 
63
- Check_Version();
64
-
65
-+++ b/perl/TrapReceiver/Makefile.PL
66
-@@ -3,11 +3,8 @@
67
- use Config;
68
- use Getopt::Long;
69
- my $lib_version;
70
--my %MakeParams = ();
71
--
72
--%MakeParams = InitMakeParams();
73
--
74
--WriteMakefile(%MakeParams);
75
-+
76
-+WriteMakefile(InitMakeParams());
77
- 
78
- Check_Version();
79
-
80
-+++ b/perl/agent/Makefile.PL
81
-@@ -3,11 +3,8 @@
82
- use Config;
83
- use Getopt::Long;
84
- my $lib_version;
85
--my %MakeParams = ();
86
--
87
--%MakeParams = InitMakeParams();
88
--
89
--WriteMakefile(%MakeParams);
90
-+
91
-+WriteMakefile(InitMakeParams());
92
- 
93
- Check_Version();
94
-
95
-+++ b/perl/agent/Support/Makefile.PL
96
-@@ -3,14 +3,11 @@
97
- use Config;
98
- use Getopt::Long;
99
- my $lib_version;
100
--my %MakeParams = ();
101
- 
102
- # See lib/ExtUtils/MakeMaker.pm for details of how to influence
103
- # the contents of the Makefile that is written.
104
- 
105
--%MakeParams = InitMakeParams();
106
--
107
--WriteMakefile(%MakeParams);
108
-+WriteMakefile(InitMakeParams());
109
- 
110
- Check_Version();
111
-
112
-+++ b/perl/agent/default_store/Makefile.PL
113
-@@ -3,11 +3,8 @@
114
- use Config;
115
- use Getopt::Long;
116
- my $lib_version;
117
--my %MakeParams = ();
118
--
119
--%MakeParams = InitMakeParams();
120
--
121
--WriteMakefile(%MakeParams);
122
-+
123
-+WriteMakefile(InitMakeParams());
124
- 
125
- Check_Version();
126
-
127
-+++ b/perl/default_store/Makefile.PL
128
-@@ -3,11 +3,8 @@
129
- use Config;
130
- use Getopt::Long;
131
- my $lib_version;
132
--my %MakeParams = ();
133
- 
134
--%MakeParams = InitMakeParams();
135
--
136
--WriteMakefile(%MakeParams);
137
-+WriteMakefile(InitMakeParams());
138
- 
139
- 
140
- sub InitMakeParams {
141 1
deleted file mode 100644
... ...
@@ -1,2477 +0,0 @@
1
-From: Bart Van Assche <bvanassche@acm.org>
2
-Date: Sat, 20 Feb 2016 18:58:18 -0800
3
-Subject: [PATCH] Remove U64 typedef
4
-
5
-The U64 typedef conflicts with a typedef in a Perl header file. Hence
6
-remove the U64 typedef from the Net-SNMP header files. This patch does
7
-not modify the Net-SNMP ABI.
8
-+++ b/agent/mibgroup/if-mib/ifXTable/ifXTable.c
9
-@@ -722,7 +722,7 @@
10
-  */
11
- int
12
- ifHCInOctets_get(ifXTable_rowreq_ctx * rowreq_ctx,
13
--                 U64 * ifHCInOctets_val_ptr)
14
-+                 struct counter64 *ifHCInOctets_val_ptr)
15
- {
16
-    /** we should have a non-NULL pointer */
17
-     netsnmp_assert(NULL != ifHCInOctets_val_ptr);
18
-@@ -779,7 +779,7 @@
19
-  */
20
- int
21
- ifHCInUcastPkts_get(ifXTable_rowreq_ctx * rowreq_ctx,
22
--                    U64 * ifHCInUcastPkts_val_ptr)
23
-+                    struct counter64 *ifHCInUcastPkts_val_ptr)
24
- {
25
-    /** we should have a non-NULL pointer */
26
-     netsnmp_assert(NULL != ifHCInUcastPkts_val_ptr);
27
-@@ -838,7 +838,7 @@
28
-  */
29
- int
30
- ifHCInMulticastPkts_get(ifXTable_rowreq_ctx * rowreq_ctx,
31
--                        U64 * ifHCInMulticastPkts_val_ptr)
32
-+                        struct counter64 *ifHCInMulticastPkts_val_ptr)
33
- {
34
-    /** we should have a non-NULL pointer */
35
-     netsnmp_assert(NULL != ifHCInMulticastPkts_val_ptr);
36
-@@ -897,7 +897,7 @@
37
-  */
38
- int
39
- ifHCInBroadcastPkts_get(ifXTable_rowreq_ctx * rowreq_ctx,
40
--                        U64 * ifHCInBroadcastPkts_val_ptr)
41
-+                        struct counter64 *ifHCInBroadcastPkts_val_ptr)
42
- {
43
-    /** we should have a non-NULL pointer */
44
-     netsnmp_assert(NULL != ifHCInBroadcastPkts_val_ptr);
45
-@@ -955,7 +955,7 @@
46
-  */
47
- int
48
- ifHCOutOctets_get(ifXTable_rowreq_ctx * rowreq_ctx,
49
--                  U64 * ifHCOutOctets_val_ptr)
50
-+                  struct counter64 *ifHCOutOctets_val_ptr)
51
- {
52
-    /** we should have a non-NULL pointer */
53
-     netsnmp_assert(NULL != ifHCOutOctets_val_ptr);
54
-@@ -1013,7 +1013,7 @@
55
-  */
56
- int
57
- ifHCOutUcastPkts_get(ifXTable_rowreq_ctx * rowreq_ctx,
58
--                     U64 * ifHCOutUcastPkts_val_ptr)
59
-+                     struct counter64 *ifHCOutUcastPkts_val_ptr)
60
- {
61
-    /** we should have a non-NULL pointer */
62
-     netsnmp_assert(NULL != ifHCOutUcastPkts_val_ptr);
63
-@@ -1074,7 +1074,7 @@
64
-  */
65
- int
66
- ifHCOutMulticastPkts_get(ifXTable_rowreq_ctx * rowreq_ctx,
67
--                         U64 * ifHCOutMulticastPkts_val_ptr)
68
-+                         struct counter64 *ifHCOutMulticastPkts_val_ptr)
69
- {
70
-    /** we should have a non-NULL pointer */
71
-     netsnmp_assert(NULL != ifHCOutMulticastPkts_val_ptr);
72
-@@ -1134,7 +1134,7 @@
73
-  */
74
- int
75
- ifHCOutBroadcastPkts_get(ifXTable_rowreq_ctx * rowreq_ctx,
76
--                         U64 * ifHCOutBroadcastPkts_val_ptr)
77
-+                         struct counter64 *ifHCOutBroadcastPkts_val_ptr)
78
- {
79
-    /** we should have a non-NULL pointer */
80
-     netsnmp_assert(NULL != ifHCOutBroadcastPkts_val_ptr);
81
-+++ b/agent/mibgroup/if-mib/ifXTable/ifXTable.h
82
-@@ -143,28 +143,28 @@
83
-                                            u_long *
84
-                                            ifOutBroadcastPkts_val_ptr);
85
-     int             ifHCInOctets_get(ifXTable_rowreq_ctx * rowreq_ctx,
86
--                                     U64 * ifHCInOctets_val_ptr);
87
-+                                     struct counter64 *ifHCInOctets_val_ptr);
88
-     int             ifHCInUcastPkts_get(ifXTable_rowreq_ctx * rowreq_ctx,
89
--                                        U64 * ifHCInUcastPkts_val_ptr);
90
-+                                        struct counter64 *ifHCInUcastPkts_val_ptr);
91
-     int             ifHCInMulticastPkts_get(ifXTable_rowreq_ctx *
92
-                                             rowreq_ctx,
93
--                                            U64 *
94
-+                                            struct counter64 *
95
-                                             ifHCInMulticastPkts_val_ptr);
96
-     int             ifHCInBroadcastPkts_get(ifXTable_rowreq_ctx *
97
-                                             rowreq_ctx,
98
--                                            U64 *
99
-+                                            struct counter64 *
100
-                                             ifHCInBroadcastPkts_val_ptr);
101
-     int             ifHCOutOctets_get(ifXTable_rowreq_ctx * rowreq_ctx,
102
--                                      U64 * ifHCOutOctets_val_ptr);
103
-+                                      struct counter64 *ifHCOutOctets_val_ptr);
104
-     int             ifHCOutUcastPkts_get(ifXTable_rowreq_ctx * rowreq_ctx,
105
--                                         U64 * ifHCOutUcastPkts_val_ptr);
106
-+                                         struct counter64 *ifHCOutUcastPkts_val_ptr);
107
-     int             ifHCOutMulticastPkts_get(ifXTable_rowreq_ctx *
108
-                                              rowreq_ctx,
109
--                                             U64 *
110
-+                                             struct counter64 *
111
-                                              ifHCOutMulticastPkts_val_ptr);
112
-     int             ifHCOutBroadcastPkts_get(ifXTable_rowreq_ctx *
113
-                                              rowreq_ctx,
114
--                                             U64 *
115
-+                                             struct counter64 *
116
-                                              ifHCOutBroadcastPkts_val_ptr);
117
-     int             ifLinkUpDownTrapEnable_get(ifXTable_rowreq_ctx *
118
-                                                rowreq_ctx,
119
-@@ -284,86 +284,86 @@
120
- 
121
-     int             ifHCInOctets_check_value(ifXTable_rowreq_ctx *
122
-                                              rowreq_ctx,
123
--                                             U64 ifHCInOctets_val);
124
-+                                             struct counter64 ifHCInOctets_val);
125
-     int             ifHCInOctets_undo_setup(ifXTable_rowreq_ctx *
126
-                                             rowreq_ctx);
127
-     int             ifHCInOctets_set(ifXTable_rowreq_ctx * rowreq_ctx,
128
--                                     U64 ifHCInOctets_val);
129
-+                                     struct counter64 ifHCInOctets_val);
130
-     int             ifHCInOctets_undo(ifXTable_rowreq_ctx * rowreq_ctx);
131
- 
132
-     int             ifHCInUcastPkts_check_value(ifXTable_rowreq_ctx *
133
-                                                 rowreq_ctx,
134
--                                                U64 ifHCInUcastPkts_val);
135
-+                                                struct counter64 ifHCInUcastPkts_val);
136
-     int             ifHCInUcastPkts_undo_setup(ifXTable_rowreq_ctx *
137
-                                                rowreq_ctx);
138
-     int             ifHCInUcastPkts_set(ifXTable_rowreq_ctx * rowreq_ctx,
139
--                                        U64 ifHCInUcastPkts_val);
140
-+                                        struct counter64 ifHCInUcastPkts_val);
141
-     int             ifHCInUcastPkts_undo(ifXTable_rowreq_ctx * rowreq_ctx);
142
- 
143
-     int             ifHCInMulticastPkts_check_value(ifXTable_rowreq_ctx *
144
-                                                     rowreq_ctx,
145
--                                                    U64
146
-+                                                    struct counter64
147
-                                                     ifHCInMulticastPkts_val);
148
-     int             ifHCInMulticastPkts_undo_setup(ifXTable_rowreq_ctx *
149
-                                                    rowreq_ctx);
150
-     int             ifHCInMulticastPkts_set(ifXTable_rowreq_ctx *
151
-                                             rowreq_ctx,
152
--                                            U64 ifHCInMulticastPkts_val);
153
-+                                            struct counter64 ifHCInMulticastPkts_val);
154
-     int             ifHCInMulticastPkts_undo(ifXTable_rowreq_ctx *
155
-                                              rowreq_ctx);
156
- 
157
-     int             ifHCInBroadcastPkts_check_value(ifXTable_rowreq_ctx *
158
-                                                     rowreq_ctx,
159
--                                                    U64
160
-+                                                    struct counter64
161
-                                                     ifHCInBroadcastPkts_val);
162
-     int             ifHCInBroadcastPkts_undo_setup(ifXTable_rowreq_ctx *
163
-                                                    rowreq_ctx);
164
-     int             ifHCInBroadcastPkts_set(ifXTable_rowreq_ctx *
165
-                                             rowreq_ctx,
166
--                                            U64 ifHCInBroadcastPkts_val);
167
-+                                            struct counter64 ifHCInBroadcastPkts_val);
168
-     int             ifHCInBroadcastPkts_undo(ifXTable_rowreq_ctx *
169
-                                              rowreq_ctx);
170
- 
171
-     int             ifHCOutOctets_check_value(ifXTable_rowreq_ctx *
172
-                                               rowreq_ctx,
173
--                                              U64 ifHCOutOctets_val);
174
-+                                              struct counter64 ifHCOutOctets_val);
175
-     int             ifHCOutOctets_undo_setup(ifXTable_rowreq_ctx *
176
-                                              rowreq_ctx);
177
-     int             ifHCOutOctets_set(ifXTable_rowreq_ctx * rowreq_ctx,
178
--                                      U64 ifHCOutOctets_val);
179
-+                                      struct counter64 ifHCOutOctets_val);
180
-     int             ifHCOutOctets_undo(ifXTable_rowreq_ctx * rowreq_ctx);
181
- 
182
-     int             ifHCOutUcastPkts_check_value(ifXTable_rowreq_ctx *
183
-                                                  rowreq_ctx,
184
--                                                 U64 ifHCOutUcastPkts_val);
185
-+                                                 struct counter64 ifHCOutUcastPkts_val);
186
-     int             ifHCOutUcastPkts_undo_setup(ifXTable_rowreq_ctx *
187
-                                                 rowreq_ctx);
188
-     int             ifHCOutUcastPkts_set(ifXTable_rowreq_ctx * rowreq_ctx,
189
--                                         U64 ifHCOutUcastPkts_val);
190
-+                                         struct counter64 ifHCOutUcastPkts_val);
191
-     int             ifHCOutUcastPkts_undo(ifXTable_rowreq_ctx *
192
-                                           rowreq_ctx);
193
- 
194
-     int             ifHCOutMulticastPkts_check_value(ifXTable_rowreq_ctx *
195
-                                                      rowreq_ctx,
196
--                                                     U64
197
-+                                                     struct counter64
198
-                                                      ifHCOutMulticastPkts_val);
199
-     int             ifHCOutMulticastPkts_undo_setup(ifXTable_rowreq_ctx *
200
-                                                     rowreq_ctx);
201
-     int             ifHCOutMulticastPkts_set(ifXTable_rowreq_ctx *
202
-                                              rowreq_ctx,
203
--                                             U64 ifHCOutMulticastPkts_val);
204
-+                                             struct counter64 ifHCOutMulticastPkts_val);
205
-     int             ifHCOutMulticastPkts_undo(ifXTable_rowreq_ctx *
206
-                                               rowreq_ctx);
207
- 
208
-     int             ifHCOutBroadcastPkts_check_value(ifXTable_rowreq_ctx *
209
-                                                      rowreq_ctx,
210
--                                                     U64
211
-+                                                     struct counter64
212
-                                                      ifHCOutBroadcastPkts_val);
213
-     int             ifHCOutBroadcastPkts_undo_setup(ifXTable_rowreq_ctx *
214
-                                                     rowreq_ctx);
215
-     int             ifHCOutBroadcastPkts_set(ifXTable_rowreq_ctx *
216
-                                              rowreq_ctx,
217
--                                             U64 ifHCOutBroadcastPkts_val);
218
-+                                             struct counter64 ifHCOutBroadcastPkts_val);
219
-     int             ifHCOutBroadcastPkts_undo(ifXTable_rowreq_ctx *
220
-                                               rowreq_ctx);
221
- 
222
-+++ b/agent/mibgroup/if-mib/ifXTable/ifXTable_interface.c
223
-@@ -729,72 +729,72 @@
224
-          * ifHCInOctets(6)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
225
-          */
226
-     case COLUMN_IFHCINOCTETS:
227
--        var->val_len = sizeof(U64);
228
-+        var->val_len = sizeof(struct counter64);
229
-         var->type = ASN_COUNTER64;
230
--        rc = ifHCInOctets_get(rowreq_ctx, (U64 *) var->val.string);
231
-+        rc = ifHCInOctets_get(rowreq_ctx, (struct counter64 *) var->val.string);
232
-         break;
233
- 
234
-         /*
235
-          * ifHCInUcastPkts(7)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
236
-          */
237
-     case COLUMN_IFHCINUCASTPKTS:
238
--        var->val_len = sizeof(U64);
239
-+        var->val_len = sizeof(struct counter64);
240
-         var->type = ASN_COUNTER64;
241
--        rc = ifHCInUcastPkts_get(rowreq_ctx, (U64 *) var->val.string);
242
-+        rc = ifHCInUcastPkts_get(rowreq_ctx, (struct counter64 *) var->val.string);
243
-         break;
244
- 
245
-         /*
246
-          * ifHCInMulticastPkts(8)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
247
-          */
248
-     case COLUMN_IFHCINMULTICASTPKTS:
249
--        var->val_len = sizeof(U64);
250
-+        var->val_len = sizeof(struct counter64);
251
-         var->type = ASN_COUNTER64;
252
--        rc = ifHCInMulticastPkts_get(rowreq_ctx, (U64 *) var->val.string);
253
-+        rc = ifHCInMulticastPkts_get(rowreq_ctx, (struct counter64 *) var->val.string);
254
-         break;
255
- 
256
-         /*
257
-          * ifHCInBroadcastPkts(9)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
258
-          */
259
-     case COLUMN_IFHCINBROADCASTPKTS:
260
--        var->val_len = sizeof(U64);
261
-+        var->val_len = sizeof(struct counter64);
262
-         var->type = ASN_COUNTER64;
263
--        rc = ifHCInBroadcastPkts_get(rowreq_ctx, (U64 *) var->val.string);
264
-+        rc = ifHCInBroadcastPkts_get(rowreq_ctx, (struct counter64 *) var->val.string);
265
-         break;
266
- 
267
-         /*
268
-          * ifHCOutOctets(10)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
269
-          */
270
-     case COLUMN_IFHCOUTOCTETS:
271
--        var->val_len = sizeof(U64);
272
-+        var->val_len = sizeof(struct counter64);
273
-         var->type = ASN_COUNTER64;
274
--        rc = ifHCOutOctets_get(rowreq_ctx, (U64 *) var->val.string);
275
-+        rc = ifHCOutOctets_get(rowreq_ctx, (struct counter64 *) var->val.string);
276
-         break;
277
- 
278
-         /*
279
-          * ifHCOutUcastPkts(11)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
280
-          */
281
-     case COLUMN_IFHCOUTUCASTPKTS:
282
--        var->val_len = sizeof(U64);
283
-+        var->val_len = sizeof(struct counter64);
284
-         var->type = ASN_COUNTER64;
285
--        rc = ifHCOutUcastPkts_get(rowreq_ctx, (U64 *) var->val.string);
286
-+        rc = ifHCOutUcastPkts_get(rowreq_ctx, (struct counter64 *) var->val.string);
287
-         break;
288
- 
289
-         /*
290
-          * ifHCOutMulticastPkts(12)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
291
-          */
292
-     case COLUMN_IFHCOUTMULTICASTPKTS:
293
--        var->val_len = sizeof(U64);
294
-+        var->val_len = sizeof(struct counter64);
295
-         var->type = ASN_COUNTER64;
296
--        rc = ifHCOutMulticastPkts_get(rowreq_ctx, (U64 *) var->val.string);
297
-+        rc = ifHCOutMulticastPkts_get(rowreq_ctx, (struct counter64 *) var->val.string);
298
-         break;
299
- 
300
-         /*
301
-          * ifHCOutBroadcastPkts(13)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
302
-          */
303
-     case COLUMN_IFHCOUTBROADCASTPKTS:
304
--        var->val_len = sizeof(U64);
305
-+        var->val_len = sizeof(struct counter64);
306
-         var->type = ASN_COUNTER64;
307
--        rc = ifHCOutBroadcastPkts_get(rowreq_ctx, (U64 *) var->val.string);
308
-+        rc = ifHCOutBroadcastPkts_get(rowreq_ctx, (struct counter64 *) var->val.string);
309
-         break;
310
- 
311
-         /*
312
-+++ b/agent/mibgroup/ip-mib/data_access/systemstats_common.c
313
-@@ -264,7 +264,7 @@
314
-            && entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTFRAGCREATES]
315
-         && entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCOUTDISCARDS]) {
316
- 
317
--        U64 tmp, tmp2, tmp3;
318
-+        struct counter64 tmp, tmp2, tmp3;
319
-         tmp = entry->stats.HCOutRequests;
320
-         u64Incr(&tmp, &entry->stats.HCOutForwDatagrams);
321
-         u64Incr(&tmp, &entry->stats.HCOutFragCreates);
322
-+++ b/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_get.c
323
-@@ -270,7 +270,7 @@
324
-  */
325
- int
326
- ipIfStatsHCInReceives_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
327
--                          U64 * ipIfStatsHCInReceives_val_ptr)
328
-+                          struct counter64 *ipIfStatsHCInReceives_val_ptr)
329
- {
330
-    /** we should have a non-NULL pointer */
331
-     netsnmp_assert(NULL != ipIfStatsHCInReceives_val_ptr);
332
-@@ -395,7 +395,7 @@
333
-  */
334
- int
335
- ipIfStatsHCInOctets_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
336
--                        U64 * ipIfStatsHCInOctets_val_ptr)
337
-+                        struct counter64 *ipIfStatsHCInOctets_val_ptr)
338
- {
339
-    /** we should have a non-NULL pointer */
340
-     netsnmp_assert(NULL != ipIfStatsHCInOctets_val_ptr);
341
-@@ -862,7 +862,7 @@
342
-  */
343
- int
344
- ipIfStatsHCInForwDatagrams_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
345
--                               U64 * ipIfStatsHCInForwDatagrams_val_ptr)
346
-+                               struct counter64 *ipIfStatsHCInForwDatagrams_val_ptr)
347
- {
348
-    /** we should have a non-NULL pointer */
349
-     netsnmp_assert(NULL != ipIfStatsHCInForwDatagrams_val_ptr);
350
-@@ -1267,7 +1267,7 @@
351
-  */
352
- int
353
- ipIfStatsHCInDelivers_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
354
--                          U64 * ipIfStatsHCInDelivers_val_ptr)
355
-+                          struct counter64 *ipIfStatsHCInDelivers_val_ptr)
356
- {
357
-    /** we should have a non-NULL pointer */
358
-     netsnmp_assert(NULL != ipIfStatsHCInDelivers_val_ptr);
359
-@@ -1396,7 +1396,7 @@
360
-  */
361
- int
362
- ipIfStatsHCOutRequests_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
363
--                           U64 * ipIfStatsHCOutRequests_val_ptr)
364
-+                           struct counter64 *ipIfStatsHCOutRequests_val_ptr)
365
- {
366
-    /** we should have a non-NULL pointer */
367
-     netsnmp_assert(NULL != ipIfStatsHCOutRequests_val_ptr);
368
-@@ -1532,7 +1532,7 @@
369
-  */
370
- int
371
- ipIfStatsHCOutForwDatagrams_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
372
--                                U64 * ipIfStatsHCOutForwDatagrams_val_ptr)
373
-+                                struct counter64 *ipIfStatsHCOutForwDatagrams_val_ptr)
374
- {
375
-    /** we should have a non-NULL pointer */
376
-     netsnmp_assert(NULL != ipIfStatsHCOutForwDatagrams_val_ptr);
377
-@@ -1999,7 +1999,7 @@
378
-  */
379
- int
380
- ipIfStatsHCOutTransmits_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
381
--                            U64 * ipIfStatsHCOutTransmits_val_ptr)
382
-+                            struct counter64 *ipIfStatsHCOutTransmits_val_ptr)
383
- {
384
-    /** we should have a non-NULL pointer */
385
-     netsnmp_assert(NULL != ipIfStatsHCOutTransmits_val_ptr);
386
-@@ -2123,7 +2123,7 @@
387
-  */
388
- int
389
- ipIfStatsHCOutOctets_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
390
--                         U64 * ipIfStatsHCOutOctets_val_ptr)
391
-+                         struct counter64 *ipIfStatsHCOutOctets_val_ptr)
392
- {
393
-    /** we should have a non-NULL pointer */
394
-     netsnmp_assert(NULL != ipIfStatsHCOutOctets_val_ptr);
395
-@@ -2245,7 +2245,7 @@
396
-  */
397
- int
398
- ipIfStatsHCInMcastPkts_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
399
--                           U64 * ipIfStatsHCInMcastPkts_val_ptr)
400
-+                           struct counter64 *ipIfStatsHCInMcastPkts_val_ptr)
401
- {
402
-    /** we should have a non-NULL pointer */
403
-     netsnmp_assert(NULL != ipIfStatsHCInMcastPkts_val_ptr);
404
-@@ -2372,7 +2372,7 @@
405
-  */
406
- int
407
- ipIfStatsHCInMcastOctets_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
408
--                             U64 * ipIfStatsHCInMcastOctets_val_ptr)
409
-+                             struct counter64 *ipIfStatsHCInMcastOctets_val_ptr)
410
- {
411
-    /** we should have a non-NULL pointer */
412
-     netsnmp_assert(NULL != ipIfStatsHCInMcastOctets_val_ptr);
413
-@@ -2497,7 +2497,7 @@
414
-  */
415
- int
416
- ipIfStatsHCOutMcastPkts_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
417
--                            U64 * ipIfStatsHCOutMcastPkts_val_ptr)
418
-+                            struct counter64 *ipIfStatsHCOutMcastPkts_val_ptr)
419
- {
420
-    /** we should have a non-NULL pointer */
421
-     netsnmp_assert(NULL != ipIfStatsHCOutMcastPkts_val_ptr);
422
-@@ -2621,7 +2621,7 @@
423
-  */
424
- int
425
- ipIfStatsHCOutMcastOctets_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
426
--                              U64 * ipIfStatsHCOutMcastOctets_val_ptr)
427
-+                              struct counter64 *ipIfStatsHCOutMcastOctets_val_ptr)
428
- {
429
-    /** we should have a non-NULL pointer */
430
-     netsnmp_assert(NULL != ipIfStatsHCOutMcastOctets_val_ptr);
431
-@@ -2743,7 +2743,7 @@
432
-  */
433
- int
434
- ipIfStatsHCInBcastPkts_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
435
--                           U64 * ipIfStatsHCInBcastPkts_val_ptr)
436
-+                           struct counter64 *ipIfStatsHCInBcastPkts_val_ptr)
437
- {
438
-    /** we should have a non-NULL pointer */
439
-     netsnmp_assert(NULL != ipIfStatsHCInBcastPkts_val_ptr);
440
-@@ -2865,7 +2865,7 @@
441
-  */
442
- int
443
- ipIfStatsHCOutBcastPkts_get(ipIfStatsTable_rowreq_ctx * rowreq_ctx,
444
--                            U64 * ipIfStatsHCOutBcastPkts_val_ptr)
445
-+                            struct counter64 *ipIfStatsHCOutBcastPkts_val_ptr)
446
- {
447
-    /** we should have a non-NULL pointer */
448
-     netsnmp_assert(NULL != ipIfStatsHCOutBcastPkts_val_ptr);
449
-+++ b/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_data_get.h
450
-@@ -50,7 +50,7 @@
451
-                                             ipIfStatsInReceives_val_ptr);
452
-     int             ipIfStatsHCInReceives_get(ipIfStatsTable_rowreq_ctx *
453
-                                               rowreq_ctx,
454
--                                              U64 *
455
-+                                              struct counter64 *
456
-                                               ipIfStatsHCInReceives_val_ptr);
457
-     int             ipIfStatsInOctets_get(ipIfStatsTable_rowreq_ctx *
458
-                                           rowreq_ctx,
459
-@@ -58,7 +58,7 @@
460
-                                           ipIfStatsInOctets_val_ptr);
461
-     int             ipIfStatsHCInOctets_get(ipIfStatsTable_rowreq_ctx *
462
-                                             rowreq_ctx,
463
--                                            U64 *
464
-+                                            struct counter64 *
465
-                                             ipIfStatsHCInOctets_val_ptr);
466
-     int             ipIfStatsInHdrErrors_get(ipIfStatsTable_rowreq_ctx *
467
-                                              rowreq_ctx,
468
-@@ -87,7 +87,7 @@
469
-     int            
470
-         ipIfStatsHCInForwDatagrams_get(ipIfStatsTable_rowreq_ctx *
471
-                                        rowreq_ctx,
472
--                                       U64 *
473
-+                                       struct counter64 *
474
-                                        ipIfStatsHCInForwDatagrams_val_ptr);
475
-     int             ipIfStatsReasmReqds_get(ipIfStatsTable_rowreq_ctx *
476
-                                             rowreq_ctx,
477
-@@ -111,7 +111,7 @@
478
-                                             ipIfStatsInDelivers_val_ptr);
479
-     int             ipIfStatsHCInDelivers_get(ipIfStatsTable_rowreq_ctx *
480
-                                               rowreq_ctx,
481
--                                              U64 *
482
-+                                              struct counter64 *
483
-                                               ipIfStatsHCInDelivers_val_ptr);
484
-     int             ipIfStatsOutRequests_get(ipIfStatsTable_rowreq_ctx *
485
-                                              rowreq_ctx,
486
-@@ -119,7 +119,7 @@
487
-                                              ipIfStatsOutRequests_val_ptr);
488
-     int             ipIfStatsHCOutRequests_get(ipIfStatsTable_rowreq_ctx *
489
-                                                rowreq_ctx,
490
--                                               U64 *
491
-+                                               struct counter64 *
492
-                                                ipIfStatsHCOutRequests_val_ptr);
493
-     int             ipIfStatsOutForwDatagrams_get(ipIfStatsTable_rowreq_ctx
494
-                                                   * rowreq_ctx,
495
-@@ -128,7 +128,7 @@
496
-     int            
497
-         ipIfStatsHCOutForwDatagrams_get(ipIfStatsTable_rowreq_ctx *
498
-                                         rowreq_ctx,
499
--                                        U64 *
500
-+                                        struct counter64 *
501
-                                         ipIfStatsHCOutForwDatagrams_val_ptr);
502
-     int             ipIfStatsOutDiscards_get(ipIfStatsTable_rowreq_ctx *
503
-                                              rowreq_ctx,
504
-@@ -156,7 +156,7 @@
505
-                                               ipIfStatsOutTransmits_val_ptr);
506
-     int             ipIfStatsHCOutTransmits_get(ipIfStatsTable_rowreq_ctx *
507
-                                                 rowreq_ctx,
508
--                                                U64 *
509
-+                                                struct counter64 *
510
-                                                 ipIfStatsHCOutTransmits_val_ptr);
511
-     int             ipIfStatsOutOctets_get(ipIfStatsTable_rowreq_ctx *
512
-                                            rowreq_ctx,
513
-@@ -164,7 +164,7 @@
514
-                                            ipIfStatsOutOctets_val_ptr);
515
-     int             ipIfStatsHCOutOctets_get(ipIfStatsTable_rowreq_ctx *
516
-                                              rowreq_ctx,
517
--                                             U64 *
518
-+                                             struct counter64 *
519
-                                              ipIfStatsHCOutOctets_val_ptr);
520
-     int             ipIfStatsInMcastPkts_get(ipIfStatsTable_rowreq_ctx *
521
-                                              rowreq_ctx,
522
-@@ -172,7 +172,7 @@
523
-                                              ipIfStatsInMcastPkts_val_ptr);
524
-     int             ipIfStatsHCInMcastPkts_get(ipIfStatsTable_rowreq_ctx *
525
-                                                rowreq_ctx,
526
--                                               U64 *
527
-+                                               struct counter64 *
528
-                                                ipIfStatsHCInMcastPkts_val_ptr);
529
-     int             ipIfStatsInMcastOctets_get(ipIfStatsTable_rowreq_ctx *
530
-                                                rowreq_ctx,
531
-@@ -180,7 +180,7 @@
532
-                                                ipIfStatsInMcastOctets_val_ptr);
533
-     int             ipIfStatsHCInMcastOctets_get(ipIfStatsTable_rowreq_ctx
534
-                                                  * rowreq_ctx,
535
--                                                 U64 *
536
-+                                                 struct counter64 *
537
-                                                  ipIfStatsHCInMcastOctets_val_ptr);
538
-     int             ipIfStatsOutMcastPkts_get(ipIfStatsTable_rowreq_ctx *
539
-                                               rowreq_ctx,
540
-@@ -188,7 +188,7 @@
541
-                                               ipIfStatsOutMcastPkts_val_ptr);
542
-     int             ipIfStatsHCOutMcastPkts_get(ipIfStatsTable_rowreq_ctx *
543
-                                                 rowreq_ctx,
544
--                                                U64 *
545
-+                                                struct counter64 *
546
-                                                 ipIfStatsHCOutMcastPkts_val_ptr);
547
-     int             ipIfStatsOutMcastOctets_get(ipIfStatsTable_rowreq_ctx *
548
-                                                 rowreq_ctx,
549
-@@ -196,7 +196,7 @@
550
-                                                 ipIfStatsOutMcastOctets_val_ptr);
551
-     int             ipIfStatsHCOutMcastOctets_get(ipIfStatsTable_rowreq_ctx
552
-                                                   * rowreq_ctx,
553
--                                                  U64 *
554
-+                                                  struct counter64 *
555
-                                                   ipIfStatsHCOutMcastOctets_val_ptr);
556
-     int             ipIfStatsInBcastPkts_get(ipIfStatsTable_rowreq_ctx *
557
-                                              rowreq_ctx,
558
-@@ -204,7 +204,7 @@
559
-                                              ipIfStatsInBcastPkts_val_ptr);
560
-     int             ipIfStatsHCInBcastPkts_get(ipIfStatsTable_rowreq_ctx *
561
-                                                rowreq_ctx,
562
--                                               U64 *
563
-+                                               struct counter64 *
564
-                                                ipIfStatsHCInBcastPkts_val_ptr);
565
-     int             ipIfStatsOutBcastPkts_get(ipIfStatsTable_rowreq_ctx *
566
-                                               rowreq_ctx,
567
-@@ -212,7 +212,7 @@
568
-                                               ipIfStatsOutBcastPkts_val_ptr);
569
-     int             ipIfStatsHCOutBcastPkts_get(ipIfStatsTable_rowreq_ctx *
570
-                                                 rowreq_ctx,
571
--                                                U64 *
572
-+                                                struct counter64 *
573
-                                                 ipIfStatsHCOutBcastPkts_val_ptr);
574
-     int            
575
-         ipIfStatsDiscontinuityTime_get(ipIfStatsTable_rowreq_ctx *
576
-+++ b/agent/mibgroup/ip-mib/ipIfStatsTable/ipIfStatsTable_interface.c
577
-@@ -722,10 +722,10 @@
578
-          * ipIfStatsHCInReceives(4)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
579
-          */
580
-     case COLUMN_IPIFSTATSHCINRECEIVES:
581
--        var->val_len = sizeof(U64);
582
-+        var->val_len = sizeof(struct counter64);
583
-         var->type = ASN_COUNTER64;
584
-         rc = ipIfStatsHCInReceives_get(rowreq_ctx,
585
--                                       (U64 *) var->val.string);
586
-+                                       (struct counter64 *) var->val.string);
587
-         break;
588
- 
589
-         /*
590
-@@ -741,9 +741,9 @@
591
-          * ipIfStatsHCInOctets(6)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
592
-          */
593
-     case COLUMN_IPIFSTATSHCINOCTETS:
594
--        var->val_len = sizeof(U64);
595
-+        var->val_len = sizeof(struct counter64);
596
-         var->type = ASN_COUNTER64;
597
--        rc = ipIfStatsHCInOctets_get(rowreq_ctx, (U64 *) var->val.string);
598
-+        rc = ipIfStatsHCInOctets_get(rowreq_ctx, (struct counter64 *) var->val.string);
599
-         break;
600
- 
601
-         /*
602
-@@ -810,10 +810,10 @@
603
-          * ipIfStatsHCInForwDatagrams(13)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
604
-          */
605
-     case COLUMN_IPIFSTATSHCINFORWDATAGRAMS:
606
--        var->val_len = sizeof(U64);
607
-+        var->val_len = sizeof(struct counter64);
608
-         var->type = ASN_COUNTER64;
609
-         rc = ipIfStatsHCInForwDatagrams_get(rowreq_ctx,
610
--                                            (U64 *) var->val.string);
611
-+                                            (struct counter64 *) var->val.string);
612
-         break;
613
- 
614
-         /*
615
-@@ -869,10 +869,10 @@
616
-          * ipIfStatsHCInDelivers(19)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
617
-          */
618
-     case COLUMN_IPIFSTATSHCINDELIVERS:
619
--        var->val_len = sizeof(U64);
620
-+        var->val_len = sizeof(struct counter64);
621
-         var->type = ASN_COUNTER64;
622
-         rc = ipIfStatsHCInDelivers_get(rowreq_ctx,
623
--                                       (U64 *) var->val.string);
624
-+                                       (struct counter64 *) var->val.string);
625
-         break;
626
- 
627
-         /*
628
-@@ -889,10 +889,10 @@
629
-          * ipIfStatsHCOutRequests(21)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
630
-          */
631
-     case COLUMN_IPIFSTATSHCOUTREQUESTS:
632
--        var->val_len = sizeof(U64);
633
-+        var->val_len = sizeof(struct counter64);
634
-         var->type = ASN_COUNTER64;
635
-         rc = ipIfStatsHCOutRequests_get(rowreq_ctx,
636
--                                        (U64 *) var->val.string);
637
-+                                        (struct counter64 *) var->val.string);
638
-         break;
639
- 
640
-         /*
641
-@@ -909,10 +909,10 @@
642
-          * ipIfStatsHCOutForwDatagrams(24)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
643
-          */
644
-     case COLUMN_IPIFSTATSHCOUTFORWDATAGRAMS:
645
--        var->val_len = sizeof(U64);
646
-+        var->val_len = sizeof(struct counter64);
647
-         var->type = ASN_COUNTER64;
648
-         rc = ipIfStatsHCOutForwDatagrams_get(rowreq_ctx,
649
--                                             (U64 *) var->val.string);
650
-+                                             (struct counter64 *) var->val.string);
651
-         break;
652
- 
653
-         /*
654
-@@ -979,10 +979,10 @@
655
-          * ipIfStatsHCOutTransmits(31)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
656
-          */
657
-     case COLUMN_IPIFSTATSHCOUTTRANSMITS:
658
--        var->val_len = sizeof(U64);
659
-+        var->val_len = sizeof(struct counter64);
660
-         var->type = ASN_COUNTER64;
661
-         rc = ipIfStatsHCOutTransmits_get(rowreq_ctx,
662
--                                         (U64 *) var->val.string);
663
-+                                         (struct counter64 *) var->val.string);
664
-         break;
665
- 
666
-         /*
667
-@@ -999,9 +999,9 @@
668
-          * ipIfStatsHCOutOctets(33)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
669
-          */
670
-     case COLUMN_IPIFSTATSHCOUTOCTETS:
671
--        var->val_len = sizeof(U64);
672
-+        var->val_len = sizeof(struct counter64);
673
-         var->type = ASN_COUNTER64;
674
--        rc = ipIfStatsHCOutOctets_get(rowreq_ctx, (U64 *) var->val.string);
675
-+        rc = ipIfStatsHCOutOctets_get(rowreq_ctx, (struct counter64 *) var->val.string);
676
-         break;
677
- 
678
-         /*
679
-@@ -1018,10 +1018,10 @@
680
-          * ipIfStatsHCInMcastPkts(35)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
681
-          */
682
-     case COLUMN_IPIFSTATSHCINMCASTPKTS:
683
--        var->val_len = sizeof(U64);
684
-+        var->val_len = sizeof(struct counter64);
685
-         var->type = ASN_COUNTER64;
686
-         rc = ipIfStatsHCInMcastPkts_get(rowreq_ctx,
687
--                                        (U64 *) var->val.string);
688
-+                                        (struct counter64 *) var->val.string);
689
-         break;
690
- 
691
-         /*
692
-@@ -1038,10 +1038,10 @@
693
-          * ipIfStatsHCInMcastOctets(37)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
694
-          */
695
-     case COLUMN_IPIFSTATSHCINMCASTOCTETS:
696
--        var->val_len = sizeof(U64);
697
-+        var->val_len = sizeof(struct counter64);
698
-         var->type = ASN_COUNTER64;
699
-         rc = ipIfStatsHCInMcastOctets_get(rowreq_ctx,
700
--                                          (U64 *) var->val.string);
701
-+                                          (struct counter64 *) var->val.string);
702
-         break;
703
- 
704
-         /*
705
-@@ -1058,10 +1058,10 @@
706
-          * ipIfStatsHCOutMcastPkts(39)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
707
-          */
708
-     case COLUMN_IPIFSTATSHCOUTMCASTPKTS:
709
--        var->val_len = sizeof(U64);
710
-+        var->val_len = sizeof(struct counter64);
711
-         var->type = ASN_COUNTER64;
712
-         rc = ipIfStatsHCOutMcastPkts_get(rowreq_ctx,
713
--                                         (U64 *) var->val.string);
714
-+                                         (struct counter64 *) var->val.string);
715
-         break;
716
- 
717
-         /*
718
-@@ -1078,10 +1078,10 @@
719
-          * ipIfStatsHCOutMcastOctets(41)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
720
-          */
721
-     case COLUMN_IPIFSTATSHCOUTMCASTOCTETS:
722
--        var->val_len = sizeof(U64);
723
-+        var->val_len = sizeof(struct counter64);
724
-         var->type = ASN_COUNTER64;
725
-         rc = ipIfStatsHCOutMcastOctets_get(rowreq_ctx,
726
--                                           (U64 *) var->val.string);
727
-+                                           (struct counter64 *) var->val.string);
728
-         break;
729
- 
730
-         /*
731
-@@ -1098,10 +1098,10 @@
732
-          * ipIfStatsHCInBcastPkts(43)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
733
-          */
734
-     case COLUMN_IPIFSTATSHCINBCASTPKTS:
735
--        var->val_len = sizeof(U64);
736
-+        var->val_len = sizeof(struct counter64);
737
-         var->type = ASN_COUNTER64;
738
-         rc = ipIfStatsHCInBcastPkts_get(rowreq_ctx,
739
--                                        (U64 *) var->val.string);
740
-+                                        (struct counter64 *) var->val.string);
741
-         break;
742
- 
743
-         /*
744
-@@ -1118,10 +1118,10 @@
745
-          * ipIfStatsHCOutBcastPkts(45)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
746
-          */
747
-     case COLUMN_IPIFSTATSHCOUTBCASTPKTS:
748
--        var->val_len = sizeof(U64);
749
-+        var->val_len = sizeof(struct counter64);
750
-         var->type = ASN_COUNTER64;
751
-         rc = ipIfStatsHCOutBcastPkts_get(rowreq_ctx,
752
--                                         (U64 *) var->val.string);
753
-+                                         (struct counter64 *) var->val.string);
754
-         break;
755
- 
756
-         /*
757
-+++ b/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable.c
758
-@@ -452,7 +452,7 @@
759
-  */
760
- int
761
- ipSystemStatsHCInReceives_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
762
--                              U64 * ipSystemStatsHCInReceives_val_ptr)
763
-+                              struct counter64 *ipSystemStatsHCInReceives_val_ptr)
764
- {
765
-    /** we should have a non-NULL pointer */
766
-     netsnmp_assert(NULL != ipSystemStatsHCInReceives_val_ptr);
767
-@@ -579,7 +579,7 @@
768
-  */
769
- int
770
- ipSystemStatsHCInOctets_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
771
--                            U64 * ipSystemStatsHCInOctets_val_ptr)
772
-+                            struct counter64 *ipSystemStatsHCInOctets_val_ptr)
773
- {
774
-    /** we should have a non-NULL pointer */
775
-     netsnmp_assert(NULL != ipSystemStatsHCInOctets_val_ptr);
776
-@@ -1058,7 +1058,7 @@
777
- int
778
- ipSystemStatsHCInForwDatagrams_get(ipSystemStatsTable_rowreq_ctx *
779
-                                    rowreq_ctx,
780
--                                   U64 *
781
-+                                   struct counter64 *
782
-                                    ipSystemStatsHCInForwDatagrams_val_ptr)
783
- {
784
-    /** we should have a non-NULL pointer */
785
-@@ -1474,7 +1474,7 @@
786
-  */
787
- int
788
- ipSystemStatsHCInDelivers_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
789
--                              U64 * ipSystemStatsHCInDelivers_val_ptr)
790
-+                              struct counter64 *ipSystemStatsHCInDelivers_val_ptr)
791
- {
792
-    /** we should have a non-NULL pointer */
793
-     netsnmp_assert(NULL != ipSystemStatsHCInDelivers_val_ptr);
794
-@@ -1602,7 +1602,7 @@
795
-  */
796
- int
797
- ipSystemStatsHCOutRequests_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
798
--                               U64 * ipSystemStatsHCOutRequests_val_ptr)
799
-+                               struct counter64 *ipSystemStatsHCOutRequests_val_ptr)
800
- {
801
-    /** we should have a non-NULL pointer */
802
-     netsnmp_assert(NULL != ipSystemStatsHCOutRequests_val_ptr);
803
-@@ -1809,7 +1809,7 @@
804
- int
805
- ipSystemStatsHCOutForwDatagrams_get(ipSystemStatsTable_rowreq_ctx *
806
-                                     rowreq_ctx,
807
--                                    U64 *
808
-+                                    struct counter64 *
809
-                                     ipSystemStatsHCOutForwDatagrams_val_ptr)
810
- {
811
-    /** we should have a non-NULL pointer */
812
-@@ -2288,7 +2288,7 @@
813
-  */
814
- int
815
- ipSystemStatsHCOutTransmits_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
816
--                                U64 * ipSystemStatsHCOutTransmits_val_ptr)
817
-+                                struct counter64 *ipSystemStatsHCOutTransmits_val_ptr)
818
- {
819
-    /** we should have a non-NULL pointer */
820
-     netsnmp_assert(NULL != ipSystemStatsHCOutTransmits_val_ptr);
821
-@@ -2415,7 +2415,7 @@
822
-  */
823
- int
824
- ipSystemStatsHCOutOctets_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
825
--                             U64 * ipSystemStatsHCOutOctets_val_ptr)
826
-+                             struct counter64 *ipSystemStatsHCOutOctets_val_ptr)
827
- {
828
-    /** we should have a non-NULL pointer */
829
-     netsnmp_assert(NULL != ipSystemStatsHCOutOctets_val_ptr);
830
-@@ -2539,7 +2539,7 @@
831
-  */
832
- int
833
- ipSystemStatsHCInMcastPkts_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
834
--                               U64 * ipSystemStatsHCInMcastPkts_val_ptr)
835
-+                               struct counter64 *ipSystemStatsHCInMcastPkts_val_ptr)
836
- {
837
-    /** we should have a non-NULL pointer */
838
-     netsnmp_assert(NULL != ipSystemStatsHCInMcastPkts_val_ptr);
839
-@@ -2665,7 +2665,7 @@
840
- int
841
- ipSystemStatsHCInMcastOctets_get(ipSystemStatsTable_rowreq_ctx *
842
-                                  rowreq_ctx,
843
--                                 U64 *
844
-+                                 struct counter64 *
845
-                                  ipSystemStatsHCInMcastOctets_val_ptr)
846
- {
847
-    /** we should have a non-NULL pointer */
848
-@@ -2790,7 +2790,7 @@
849
-  */
850
- int
851
- ipSystemStatsHCOutMcastPkts_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
852
--                                U64 * ipSystemStatsHCOutMcastPkts_val_ptr)
853
-+                                struct counter64 *ipSystemStatsHCOutMcastPkts_val_ptr)
854
- {
855
-    /** we should have a non-NULL pointer */
856
-     netsnmp_assert(NULL != ipSystemStatsHCOutMcastPkts_val_ptr);
857
-@@ -2921,7 +2921,7 @@
858
- int
859
- ipSystemStatsHCOutMcastOctets_get(ipSystemStatsTable_rowreq_ctx *
860
-                                   rowreq_ctx,
861
--                                  U64 *
862
-+                                  struct counter64 *
863
-                                   ipSystemStatsHCOutMcastOctets_val_ptr)
864
- {
865
-    /** we should have a non-NULL pointer */
866
-@@ -3046,7 +3046,7 @@
867
-  */
868
- int
869
- ipSystemStatsHCInBcastPkts_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
870
--                               U64 * ipSystemStatsHCInBcastPkts_val_ptr)
871
-+                               struct counter64 *ipSystemStatsHCInBcastPkts_val_ptr)
872
- {
873
-    /** we should have a non-NULL pointer */
874
-     netsnmp_assert(NULL != ipSystemStatsHCInBcastPkts_val_ptr);
875
-@@ -3170,7 +3170,7 @@
876
-  */
877
- int
878
- ipSystemStatsHCOutBcastPkts_get(ipSystemStatsTable_rowreq_ctx * rowreq_ctx,
879
--                                U64 * ipSystemStatsHCOutBcastPkts_val_ptr)
880
-+                                struct counter64 *ipSystemStatsHCOutBcastPkts_val_ptr)
881
- {
882
-    /** we should have a non-NULL pointer */
883
-     netsnmp_assert(NULL != ipSystemStatsHCOutBcastPkts_val_ptr);
884
-+++ b/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable.h
885
-@@ -144,93 +144,22 @@
886
-      *********************************************************************
887
-      * function prototypes
888
-      */
889
--    int
890
--     
891
--        
892
--        
893
--        
894
--        
895
--        
896
--        
897
--        
898
--        
899
--        
900
--        
901
--        
902
--        
903
--        
904
--        
905
--        ipSystemStatsTable_pre_request(ipSystemStatsTable_registration *
906
-+    int ipSystemStatsTable_pre_request(ipSystemStatsTable_registration *
907
-                                        user_context);
908
--    int
909
--     
910
--        
911
--        
912
--        
913
--        
914
--        
915
--        
916
--        
917
--        
918
--        
919
--        
920
--        
921
--        
922
--        
923
--        
924
--        ipSystemStatsTable_post_request(ipSystemStatsTable_registration *
925
-+    int ipSystemStatsTable_post_request(ipSystemStatsTable_registration *
926
-                                         user_context, int rc);
927
- 
928
--    int
929
--     
930
--        
931
--        
932
--        
933
--        
934
--        
935
--        
936
--        
937
--        
938
--        
939
--        
940
--        
941
--        
942
--        
943
--        
944
--        ipSystemStatsTable_rowreq_ctx_init(ipSystemStatsTable_rowreq_ctx *
945
-+    int ipSystemStatsTable_rowreq_ctx_init(ipSystemStatsTable_rowreq_ctx *
946
-                                            rowreq_ctx,
947
-                                            void *user_init_ctx);
948
-     void
949
--     
950
--        
951
--        
952
--        
953
--        
954
--        
955
--        
956
--        
957
--        
958
--        
959
--        
960
--        
961
--        
962
--        
963
--        
964
-         ipSystemStatsTable_rowreq_ctx_cleanup(ipSystemStatsTable_rowreq_ctx
965
-                                               * rowreq_ctx);
966
- 
967
-     ipSystemStatsTable_data *ipSystemStatsTable_allocate_data(void);
968
-     void            ipSystemStatsTable_release_data(ipSystemStatsTable_data
969
-                                                     * data);
970
--
971
--
972
--         
973
--         
974
--         
975
--         
976
--         
977
--         
978
--        ipSystemStatsTable_rowreq_ctx
979
-+    ipSystemStatsTable_rowreq_ctx
980
-         * ipSystemStatsTable_row_find_by_mib_index
981
-         (ipSystemStatsTable_mib_index * mib_idx);
982
- 
983
-@@ -265,226 +194,50 @@
984
-      * indexes
985
-      */
986
- 
987
--    int
988
--     
989
--        
990
--        
991
--        
992
--        
993
--        
994
--        
995
--        
996
--        
997
--        
998
--        
999
--        
1000
--        
1001
--        
1002
--        
1003
--        ipSystemStatsInReceives_get(ipSystemStatsTable_rowreq_ctx *
1004
-+    int ipSystemStatsInReceives_get(ipSystemStatsTable_rowreq_ctx *
1005
-                                     rowreq_ctx,
1006
-                                     u_long *
1007
-                                     ipSystemStatsInReceives_val_ptr);
1008
--    int
1009
--     
1010
--        
1011
--        
1012
--        
1013
--        
1014
--        
1015
--        
1016
--        
1017
--        
1018
--        
1019
--        
1020
--        
1021
--        
1022
--        
1023
--        
1024
--        ipSystemStatsHCInReceives_get(ipSystemStatsTable_rowreq_ctx *
1025
--                                      rowreq_ctx,
1026
--                                      U64 *
1027
-+    int ipSystemStatsHCInReceives_get(ipSystemStatsTable_rowreq_ctx *
1028
-+                                      rowreq_ctx,
1029
-+                                      struct counter64 *
1030
-                                       ipSystemStatsHCInReceives_val_ptr);
1031
-     int             ipSystemStatsInOctets_get(ipSystemStatsTable_rowreq_ctx
1032
-                                               * rowreq_ctx,
1033
-                                               u_long *
1034
-                                               ipSystemStatsInOctets_val_ptr);
1035
--    int
1036
--     
1037
--        
1038
--        
1039
--        
1040
--        
1041
--        
1042
--        
1043
--        
1044
--        
1045
--        
1046
--        
1047
--        
1048
--        
1049
--        
1050
--        
1051
--        ipSystemStatsHCInOctets_get(ipSystemStatsTable_rowreq_ctx *
1052
--                                    rowreq_ctx,
1053
--                                    U64 * ipSystemStatsHCInOctets_val_ptr);
1054
--    int
1055
--     
1056
--        
1057
--        
1058
--        
1059
--        
1060
--        
1061
--        
1062
--        
1063
--        
1064
--        
1065
--        
1066
--        
1067
--        
1068
--        
1069
--        
1070
--        ipSystemStatsInHdrErrors_get(ipSystemStatsTable_rowreq_ctx *
1071
-+    int ipSystemStatsHCInOctets_get(ipSystemStatsTable_rowreq_ctx *
1072
-+                                    rowreq_ctx,
1073
-+                                    struct counter64 *ipSystemStatsHCInOctets_val_ptr);
1074
-+    int ipSystemStatsInHdrErrors_get(ipSystemStatsTable_rowreq_ctx *
1075
-                                      rowreq_ctx,
1076
-                                      u_long *
1077
-                                      ipSystemStatsInHdrErrors_val_ptr);
1078
--    int
1079
--     
1080
--        
1081
--        
1082
--        
1083
--        
1084
--        
1085
--        
1086
--        
1087
--        
1088
--        
1089
--        
1090
--        
1091
--        
1092
--        
1093
--        
1094
--        ipSystemStatsInNoRoutes_get(ipSystemStatsTable_rowreq_ctx *
1095
-+    int ipSystemStatsInNoRoutes_get(ipSystemStatsTable_rowreq_ctx *
1096
-                                     rowreq_ctx,
1097
-                                     u_long *
1098
-                                     ipSystemStatsInNoRoutes_val_ptr);
1099
--    int
1100
--     
1101
--        
1102
--        
1103
--        
1104
--        
1105
--        
1106
--        
1107
--        
1108
--        
1109
--        
1110
--        
1111
--        
1112
--        
1113
--        
1114
--        
1115
--        ipSystemStatsInAddrErrors_get(ipSystemStatsTable_rowreq_ctx *
1116
-+    int ipSystemStatsInAddrErrors_get(ipSystemStatsTable_rowreq_ctx *
1117
-                                       rowreq_ctx,
1118
-                                       u_long *
1119
-                                       ipSystemStatsInAddrErrors_val_ptr);
1120
--    int
1121
--     
1122
--        
1123
--        
1124
--        
1125
--        
1126
--        
1127
--        
1128
--        
1129
--        
1130
--        
1131
--        
1132
--        
1133
--        
1134
--        
1135
--        
1136
--        ipSystemStatsInUnknownProtos_get(ipSystemStatsTable_rowreq_ctx *
1137
-+    int ipSystemStatsInUnknownProtos_get(ipSystemStatsTable_rowreq_ctx *
1138
-                                          rowreq_ctx,
1139
-                                          u_long *
1140
-                                          ipSystemStatsInUnknownProtos_val_ptr);
1141
--    int
1142
--     
1143
--        
1144
--        
1145
--        
1146
--        
1147
--        
1148
--        
1149
--        
1150
--        
1151
--        
1152
--        
1153
--        
1154
--        
1155
--        
1156
--        
1157
--        ipSystemStatsInTruncatedPkts_get(ipSystemStatsTable_rowreq_ctx *
1158
-+    int ipSystemStatsInTruncatedPkts_get(ipSystemStatsTable_rowreq_ctx *
1159
-                                          rowreq_ctx,
1160
-                                          u_long *
1161
-                                          ipSystemStatsInTruncatedPkts_val_ptr);
1162
--    int
1163
--     
1164
--        
1165
--        
1166
--        
1167
--        
1168
--        
1169
--        
1170
--        
1171
--        
1172
--        
1173
--        
1174
--        
1175
--        
1176
--        
1177
--        
1178
--        ipSystemStatsInForwDatagrams_get(ipSystemStatsTable_rowreq_ctx *
1179
-+    int ipSystemStatsInForwDatagrams_get(ipSystemStatsTable_rowreq_ctx *
1180
-                                          rowreq_ctx,
1181
-                                          u_long *
1182
-                                          ipSystemStatsInForwDatagrams_val_ptr);
1183
--    int
1184
--     
1185
--        
1186
--        
1187
--        
1188
--        
1189
--        
1190
--        
1191
--        
1192
--        
1193
--        
1194
--        
1195
--        
1196
--        
1197
--        
1198
--        
1199
--        ipSystemStatsHCInForwDatagrams_get(ipSystemStatsTable_rowreq_ctx *
1200
-+    int ipSystemStatsHCInForwDatagrams_get(ipSystemStatsTable_rowreq_ctx *
1201
-                                            rowreq_ctx,
1202
--                                           U64 *
1203
-+                                           struct counter64 *
1204
-                                            ipSystemStatsHCInForwDatagrams_val_ptr);
1205
--    int
1206
--     
1207
--        
1208
--        
1209
--        
1210
--        
1211
--        
1212
--        
1213
--        
1214
--        
1215
--        
1216
--        
1217
--        
1218
--        
1219
--        
1220
--        
1221
--        ipSystemStatsReasmReqds_get(ipSystemStatsTable_rowreq_ctx *
1222
-+    int ipSystemStatsReasmReqds_get(ipSystemStatsTable_rowreq_ctx *
1223
-                                     rowreq_ctx,
1224
-                                     u_long *
1225
-                                     ipSystemStatsReasmReqds_val_ptr);
1226
-@@ -492,689 +245,141 @@
1227
-                                               * rowreq_ctx,
1228
-                                               u_long *
1229
-                                               ipSystemStatsReasmOKs_val_ptr);
1230
--    int
1231
--     
1232
--        
1233
--        
1234
--        
1235
--        
1236
--        
1237
--        
1238
--        
1239
--        
1240
--        
1241
--        
1242
--        
1243
--        
1244
--        
1245
--        
1246
--        ipSystemStatsReasmFails_get(ipSystemStatsTable_rowreq_ctx *
1247
-+    int ipSystemStatsReasmFails_get(ipSystemStatsTable_rowreq_ctx *
1248
-                                     rowreq_ctx,
1249
-                                     u_long *
1250
-                                     ipSystemStatsReasmFails_val_ptr);
1251
--    int
1252
--     
1253
--        
1254
--        
1255
--        
1256
--        
1257
--        
1258
--        
1259
--        
1260
--        
1261
--        
1262
--        
1263
--        
1264
--        
1265
--        
1266
--        
1267
--        ipSystemStatsInDiscards_get(ipSystemStatsTable_rowreq_ctx *
1268
-+    int ipSystemStatsInDiscards_get(ipSystemStatsTable_rowreq_ctx *
1269
-                                     rowreq_ctx,
1270
-                                     u_long *
1271
-                                     ipSystemStatsInDiscards_val_ptr);
1272
--    int
1273
--     
1274
--        
1275
--        
1276
--        
1277
--        
1278
--        
1279
--        
1280
--        
1281
--        
1282
--        
1283
--        
1284
--        
1285
--        
1286
--        
1287
--        
1288
--        ipSystemStatsInDelivers_get(ipSystemStatsTable_rowreq_ctx *
1289
-+    int ipSystemStatsInDelivers_get(ipSystemStatsTable_rowreq_ctx *
1290
-                                     rowreq_ctx,
1291
-                                     u_long *
1292
-                                     ipSystemStatsInDelivers_val_ptr);
1293
--    int
1294
--     
1295
--        
1296
--        
1297
--        
1298
--        
1299
--        
1300
--        
1301
--        
1302
--        
1303
--        
1304
--        
1305
--        
1306
--        
1307
--        
1308
--        
1309
--        ipSystemStatsHCInDelivers_get(ipSystemStatsTable_rowreq_ctx *
1310
--                                      rowreq_ctx,
1311
--                                      U64 *
1312
-+    int ipSystemStatsHCInDelivers_get(ipSystemStatsTable_rowreq_ctx *
1313
-+                                      rowreq_ctx,
1314
-+                                      struct counter64 *
1315
-                                       ipSystemStatsHCInDelivers_val_ptr);
1316
--    int
1317
--     
1318
--        
1319
--        
1320
--        
1321
--        
1322
--        
1323
--        
1324
--        
1325
--        
1326
--        
1327
--        
1328
--        
1329
--        
1330
--        
1331
--        
1332
--        ipSystemStatsOutRequests_get(ipSystemStatsTable_rowreq_ctx *
1333
-+    int ipSystemStatsOutRequests_get(ipSystemStatsTable_rowreq_ctx *
1334
-                                      rowreq_ctx,
1335
-                                      u_long *
1336
-                                      ipSystemStatsOutRequests_val_ptr);
1337
--    int
1338
--     
1339
--        
1340
--        
1341
--        
1342
--        
1343
--        
1344
--        
1345
--        
1346
--        
1347
--        
1348
--        
1349
--        
1350
--        
1351
--        
1352
--        
1353
--        ipSystemStatsHCOutRequests_get(ipSystemStatsTable_rowreq_ctx *
1354
-+    int ipSystemStatsHCOutRequests_get(ipSystemStatsTable_rowreq_ctx *
1355
-                                        rowreq_ctx,
1356
--                                       U64 *
1357
-+                                       struct counter64 *
1358
-                                        ipSystemStatsHCOutRequests_val_ptr);
1359
--    int
1360
--     
1361
--        
1362
--        
1363
--        
1364
--        
1365
--        
1366
--        
1367
--        
1368
--        
1369
--        
1370
--        
1371
--        
1372
--        
1373
--        
1374
--        
1375
--        ipSystemStatsOutNoRoutes_get(ipSystemStatsTable_rowreq_ctx *
1376
-+    int ipSystemStatsOutNoRoutes_get(ipSystemStatsTable_rowreq_ctx *
1377
-                                      rowreq_ctx,
1378
-                                      u_long *
1379
-                                      ipSystemStatsOutNoRoutes_val_ptr);
1380
--    int
1381
--     
1382
--        
1383
--        
1384
--        
1385
--        
1386
--        
1387
--        
1388
--        
1389
--        
1390
--        
1391
--        
1392
--        
1393
--        
1394
--        
1395
--        
1396
--        ipSystemStatsOutForwDatagrams_get(ipSystemStatsTable_rowreq_ctx *
1397
-+    int ipSystemStatsOutForwDatagrams_get(ipSystemStatsTable_rowreq_ctx *
1398
-                                           rowreq_ctx,
1399
-                                           u_long *
1400
-                                           ipSystemStatsOutForwDatagrams_val_ptr);
1401
--    int
1402
--     
1403
--        
1404
--        
1405
--        
1406
--        
1407
--        
1408
--        
1409
--        
1410
--        
1411
--        
1412
--        
1413
--        
1414
--        
1415
--        
1416
--        
1417
--        ipSystemStatsHCOutForwDatagrams_get(ipSystemStatsTable_rowreq_ctx *
1418
-+    int ipSystemStatsHCOutForwDatagrams_get(ipSystemStatsTable_rowreq_ctx *
1419
-                                             rowreq_ctx,
1420
--                                            U64 *
1421
-+                                            struct counter64 *
1422
-                                             ipSystemStatsHCOutForwDatagrams_val_ptr);
1423
--    int
1424
--     
1425
--        
1426
--        
1427
--        
1428
--        
1429
--        
1430
--        
1431
--        
1432
--        
1433
--        
1434
--        
1435
--        
1436
--        
1437
--        
1438
--        
1439
--        ipSystemStatsOutDiscards_get(ipSystemStatsTable_rowreq_ctx *
1440
-+    int ipSystemStatsOutDiscards_get(ipSystemStatsTable_rowreq_ctx *
1441
-                                      rowreq_ctx,
1442
-                                      u_long *
1443
-                                      ipSystemStatsOutDiscards_val_ptr);
1444
--    int
1445
--     
1446
--        
1447
--        
1448
--        
1449
--        
1450
--        
1451
--        
1452
--        
1453
--        
1454
--        
1455
--        
1456
--        
1457
--        
1458
--        
1459
--        
1460
--        ipSystemStatsOutFragReqds_get(ipSystemStatsTable_rowreq_ctx *
1461
-+    int ipSystemStatsOutFragReqds_get(ipSystemStatsTable_rowreq_ctx *
1462
-                                       rowreq_ctx,
1463
-                                       u_long *
1464
-                                       ipSystemStatsOutFragReqds_val_ptr);
1465
--    int
1466
--     
1467
--        
1468
--        
1469
--        
1470
--        
1471
--        
1472
--        
1473
--        
1474
--        
1475
--        
1476
--        
1477
--        
1478
--        
1479
--        
1480
--        
1481
--        ipSystemStatsOutFragOKs_get(ipSystemStatsTable_rowreq_ctx *
1482
-+    int ipSystemStatsOutFragOKs_get(ipSystemStatsTable_rowreq_ctx *
1483
-                                     rowreq_ctx,
1484
-                                     u_long *
1485
-                                     ipSystemStatsOutFragOKs_val_ptr);
1486
--    int
1487
--     
1488
--        
1489
--        
1490
--        
1491
--        
1492
--        
1493
--        
1494
--        
1495
--        
1496
--        
1497
--        
1498
--        
1499
--        
1500
--        
1501
--        
1502
--        ipSystemStatsOutFragFails_get(ipSystemStatsTable_rowreq_ctx *
1503
-+    int ipSystemStatsOutFragFails_get(ipSystemStatsTable_rowreq_ctx *
1504
-                                       rowreq_ctx,
1505
-                                       u_long *
1506
-                                       ipSystemStatsOutFragFails_val_ptr);
1507
--    int
1508
--     
1509
--        
1510
--        
1511
--        
1512
--        
1513
--        
1514
--        
1515
--        
1516
--        
1517
--        
1518
--        
1519
--        
1520
--        
1521
--        
1522
--        
1523
--        ipSystemStatsOutFragCreates_get(ipSystemStatsTable_rowreq_ctx *
1524
-+    int ipSystemStatsOutFragCreates_get(ipSystemStatsTable_rowreq_ctx *
1525
-                                         rowreq_ctx,
1526
-                                         u_long *
1527
-                                         ipSystemStatsOutFragCreates_val_ptr);
1528
--    int
1529
--     
1530
--        
1531
--        
1532
--        
1533
--        
1534
--        
1535
--        
1536
--        
1537
--        
1538
--        
1539
--        
1540
--        
1541
--        
1542
--        
1543
--        
1544
--        ipSystemStatsOutTransmits_get(ipSystemStatsTable_rowreq_ctx *
1545
-+    int ipSystemStatsOutTransmits_get(ipSystemStatsTable_rowreq_ctx *
1546
-                                       rowreq_ctx,
1547
-                                       u_long *
1548
-                                       ipSystemStatsOutTransmits_val_ptr);
1549
--    int
1550
--     
1551
--        
1552
--        
1553
--        
1554
--        
1555
--        
1556
--        
1557
--        
1558
--        
1559
--        
1560
--        
1561
--        
1562
--        
1563
--        
1564
--        
1565
--        ipSystemStatsHCOutTransmits_get(ipSystemStatsTable_rowreq_ctx *
1566
-+    int ipSystemStatsHCOutTransmits_get(ipSystemStatsTable_rowreq_ctx *
1567
-                                         rowreq_ctx,
1568
--                                        U64 *
1569
-+                                        struct counter64 *
1570
-                                         ipSystemStatsHCOutTransmits_val_ptr);
1571
--    int
1572
--     
1573
--        
1574
--        
1575
--        
1576
--        
1577
--        
1578
--        
1579
--        
1580
--        
1581
--        
1582
--        
1583
--        
1584
--        
1585
--        
1586
--        
1587
--        ipSystemStatsOutOctets_get(ipSystemStatsTable_rowreq_ctx *
1588
-+    int ipSystemStatsOutOctets_get(ipSystemStatsTable_rowreq_ctx *
1589
-                                    rowreq_ctx,
1590
-                                    u_long *
1591
-                                    ipSystemStatsOutOctets_val_ptr);
1592
--    int
1593
--     
1594
--        
1595
--        
1596
--        
1597
--        
1598
--        
1599
--        
1600
--        
1601
--        
1602
--        
1603
--        
1604
--        
1605
--        
1606
--        
1607
--        
1608
--        ipSystemStatsHCOutOctets_get(ipSystemStatsTable_rowreq_ctx *
1609
--                                     rowreq_ctx,
1610
--                                     U64 *
1611
-+    int ipSystemStatsHCOutOctets_get(ipSystemStatsTable_rowreq_ctx *
1612
-+                                     rowreq_ctx,
1613
-+                                     struct counter64 *
1614
-                                      ipSystemStatsHCOutOctets_val_ptr);
1615
--    int
1616
--     
1617
--        
1618
--        
1619
--        
1620
--        
1621
--        
1622
--        
1623
--        
1624
--        
1625
--        
1626
--        
1627
--        
1628
--        
1629
--        
1630
--        
1631
--        ipSystemStatsInMcastPkts_get(ipSystemStatsTable_rowreq_ctx *
1632
-+    int ipSystemStatsInMcastPkts_get(ipSystemStatsTable_rowreq_ctx *
1633
-                                      rowreq_ctx,
1634
-                                      u_long *
1635
-                                      ipSystemStatsInMcastPkts_val_ptr);
1636
--    int
1637
--     
1638
--        
1639
--        
1640
--        
1641
--        
1642
--        
1643
--        
1644
--        
1645
--        
1646
--        
1647
--        
1648
--        
1649
--        
1650
--        
1651
--        
1652
--        ipSystemStatsHCInMcastPkts_get(ipSystemStatsTable_rowreq_ctx *
1653
-+    int ipSystemStatsHCInMcastPkts_get(ipSystemStatsTable_rowreq_ctx *
1654
-                                        rowreq_ctx,
1655
--                                       U64 *
1656
-+                                       struct counter64 *
1657
-                                        ipSystemStatsHCInMcastPkts_val_ptr);
1658
--    int
1659
--     
1660
--        
1661
--        
1662
--        
1663
--        
1664
--        
1665
--        
1666
--        
1667
--        
1668
--        
1669
--        
1670
--        
1671
--        
1672
--        
1673
--        
1674
--        ipSystemStatsInMcastOctets_get(ipSystemStatsTable_rowreq_ctx *
1675
-+    int ipSystemStatsInMcastOctets_get(ipSystemStatsTable_rowreq_ctx *
1676
-                                        rowreq_ctx,
1677
-                                        u_long *
1678
-                                        ipSystemStatsInMcastOctets_val_ptr);
1679
--    int
1680
--     
1681
--        
1682
--        
1683
--        
1684
--        
1685
--        
1686
--        
1687
--        
1688
--        
1689
--        
1690
--        
1691
--        
1692
--        
1693
--        
1694
--        
1695
--        ipSystemStatsHCInMcastOctets_get(ipSystemStatsTable_rowreq_ctx *
1696
-+    int ipSystemStatsHCInMcastOctets_get(ipSystemStatsTable_rowreq_ctx *
1697
-                                          rowreq_ctx,
1698
--                                         U64 *
1699
-+                                         struct counter64 *
1700
-                                          ipSystemStatsHCInMcastOctets_val_ptr);
1701
--    int
1702
--     
1703
--        
1704
--        
1705
--        
1706
--        
1707
--        
1708
--        
1709
--        
1710
--        
1711
--        
1712
--        
1713
--        
1714
--        
1715
--        
1716
--        
1717
--        ipSystemStatsOutMcastPkts_get(ipSystemStatsTable_rowreq_ctx *
1718
-+    int ipSystemStatsOutMcastPkts_get(ipSystemStatsTable_rowreq_ctx *
1719
-                                       rowreq_ctx,
1720
-                                       u_long *
1721
-                                       ipSystemStatsOutMcastPkts_val_ptr);
1722
--    int
1723
--     
1724
--        
1725
--        
1726
--        
1727
--        
1728
--        
1729
--        
1730
--        
1731
--        
1732
--        
1733
--        
1734
--        
1735
--        
1736
--        
1737
--        
1738
--        ipSystemStatsHCOutMcastPkts_get(ipSystemStatsTable_rowreq_ctx *
1739
-+    int ipSystemStatsHCOutMcastPkts_get(ipSystemStatsTable_rowreq_ctx *
1740
-                                         rowreq_ctx,
1741
--                                        U64 *
1742
-+                                        struct counter64 *
1743
-                                         ipSystemStatsHCOutMcastPkts_val_ptr);
1744
--    int
1745
--     
1746
--        
1747
--        
1748
--        
1749
--        
1750
--        
1751
--        
1752
--        
1753
--        
1754
--        
1755
--        
1756
--        
1757
--        
1758
--        
1759
--        
1760
--        ipSystemStatsOutMcastOctets_get(ipSystemStatsTable_rowreq_ctx *
1761
-+    int ipSystemStatsOutMcastOctets_get(ipSystemStatsTable_rowreq_ctx *
1762
-                                         rowreq_ctx,
1763
-                                         u_long *
1764
-                                         ipSystemStatsOutMcastOctets_val_ptr);
1765
--    int
1766
--     
1767
--        
1768
--        
1769
--        
1770
--        
1771
--        
1772
--        
1773
--        
1774
--        
1775
--        
1776
--        
1777
--        
1778
--        
1779
--        
1780
--        
1781
--        ipSystemStatsHCOutMcastOctets_get(ipSystemStatsTable_rowreq_ctx *
1782
-+    int ipSystemStatsHCOutMcastOctets_get(ipSystemStatsTable_rowreq_ctx *
1783
-                                           rowreq_ctx,
1784
--                                          U64 *
1785
-+                                          struct counter64 *
1786
-                                           ipSystemStatsHCOutMcastOctets_val_ptr);
1787
--    int
1788
--     
1789
--        
1790
--        
1791
--        
1792
--        
1793
--        
1794
--        
1795
--        
1796
--        
1797
--        
1798
--        
1799
--        
1800
--        
1801
--        
1802
--        
1803
--        ipSystemStatsInBcastPkts_get(ipSystemStatsTable_rowreq_ctx *
1804
-+    int ipSystemStatsInBcastPkts_get(ipSystemStatsTable_rowreq_ctx *
1805
-                                      rowreq_ctx,
1806
-                                      u_long *
1807
-                                      ipSystemStatsInBcastPkts_val_ptr);
1808
--    int
1809
--     
1810
--        
1811
--        
1812
--        
1813
--        
1814
--        
1815
--        
1816
--        
1817
--        
1818
--        
1819
--        
1820
--        
1821
--        
1822
--        
1823
--        
1824
--        ipSystemStatsHCInBcastPkts_get(ipSystemStatsTable_rowreq_ctx *
1825
-+    int ipSystemStatsHCInBcastPkts_get(ipSystemStatsTable_rowreq_ctx *
1826
-                                        rowreq_ctx,
1827
--                                       U64 *
1828
-+                                       struct counter64 *
1829
-                                        ipSystemStatsHCInBcastPkts_val_ptr);
1830
--    int
1831
--     
1832
--        
1833
--        
1834
--        
1835
--        
1836
--        
1837
--        
1838
--        
1839
--        
1840
--        
1841
--        
1842
--        
1843
--        
1844
--        
1845
--        
1846
--        ipSystemStatsOutBcastPkts_get(ipSystemStatsTable_rowreq_ctx *
1847
-+    int ipSystemStatsOutBcastPkts_get(ipSystemStatsTable_rowreq_ctx *
1848
-                                       rowreq_ctx,
1849
-                                       u_long *
1850
-                                       ipSystemStatsOutBcastPkts_val_ptr);
1851
--    int
1852
--     
1853
--        
1854
--        
1855
--        
1856
--        
1857
--        
1858
--        
1859
--        
1860
--        
1861
--        
1862
--        
1863
--        
1864
--        
1865
--        
1866
--        
1867
--        ipSystemStatsHCOutBcastPkts_get(ipSystemStatsTable_rowreq_ctx *
1868
-+    int ipSystemStatsHCOutBcastPkts_get(ipSystemStatsTable_rowreq_ctx *
1869
-                                         rowreq_ctx,
1870
--                                        U64 *
1871
-+                                        struct counter64 *
1872
-                                         ipSystemStatsHCOutBcastPkts_val_ptr);
1873
--    int
1874
--     
1875
--        
1876
--        
1877
--        
1878
--        
1879
--        
1880
--        
1881
--        
1882
--        
1883
--        
1884
--        
1885
--        
1886
--        
1887
--        
1888
--        
1889
--        ipSystemStatsDiscontinuityTime_get(ipSystemStatsTable_rowreq_ctx *
1890
-+    int ipSystemStatsDiscontinuityTime_get(ipSystemStatsTable_rowreq_ctx *
1891
-                                            rowreq_ctx,
1892
-                                            u_long *
1893
-                                            ipSystemStatsDiscontinuityTime_val_ptr);
1894
--    int
1895
--     
1896
--        
1897
--        
1898
--        
1899
--        
1900
--        
1901
--        
1902
--        
1903
--        
1904
--        
1905
--        
1906
--        
1907
--        
1908
--        
1909
--        
1910
--        ipSystemStatsRefreshRate_get(ipSystemStatsTable_rowreq_ctx *
1911
-+    int ipSystemStatsRefreshRate_get(ipSystemStatsTable_rowreq_ctx *
1912
-                                      rowreq_ctx,
1913
-                                      u_long *
1914
-                                      ipSystemStatsRefreshRate_val_ptr);
1915
--
1916
--
1917
--    int
1918
--     
1919
--        
1920
--        
1921
--        
1922
--        
1923
--        
1924
--        
1925
--        
1926
--        
1927
--        
1928
--        
1929
--        
1930
--        
1931
--        
1932
--        
1933
--        ipSystemStatsTable_indexes_set_tbl_idx(ipSystemStatsTable_mib_index
1934
-+    int ipSystemStatsTable_indexes_set_tbl_idx(ipSystemStatsTable_mib_index
1935
-                                                * tbl_idx,
1936
-                                                u_long
1937
-                                                ipSystemStatsIPVersion_val);
1938
--    int
1939
--     
1940
--        
1941
--        
1942
--        
1943
--        
1944
--        
1945
--        
1946
--        
1947
--        
1948
--        
1949
--        
1950
--        
1951
--        
1952
--        
1953
--        
1954
--        ipSystemStatsTable_indexes_set(ipSystemStatsTable_rowreq_ctx *
1955
-+    int ipSystemStatsTable_indexes_set(ipSystemStatsTable_rowreq_ctx *
1956
-                                        rowreq_ctx,
1957
-                                        u_long ipSystemStatsIPVersion_val);
1958
--
1959
--
1960
- 
1961
-     /*
1962
-      *********************************************************************
1963
-+++ b/agent/mibgroup/ip-mib/ipSystemStatsTable/ipSystemStatsTable_interface.c
1964
-@@ -674,10 +674,10 @@
1965
-          * ipSystemStatsHCInReceives(4)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
1966
-          */
1967
-     case COLUMN_IPSYSTEMSTATSHCINRECEIVES:
1968
--        var->val_len = sizeof(U64);
1969
-+        var->val_len = sizeof(struct counter64);
1970
-         var->type = ASN_COUNTER64;
1971
-         rc = ipSystemStatsHCInReceives_get(rowreq_ctx,
1972
--                                           (U64 *) var->val.string);
1973
-+                                           (struct counter64 *) var->val.string);
1974
-         break;
1975
- 
1976
-         /*
1977
-@@ -694,10 +694,10 @@
1978
-          * ipSystemStatsHCInOctets(6)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
1979
-          */
1980
-     case COLUMN_IPSYSTEMSTATSHCINOCTETS:
1981
--        var->val_len = sizeof(U64);
1982
-+        var->val_len = sizeof(struct counter64);
1983
-         var->type = ASN_COUNTER64;
1984
-         rc = ipSystemStatsHCInOctets_get(rowreq_ctx,
1985
--                                         (U64 *) var->val.string);
1986
-+                                         (struct counter64 *) var->val.string);
1987
-         break;
1988
- 
1989
-         /*
1990
-@@ -764,10 +764,10 @@
1991
-          * ipSystemStatsHCInForwDatagrams(13)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
1992
-          */
1993
-     case COLUMN_IPSYSTEMSTATSHCINFORWDATAGRAMS:
1994
--        var->val_len = sizeof(U64);
1995
-+        var->val_len = sizeof(struct counter64);
1996
-         var->type = ASN_COUNTER64;
1997
-         rc = ipSystemStatsHCInForwDatagrams_get(rowreq_ctx,
1998
--                                                (U64 *) var->val.string);
1999
-+                                                (struct counter64 *) var->val.string);
2000
-         break;
2001
- 
2002
-         /*
2003
-@@ -824,10 +824,10 @@
2004
-          * ipSystemStatsHCInDelivers(19)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
2005
-          */
2006
-     case COLUMN_IPSYSTEMSTATSHCINDELIVERS:
2007
--        var->val_len = sizeof(U64);
2008
-+        var->val_len = sizeof(struct counter64);
2009
-         var->type = ASN_COUNTER64;
2010
-         rc = ipSystemStatsHCInDelivers_get(rowreq_ctx,
2011
--                                           (U64 *) var->val.string);
2012
-+                                           (struct counter64 *) var->val.string);
2013
-         break;
2014
- 
2015
-         /*
2016
-@@ -844,10 +844,10 @@
2017
-          * ipSystemStatsHCOutRequests(21)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
2018
-          */
2019
-     case COLUMN_IPSYSTEMSTATSHCOUTREQUESTS:
2020
--        var->val_len = sizeof(U64);
2021
-+        var->val_len = sizeof(struct counter64);
2022
-         var->type = ASN_COUNTER64;
2023
-         rc = ipSystemStatsHCOutRequests_get(rowreq_ctx,
2024
--                                            (U64 *) var->val.string);
2025
-+                                            (struct counter64 *) var->val.string);
2026
-         break;
2027
- 
2028
-         /*
2029
-@@ -874,10 +874,10 @@
2030
-          * ipSystemStatsHCOutForwDatagrams(24)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
2031
-          */
2032
-     case COLUMN_IPSYSTEMSTATSHCOUTFORWDATAGRAMS:
2033
--        var->val_len = sizeof(U64);
2034
-+        var->val_len = sizeof(struct counter64);
2035
-         var->type = ASN_COUNTER64;
2036
-         rc = ipSystemStatsHCOutForwDatagrams_get(rowreq_ctx,
2037
--                                                 (U64 *) var->val.string);
2038
-+                                                 (struct counter64 *) var->val.string);
2039
-         break;
2040
- 
2041
-         /*
2042
-@@ -944,10 +944,10 @@
2043
-          * ipSystemStatsHCOutTransmits(31)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
2044
-          */
2045
-     case COLUMN_IPSYSTEMSTATSHCOUTTRANSMITS:
2046
--        var->val_len = sizeof(U64);
2047
-+        var->val_len = sizeof(struct counter64);
2048
-         var->type = ASN_COUNTER64;
2049
-         rc = ipSystemStatsHCOutTransmits_get(rowreq_ctx,
2050
--                                             (U64 *) var->val.string);
2051
-+                                             (struct counter64 *) var->val.string);
2052
-         break;
2053
- 
2054
-         /*
2055
-@@ -964,10 +964,10 @@
2056
-          * ipSystemStatsHCOutOctets(33)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
2057
-          */
2058
-     case COLUMN_IPSYSTEMSTATSHCOUTOCTETS:
2059
--        var->val_len = sizeof(U64);
2060
-+        var->val_len = sizeof(struct counter64);
2061
-         var->type = ASN_COUNTER64;
2062
-         rc = ipSystemStatsHCOutOctets_get(rowreq_ctx,
2063
--                                          (U64 *) var->val.string);
2064
-+                                          (struct counter64 *) var->val.string);
2065
-         break;
2066
- 
2067
-         /*
2068
-@@ -984,10 +984,10 @@
2069
-          * ipSystemStatsHCInMcastPkts(35)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
2070
-          */
2071
-     case COLUMN_IPSYSTEMSTATSHCINMCASTPKTS:
2072
--        var->val_len = sizeof(U64);
2073
-+        var->val_len = sizeof(struct counter64);
2074
-         var->type = ASN_COUNTER64;
2075
-         rc = ipSystemStatsHCInMcastPkts_get(rowreq_ctx,
2076
--                                            (U64 *) var->val.string);
2077
-+                                            (struct counter64 *) var->val.string);
2078
-         break;
2079
- 
2080
-         /*
2081
-@@ -1004,10 +1004,10 @@
2082
-          * ipSystemStatsHCInMcastOctets(37)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
2083
-          */
2084
-     case COLUMN_IPSYSTEMSTATSHCINMCASTOCTETS:
2085
--        var->val_len = sizeof(U64);
2086
-+        var->val_len = sizeof(struct counter64);
2087
-         var->type = ASN_COUNTER64;
2088
-         rc = ipSystemStatsHCInMcastOctets_get(rowreq_ctx,
2089
--                                              (U64 *) var->val.string);
2090
-+                                              (struct counter64 *) var->val.string);
2091
-         break;
2092
- 
2093
-         /*
2094
-@@ -1024,10 +1024,10 @@
2095
-          * ipSystemStatsHCOutMcastPkts(39)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
2096
-          */
2097
-     case COLUMN_IPSYSTEMSTATSHCOUTMCASTPKTS:
2098
--        var->val_len = sizeof(U64);
2099
-+        var->val_len = sizeof(struct counter64);
2100
-         var->type = ASN_COUNTER64;
2101
-         rc = ipSystemStatsHCOutMcastPkts_get(rowreq_ctx,
2102
--                                             (U64 *) var->val.string);
2103
-+                                             (struct counter64 *) var->val.string);
2104
-         break;
2105
- 
2106
-         /*
2107
-@@ -1044,10 +1044,10 @@
2108
-          * ipSystemStatsHCOutMcastOctets(41)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
2109
-          */
2110
-     case COLUMN_IPSYSTEMSTATSHCOUTMCASTOCTETS:
2111
--        var->val_len = sizeof(U64);
2112
-+        var->val_len = sizeof(struct counter64);
2113
-         var->type = ASN_COUNTER64;
2114
-         rc = ipSystemStatsHCOutMcastOctets_get(rowreq_ctx,
2115
--                                               (U64 *) var->val.string);
2116
-+                                               (struct counter64 *) var->val.string);
2117
-         break;
2118
- 
2119
-         /*
2120
-@@ -1064,10 +1064,10 @@
2121
-          * ipSystemStatsHCInBcastPkts(43)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
2122
-          */
2123
-     case COLUMN_IPSYSTEMSTATSHCINBCASTPKTS:
2124
--        var->val_len = sizeof(U64);
2125
-+        var->val_len = sizeof(struct counter64);
2126
-         var->type = ASN_COUNTER64;
2127
-         rc = ipSystemStatsHCInBcastPkts_get(rowreq_ctx,
2128
--                                            (U64 *) var->val.string);
2129
-+                                            (struct counter64 *) var->val.string);
2130
-         break;
2131
- 
2132
-         /*
2133
-@@ -1084,10 +1084,10 @@
2134
-          * ipSystemStatsHCOutBcastPkts(45)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h 
2135
-          */
2136
-     case COLUMN_IPSYSTEMSTATSHCOUTBCASTPKTS:
2137
--        var->val_len = sizeof(U64);
2138
-+        var->val_len = sizeof(struct counter64);
2139
-         var->type = ASN_COUNTER64;
2140
-         rc = ipSystemStatsHCOutBcastPkts_get(rowreq_ctx,
2141
--                                             (U64 *) var->val.string);
2142
-+                                             (struct counter64 *) var->val.string);
2143
-         break;
2144
- 
2145
-         /*
2146
-include/net-snmp/data_access/ipstats.h Diff Switch to side-by-side view
2147
-+++ b/include/net-snmp/data_access/ipstats.h
2148
-@@ -58,45 +58,45 @@
2149
-     * other columns, when underlying OS does not provide them.
2150
-     * Always fill at least 32 bits, the table is periodically polled -> 32 bit
2151
-     * overflow shall be detected and 64 bit value should be computed automatically. */
2152
--   U64             HCInReceives;
2153
--   U64             HCInOctets;
2154
-+   struct counter64 HCInReceives;
2155
-+   struct counter64 HCInOctets;
2156
-    u_long          InHdrErrors;
2157
--   U64             HCInNoRoutes; 
2158
-+   struct counter64 HCInNoRoutes; 
2159
-    u_long          InAddrErrors;
2160
-    u_long          InUnknownProtos;
2161
-    u_long          InTruncatedPkts;
2162
-    
2163
-    /* optional, can be computed from HCInNoRoutes and HCOutForwDatagrams */
2164
--   U64             HCInForwDatagrams; 
2165
-+   struct counter64 HCInForwDatagrams; 
2166
-    
2167
-    u_long          ReasmReqds;
2168
-    u_long          ReasmOKs;
2169
-    u_long          ReasmFails;
2170
-    u_long          InDiscards;
2171
--   U64             HCInDelivers;
2172
--   U64             HCOutRequests;
2173
--   U64             HCOutNoRoutes;
2174
--   U64             HCOutForwDatagrams;
2175
--   U64             HCOutDiscards;
2176
-+   struct counter64 HCInDelivers;
2177
-+   struct counter64 HCOutRequests;
2178
-+   struct counter64 HCOutNoRoutes;
2179
-+   struct counter64 HCOutForwDatagrams;
2180
-+   struct counter64 HCOutDiscards;
2181
-    
2182
-    /* optional, can be computed from HCOutFragOKs + HCOutFragFails*/
2183
--   U64             HCOutFragReqds;
2184
--   U64             HCOutFragOKs;
2185
--   U64             HCOutFragFails;
2186
--   U64             HCOutFragCreates;
2187
-+   struct counter64 HCOutFragReqds;
2188
-+   struct counter64 HCOutFragOKs;
2189
-+   struct counter64 HCOutFragFails;
2190
-+   struct counter64 HCOutFragCreates;
2191
-    
2192
-    /* optional, can be computed from 
2193
-     * HCOutRequests +HCOutForwDatagrams + HCOutFragCreates
2194
-     * - HCOutFragReqds - HCOutNoRoutes  - HCOutDiscards */
2195
--   U64             HCOutTransmits;
2196
-+   struct counter64 HCOutTransmits;
2197
-    
2198
--   U64             HCOutOctets;
2199
--   U64             HCInMcastPkts;
2200
--   U64             HCInMcastOctets;
2201
--   U64             HCOutMcastPkts;
2202
--   U64             HCOutMcastOctets;
2203
--   U64             HCInBcastPkts;
2204
--   U64             HCOutBcastPkts;
2205
-+   struct counter64 HCOutOctets;
2206
-+   struct counter64 HCInMcastPkts;
2207
-+   struct counter64 HCInMcastOctets;
2208
-+   struct counter64 HCOutMcastPkts;
2209
-+   struct counter64 HCOutMcastOctets;
2210
-+   struct counter64 HCInBcastPkts;
2211
-+   struct counter64 HCOutBcastPkts;
2212
- 
2213
-    /* Array of available columns.*/
2214
-    int             columnAvail[IPSYSTEMSTATSTABLE_LAST+1];
2215
-include/net-snmp/library/int64.h Diff Switch to side-by-side view
2216
-+++ b/include/net-snmp/library/int64.h
2217
-@@ -5,31 +5,29 @@
2218
- extern          "C" {
2219
- #endif
2220
- 
2221
--    typedef struct counter64 U64;
2222
--
2223
- #define I64CHARSZ 21
2224
- 
2225
--    void            divBy10(U64, U64 *, unsigned int *);
2226
--    void            multBy10(U64, U64 *);
2227
--    void            incrByU16(U64 *, unsigned int);
2228
--    void            incrByU32(U64 *, unsigned int);
2229
-+    void            divBy10(struct counter64, struct counter64 *, unsigned int *);
2230
-+    void            multBy10(struct counter64, struct counter64 *);
2231
-+    void            incrByU16(struct counter64 *, unsigned int);
2232
-+    void            incrByU32(struct counter64 *, unsigned int);
2233
-     NETSNMP_IMPORT
2234
--    void            zeroU64(U64 *);
2235
--    int             isZeroU64(const U64 *);
2236
-+    void            zeroU64(struct counter64 *);
2237
-+    int             isZeroU64(const struct counter64 *);
2238
-     NETSNMP_IMPORT
2239
--    void            printU64(char *, const U64 *);
2240
-+    void            printU64(char *, const struct counter64 *);
2241
-     NETSNMP_IMPORT
2242
--    void            printI64(char *, const U64 *);
2243
--    int             read64(U64 *, const char *);
2244
-+    void            printI64(char *, const struct counter64 *);
2245
-+    int             read64(struct counter64 *, const char *);
2246
-     NETSNMP_IMPORT
2247
--    void            u64Subtract(const U64 * pu64one, const U64 * pu64two,
2248
--                                U64 * pu64out);
2249
--    void            u64Incr(U64 * pu64out, const U64 * pu64one);
2250
--    void            u64UpdateCounter(U64 * pu64out, const U64 * pu64one,
2251
--                                     const U64 * pu64two);
2252
--    void            u64Copy(U64 * pu64one, const U64 * pu64two);
2253
-+    void            u64Subtract(const struct counter64 *pu64one, const struct counter64 *pu64two,
2254
-+                                struct counter64 *pu64out);
2255
-+    void            u64Incr(struct counter64 *pu64out, const struct counter64 *pu64one);
2256
-+    void            u64UpdateCounter(struct counter64 *pu64out, const struct counter64 *pu64one,
2257
-+                                     const struct counter64 *pu64two);
2258
-+    void            u64Copy(struct counter64 *pu64one, const struct counter64 *pu64two);
2259
- 
2260
--    int             netsnmp_c64_check_for_32bit_wrap(U64 *old_val, U64 *new_val,
2261
-+    int             netsnmp_c64_check_for_32bit_wrap(struct counter64 *old_val, struct counter64 *new_val,
2262
-                                                      int adjust);
2263
-     NETSNMP_IMPORT
2264
-     int             netsnmp_c64_check32_and_update(struct counter64 *prev_val,
2265
-snmplib/int64.c Diff Switch to side-by-side view
2266
-+++ b/snmplib/int64.c
2267
-@@ -33,7 +33,7 @@
2268
-  * @param[out] puR   Remainder.
2269
-  */
2270
- void
2271
--divBy10(U64 u64, U64 * pu64Q, unsigned int *puR)
2272
-+divBy10(struct counter64 u64, struct counter64 *pu64Q, unsigned int *puR)
2273
- {
2274
-     unsigned long   ulT;
2275
-     unsigned long   ulQ;
2276
-@@ -83,7 +83,7 @@
2277
-  * @param[out] pu64P Product.
2278
-  */
2279
- void
2280
--multBy10(U64 u64, U64 * pu64P)
2281
-+multBy10(struct counter64 u64, struct counter64 *pu64P)
2282
- {
2283
-     unsigned long   ulT;
2284
-     unsigned long   ulP;
2285
-@@ -130,7 +130,7 @@
2286
-  *
2287
-  */
2288
- void
2289
--incrByU16(U64 * pu64, unsigned int u16)
2290
-+incrByU16(struct counter64 *pu64, unsigned int u16)
2291
- {
2292
-     incrByU32(pu64, u16);
2293
- }
2294
-@@ -143,7 +143,7 @@
2295
-  *
2296
-  */
2297
- void
2298
--incrByU32(U64 * pu64, unsigned int u32)
2299
-+incrByU32(struct counter64 *pu64, unsigned int u32)
2300
- {
2301
-     uint32_t tmp;
2302
- 
2303
-@@ -161,7 +161,7 @@
2304
-  * @param[out] pu64out pu64one - pu64two.
2305
-  */
2306
- void
2307
--u64Subtract(const U64 * pu64one, const U64 * pu64two, U64 * pu64out)
2308
-+u64Subtract(const struct counter64 *pu64one, const struct counter64 *pu64two, struct counter64 *pu64out)
2309
- {
2310
-     int carry;
2311
- 
2312
-@@ -177,7 +177,7 @@
2313
-  * @param[in,out] pu64out pu64out += pu64one.
2314
-  */
2315
- void
2316
--u64Incr(U64 * pu64out, const U64 * pu64one)
2317
-+u64Incr(struct counter64 *pu64out, const struct counter64 *pu64one)
2318
- {
2319
-     pu64out->high = (uint32_t)(pu64out->high + pu64one->high);
2320
-     incrByU32(pu64out, pu64one->low);
2321
-@@ -191,9 +191,9 @@
2322
-  * @param[out] pu64out pu64out += (pu64one - pu64two)
2323
-  */
2324
- void
2325
--u64UpdateCounter(U64 * pu64out, const U64 * pu64one, const U64 * pu64two)
2326
--{
2327
--    U64 tmp;
2328
-+u64UpdateCounter(struct counter64 *pu64out, const struct counter64 *pu64one, const struct counter64 *pu64two)
2329
-+{
2330
-+    struct counter64 tmp;
2331
- 
2332
-     u64Subtract(pu64one, pu64two, &tmp);
2333
-     u64Incr(pu64out, &tmp);
2334
-@@ -208,7 +208,7 @@
2335
-  * @param[out] pu64one Where to store the copy - *pu64one = *pu64two.
2336
-  */
2337
- void
2338
--u64Copy(U64 * pu64one, const U64 * pu64two)
2339
-+u64Copy(struct counter64 *pu64one, const struct counter64 *pu64two)
2340
- {
2341
-     *pu64one = *pu64two;
2342
- }
2343
-@@ -220,7 +220,7 @@
2344
-  * @param[in] pu64 Number to be zeroed.
2345
-  */
2346
- void
2347
--zeroU64(U64 * pu64)
2348
-+zeroU64(struct counter64 *pu64)
2349
- {
2350
-     pu64->low = 0;
2351
-     pu64->high = 0;
2352
-@@ -232,7 +232,7 @@
2353
-  * @param[in] pu64 Number to be checked.
2354
-  */
2355
- int
2356
--isZeroU64(const U64 * pu64)
2357
-+isZeroU64(const struct counter64 *pu64)
2358
- {
2359
-     return pu64->low == 0 && pu64->high == 0;
2360
- }
2361
-@@ -390,10 +390,10 @@
2362
- /** Convert an unsigned 64-bit number to ASCII. */
2363
- void
2364
- printU64(char *buf, /* char [I64CHARSZ+1]; */
2365
--         const U64 * pu64)
2366
--{
2367
--    U64             u64a;
2368
--    U64             u64b;
2369
-+         const struct counter64 *pu64)
2370
-+{
2371
-+    struct counter64 u64a;
2372
-+    struct counter64 u64b;
2373
- 
2374
-     char            aRes[I64CHARSZ + 1];
2375
-     unsigned int    u;
2376
-@@ -414,9 +414,9 @@
2377
- /** Convert a signed 64-bit number to ASCII. */
2378
- void
2379
- printI64(char *buf, /* char [I64CHARSZ+1]; */
2380
--         const U64 * pu64)
2381
--{
2382
--    U64             u64a;
2383
-+         const struct counter64 *pu64)
2384
-+{
2385
-+    struct counter64 u64a;
2386
- 
2387
-     if (pu64->high & 0x80000000) {
2388
-         u64a.high = (uint32_t) ~pu64->high;
2389
-@@ -429,11 +429,11 @@
2390
-     }
2391
- }
2392
- 
2393
--/** Convert a signed 64-bit integer from ASCII to U64. */
2394
-+/** Convert a signed 64-bit integer from ASCII to struct counter64. */
2395
- int
2396
--read64(U64 * i64, const char *str)
2397
--{
2398
--    U64             i64p;
2399
-+read64(struct counter64 *i64, const char *str)
2400
-+{
2401
-+    struct counter64 i64p;
2402
-     unsigned int    u;
2403
-     int             sign = 0;
2404
-     int             ok = 0;
2405
-+++ b/snmplib/read_config.c
2406
-@@ -2279,10 +2279,10 @@
2407
-         return readfrom;
2408
- 
2409
-     case ASN_COUNTER64:
2410
--        if (*len < sizeof(U64))
2411
-+        if (*len < sizeof(struct counter64))
2412
-             return NULL;
2413
--        *len = sizeof(U64);
2414
--        read64((U64 *) dataptr, readfrom);
2415
-+        *len = sizeof(struct counter64);
2416
-+        read64((struct counter64 *) dataptr, readfrom);
2417
-         readfrom = skip_token(readfrom);
2418
-         return readfrom;
2419
-     }
2420
-+++ b/testing/fulltests/unit-tests/T015int64_clib.c
2421
-@@ -1,4 +1,4 @@
2422
--/* HEADER Testing 64-bit integer operations (U64). */
2423
-+/* HEADER Testing 64-bit integer operations (struct counter64). */
2424
- 
2425
- int i, j;
2426
- char buf[22];
2427
-@@ -15,7 +15,7 @@
2428
- };
2429
- 
2430
- for (i = 0; i < sizeof(intval)/sizeof(intval[0]); ++i) {
2431
--    U64 a, b;
2432
-+    struct counter64 a, b;
2433
-     a.low = (uint32_t)intval[i];
2434
-     a.high = (uint32_t)(intval[i] >> 32);
2435
-     printI64(buf, &a);
2436
-@@ -27,7 +27,7 @@
2437
- 
2438
- for (i = 0; i < sizeof(intval)/sizeof(intval[0]); ++i) {
2439
-     for (j = i; j < sizeof(intval)/sizeof(intval[0]); ++j) {
2440
--        U64 a, b;
2441
-+        struct counter64 a, b;
2442
-         uint64_t d;
2443
-         a.low = (uint32_t)intval[i];
2444
-         a.high = (uint32_t)(intval[i] >> 32);
2445
-@@ -43,7 +43,7 @@
2446
-         
2447
- for (i = 0; i < sizeof(intval)/sizeof(intval[0]); ++i) {
2448
-     for (j = i; j < sizeof(intval)/sizeof(intval[0]); ++j) {
2449
--        U64 a, b, c;
2450
-+        struct counter64 a, b, c;
2451
-         uint64_t d;
2452
-         a.low = (uint32_t)intval[i];
2453
-         a.high = (uint32_t)(intval[i] >> 32);
2454
-@@ -58,7 +58,7 @@
2455
- }
2456
-         
2457
- {
2458
--    U64 old_val, new_val;
2459
-+    struct counter64 old_val, new_val;
2460
-     old_val.low = 7;
2461
-     old_val.high = 0;
2462
-     new_val = old_val;
... ...
@@ -1,21 +1,17 @@
1 1
 %global __requires_exclude perl\\(.*\\)
2 2
 Summary:        Net-SNMP is a suite of applications used to implement SNMP v1, SNMP v2c and SNMP v3 using both IPv4 and IPv6.
3 3
 Name:           net-snmp
4
-Version:        5.7.3
5
-Release:        9%{?dist}
4
+Version:        5.8
5
+Release:        1%{?dist}
6 6
 License:        BSD (like)
7 7
 URL:            http://net-snmp.sourceforge.net/
8 8
 Group:          Productivity/Networking/Other
9 9
 Vendor:         VMware, Inc.
10 10
 Distribution:   Photon
11 11
 Source0:        http://sourceforge.net/projects/%{name}/files/%{name}/%{version}/%{name}-%{version}.tar.gz
12
-%define sha1 net-snmp=97dc25077257680815de44e34128d365c76bd839
12
+%define sha1 net-snmp=78f70731df9dcdb13fe8f60eb7d80d7583da4d2c
13 13
 Source1:        snmpd.service
14 14
 Source2:        snmptrapd.service
15
-Patch1:         net-snmp-5.7.2-systemd.patch
16
-Patch2:         net-snmp-remove-u64-typedef.patch
17
-Patch3:         net-snmp-fix-perl-module-compilation.patch
18
-Patch4:         net-snmp-CVE-2018-1000116.patch
19 15
 BuildRequires:  openssl-devel perl systemd
20 16
 Requires:       perl systemd
21 17
 %description
... ...
@@ -31,10 +27,6 @@ The net-snmp-devel package contains headers and libraries for building SNMP appl
31 31
 
32 32
 %prep
33 33
 %setup -q
34
-%patch1 -p1
35
-%patch2 -p1
36
-%patch3 -p1
37
-%patch4 -p1
38 34
 
39 35
 %build
40 36
 ./configure --prefix=%{_prefix} \
... ...
@@ -99,6 +91,8 @@ rm -rf %{buildroot}/*
99 99
 %exclude /usr/lib/perl5/5.24.1/*/perllocal.pod
100 100
 
101 101
 %changelog
102
+*   Wed Sep 19 2018 Keerthana K <keerthanak@vmware.com> 5.8-1
103
+-   Update to version 5.8
102 104
 *   Tue Jul 31 2018 Ajay Kaher <akaher@vmware.com> 5.7.3-9
103 105
 -   Excluded perllocal.pod for aarch64
104 106
 *   Mon Apr 16 2018 Xiaolin Li <xiaolinl@vmware.com> 5.7.3-8
105 107
deleted file mode 100644
... ...
@@ -1,16 +0,0 @@
1
-diff -Naur a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh
2
-+++ b/scripts/find-debuginfo.sh	2016-08-26 17:51:50.000000000 -0700
3
-@@ -217,8 +217,10 @@
4
-     eval linked=\$linked_$inum
5
-     if [ -n "$linked" ]; then
6
-       eval id=\$linkedid_$inum
7
--      make_id_dup_link "$id" "$dn/$(basename $f)"
8
--      make_id_dup_link "$id" "/usr/lib/debug$dn/$bn" .debug
9
-+      if [ -n "$id" ]; then
10
-+        make_id_dup_link "$id" "$dn/$(basename $f)"
11
-+        make_id_dup_link "$id" "/usr/lib/debug$dn/$bn" .debug
12
-+      fi
13
-       link=$debugfn
14
-       get_debugfn "$linked"
15
-       echo "hard linked $link to $debugfn"
16 1
deleted file mode 100644
... ...
@@ -1,96 +0,0 @@
1
-From 404ef011c300207cdb1e531670384564aae04bdc Mon Sep 17 00:00:00 2001
2
-From: Panu Matilainen <pmatilai@redhat.com>
3
-Date: Tue, 19 Sep 2017 14:46:36 +0300
4
-Subject: [PATCH] Don't follow symlinks on file creation (CVE-2017-7501)
5
-
6
-Open newly created files with O_EXCL to prevent symlink tricks.
7
-When reopening hardlinks for writing the actual content, use append
8
-mode instead. This is compatible with the write-only permissions but
9
-is not destructive in case we got redirected to somebody elses file,
10
-verify the target before actually writing anything.
11
-
12
-As these are files with the temporary suffix, errors mean a local
13
-user with sufficient privileges to break the installation of the package
14
-anyway is trying to goof us on purpose, don't bother trying to mend it
15
-(we couldn't fix the hardlink case anyhow) but just bail out.
16
-
17
-Based on a patch by Florian Festi.
18
- lib/fsm.c | 29 +++++++++++++++++++++++------
19
- 1 file changed, 23 insertions(+), 6 deletions(-)
20
-
21
-diff --git a/lib/fsm.c b/lib/fsm.c
22
-index 553774b30..e0e9d03a1 100644
23
-+++ b/lib/fsm.c
24
-@@ -206,11 +206,22 @@ static int fsmSetFCaps(const char *path, const char *captxt)
25
-     return rc;
26
- }
27
- 
28
-+/* Check dest is the same, empty and regular file with writeonly permissions */
29
-+static int linkSane(FD_t wfd, const char *dest)
30
-+{
31
-+    struct stat sb, lsb;
32
-+
33
-+    return (fstat(Fileno(wfd), &sb) == 0 && sb.st_size == 0 &&
34
-+	    (sb.st_mode & ~S_IFMT) == S_IWUSR &&
35
-+	    lstat(dest, &lsb) == 0 && S_ISREG(lsb.st_mode) &&
36
-+	    sb.st_dev == lsb.st_dev && sb.st_ino == lsb.st_ino);
37
-+}
38
-+
39
- /** \ingroup payload
40
-  * Create file from payload stream.
41
-  * @return		0 on success
42
-  */
43
--static int expandRegular(rpmfi fi, const char *dest, rpmpsm psm, int nodigest, int nocontent)
44
-+static int expandRegular(rpmfi fi, const char *dest, rpmpsm psm, int exclusive, int nodigest, int nocontent)
45
- {
46
-     FD_t wfd = NULL;
47
-     int rc = 0;
48
-@@ -218,8 +229,14 @@ static int expandRegular(rpmfi fi, const char *dest, rpmpsm psm, int nodigest, i
49
-     /* Create the file with 0200 permissions (write by owner). */
50
-     {
51
- 	mode_t old_umask = umask(0577);
52
--	wfd = Fopen(dest, "w.ufdio");
53
-+	wfd = Fopen(dest, exclusive ? "wx.ufdio" : "a.ufdio");
54
- 	umask(old_umask);
55
-+
56
-+	/* If reopening, make sure the file is what we expect */
57
-+	if (!exclusive && wfd != NULL && !linkSane(wfd, dest)) {
58
-+	    rc = RPMERR_OPEN_FAILED;
59
-+	    goto exit;
60
-+	}
61
-     }
62
-     if (Ferror(wfd)) {
63
- 	rc = RPMERR_OPEN_FAILED;
64
-@@ -248,7 +265,7 @@ static int fsmMkfile(rpmfi fi, const char *dest, rpmfiles files,
65
- 	/* Create first hardlinked file empty */
66
- 	if (*firsthardlink < 0) {
67
- 	    *firsthardlink = rpmfiFX(fi);
68
--	    rc = expandRegular(fi, dest, psm, nodigest, 1);
69
-+	    rc = expandRegular(fi, dest, psm, 1, nodigest, 1);
70
- 	} else {
71
- 	    /* Create hard links for others */
72
- 	    char *fn = rpmfilesFN(files, *firsthardlink);
73
-@@ -263,10 +280,10 @@ static int fsmMkfile(rpmfi fi, const char *dest, rpmfiles files,
74
-        existing) file with content */
75
-     if (numHardlinks<=1) {
76
- 	if (!rc)
77
--	    rc = expandRegular(fi, dest, psm, nodigest, 0);
78
-+	    rc = expandRegular(fi, dest, psm, 1, nodigest, 0);
79
-     } else if (rpmfiArchiveHasContent(fi)) {
80
- 	if (!rc)
81
--	    rc = expandRegular(fi, dest, psm, nodigest, 0);
82
-+	    rc = expandRegular(fi, dest, psm, 0, nodigest, 0);
83
- 	*firsthardlink = -1;
84
-     } else {
85
- 	*setmeta = 0;
86
-@@ -939,7 +956,7 @@ int rpmPackageFilesInstall(rpmts ts, rpmte te, rpmfiles files,
87
- 	    /* we skip the hard linked file containing the content */
88
- 	    /* write the content to the first used instead */
89
- 	    char *fn = rpmfilesFN(files, firsthardlink);
90
--	    rc = expandRegular(fi, fn, psm, nodigest, 0);
91
-+	    rc = expandRegular(fi, fn, psm, 0, nodigest, 0);
92
- 	    firsthardlink = -1;
93
- 	    free(fn);
94
- 	}
... ...
@@ -3,21 +3,19 @@
3 3
 
4 4
 Summary:        Package manager
5 5
 Name:           rpm
6
-Version:        4.13.0.1
7
-Release:        7%{?dist}
6
+Version:        4.14.2
7
+Release:        1%{?dist}
8 8
 License:        GPLv2+
9 9
 URL:            http://rpm.org
10 10
 Group:          Applications/System
11 11
 Vendor:         VMware, Inc.
12 12
 Distribution:   Photon
13 13
 Source0:        https://github.com/rpm-software-management/rpm/archive/%{name}-%{version}-release.tar.gz
14
-%define sha1    rpm=2119489397d7e4da19320ef9330ab717ac05587d
14
+%define sha1    rpm=8cd4fb1df88c3c73ac506f8ac92be8c39fa610eb
15 15
 Source1:        macros
16 16
 Source2:        brp-strip-debug-symbols
17 17
 Source3:        brp-strip-unneeded
18
-Patch0:         find-debuginfo-do-not-generate-non-existing-build-id.patch
19
-Patch1:         find-debuginfo-do-not-generate-dir-entries.patch
20
-Patch2:         rpm-CVE-2017-7501.patch
18
+Patch0:         find-debuginfo-do-not-generate-dir-entries.patch
21 19
 Requires:       bash
22 20
 Requires:       libdb
23 21
 Requires:       rpm-libs = %{version}-%{release}
... ...
@@ -88,14 +86,9 @@ Python3 rpm.
88 88
 %prep
89 89
 %setup -n rpm-%{name}-%{version}-release
90 90
 %patch0 -p1
91
-%patch1 -p1
92
-%patch2 -p1
93 91
 
94 92
 %build
95 93
 sed -i '/define _GNU_SOURCE/a #include "../config.h"' tools/sepdebugcrcfix.c
96
-# pass -L opts to gcc as well to prioritize it over standard libs
97
-sed -i 's/-Wl,-L//g' python/setup.py.in
98
-sed -i 's/extra_link_args/library_dirs/g' python/setup.py.in
99 94
 
100 95
 ./autogen.sh --noconfigure
101 96
 ./configure \
... ...
@@ -154,7 +147,7 @@ rm -rf %{buildroot}
154 154
 
155 155
 %files
156 156
 %defattr(-,root,root)
157
-/bin/rpm
157
+%{_bindir}/rpm
158 158
 %{_bindir}/gendiff
159 159
 %{_bindir}/rpm2archive
160 160
 %{_bindir}/rpm2cpio
... ...
@@ -173,11 +166,15 @@ rm -rf %{buildroot}
173 173
 %{_libdir}/rpm/tgpg
174 174
 %{_libdir}/rpm/platform
175 175
 %{_libdir}/rpm-plugins/*
176
+%{_libdir}/rpm/python-macro-helper
177
+%{_libdir}/rpm/pythondistdeps.py
176 178
 %{_mandir}/man8/rpm.8.gz
177 179
 %{_mandir}/man8/rpm2cpio.8.gz
178 180
 %{_mandir}/man8/rpmdb.8.gz
179 181
 %{_mandir}/man8/rpmgraph.8.gz
180 182
 %{_mandir}/man8/rpmkeys.8.gz
183
+%{_mandir}/man8/rpm-misc.8.gz
184
+%{_mandir}/man8/rpm-plugin-systemd-inhibit.8.gz
181 185
 %exclude %{_mandir}/fr/man8/*.gz
182 186
 %exclude %{_mandir}/ja/man8/*.gz
183 187
 %exclude %{_mandir}/ko/man8/*.gz
... ...
@@ -260,6 +257,8 @@ rm -rf %{buildroot}
260 260
 %{python3_sitelib}/*
261 261
 
262 262
 %changelog
263
+*   Fri Sep 14 2018 Keerthana K <keerthanak@vmware.com> 4.14.2-1
264
+-   Update to version 4.14.2
263 265
 *   Thu Dec 21 2017 Xiaolin Li <xiaolinl@vmware.com> 4.13.0.1-7
264 266
 -   Fix CVE-2017-7501
265 267
 *   Wed Oct 04 2017 Alexey Makhalov <amakhalov@vmware.com> 4.13.0.1-6
... ...
@@ -1,6 +1,6 @@
1 1
 Summary:	Archiving program
2 2
 Name:		tar
3
-Version:	1.29
3
+Version:	1.30
4 4
 Release:	1%{?dist}
5 5
 License:	GPLv3+
6 6
 URL:		http://www.gnu.org/software/tar
... ...
@@ -8,7 +8,7 @@ Group:		Applications/System
8 8
 Vendor:		VMware, Inc.
9 9
 Distribution: 	Photon
10 10
 Source0:	tar/%{name}-%{version}.tar.xz
11
-%define sha1 tar=03851c34c90f0656177f2dd375cd61bd1204c51d
11
+%define sha1 tar=0d442c4565f8131745a5dff1cd08f7eaa797f679
12 12
 %description
13 13
 Contains GNU archiving program
14 14
 %prep
... ...
@@ -35,6 +35,8 @@ make  %{?_smp_mflags} check
35 35
 %{_defaultdocdir}/%{name}-%{version}/*
36 36
 %{_mandir}/*/*
37 37
 %changelog
38
+*       Fri Sep 14 2018 Keerthana K <keerthanak@vmware.com> 1.30-1
39
+-       Update to version 1.30
38 40
 *       Tue Apr 11 2017 Vinay Kulkarni <kulkarniv@vmware.com> 1.29-1
39 41
 -       Update to version 1.29.
40 42
 *       Mon Oct 10 2016 ChangLee <changlee@vmware.com> 1.28-3