View | Details | Raw Unified | Return to bug 186982
Collapse All | Expand All

(-)./Makefile (-66 / +59 lines)
Lines 2-102 Link Here
2
# $FreeBSD: head/net/xorp/Makefile 341435 2014-01-27 17:35:26Z bapt $
2
# $FreeBSD: head/net/xorp/Makefile 341435 2014-01-27 17:35:26Z bapt $
3
3
4
PORTNAME=	xorp
4
PORTNAME=	xorp
5
PORTVERSION=	1.6
5
PORTVERSION=	1.8.5
6
PORTREVISION=	1
6
PORTREVISION=	0
7
CATEGORIES=	net
7
CATEGORIES=	net
8
MASTER_SITES=	http://www.xorp.org/releases/${PORTVERSION}/	\
8
MASTER_SITES=	http://www.xorp.org/releases/${PORTVERSION}/
9
		http://www2.xorp.org/releases/${PORTVERSION}/	\
9
DISTNAME=	${PORTNAME}-${PORTVERSION}-src
10
		http://www5.xorp.org/releases/${PORTVERSION}/	\
11
		http://www3.xorp.org/releases/${PORTVERSION}/
12
10
13
MAINTAINER=	ports@FreeBSD.org
11
MAINTAINER=	ports@FreeBSD.org
14
COMMENT=	The eXtensible Open Router Platform
12
COMMENT=	The eXtensible Open Router Platform
15
13
16
LICENSE=	GPLv2
14
LICENSE=	GPLv2
17
15
18
OPTIONS_DEFINE=	ADVMCAST IPV6 SNMP OPTIMIZED_CFLAGS TEST DEBUG PROFILE
16
BUILD_DEPENDS=	python:${PORTSDIR}/lang/python
19
OPTIONS_DEFAULT=	ADVMCAST IPV6 SNMP OPTIMIZED_CFLAGS TEST PROFILE
17
# Uses libcurses, libcrypto, librt from base system.
18
LIB_DEPENDS=	libboost_regex.so:${PORTSDIR}/devel/boost-libs \
19
		libpcap.so:${PORTSDIR}/net/libpcap
20
20
21
ADVMCAST_DESC=	Build with Advanced Multicast API
21
CONFLICTS_INSTALL=	xorp-devel-*
22
22
23
BROKEN=		Does not build
24
DEPRECATED=	Broken for more than 6 month
25
EXPIRATION_DATE=	2014-02-27
26
27
USE_GMAKE=	yes
28
USE_OPENSSL=	yes
29
30
GNU_CONFIGURE=	yes
31
CONFIGURE_ARGS=		--prefix=${PREFIX}/${PORTNAME}			\
32
			--with-comment='FreeBSD port: ${PKGNAME}'	\
33
			--with-openssl=${OPENSSLBASE}
34
35
CXXFLAGS+=	-Wno-uninitialized
36
NOMAN=		defined
23
NOMAN=		defined
37
24
38
XORP_GROUP=	xorp
25
USE_BZIP2=	yes
39
USE_RC_SUBR=	xorp
26
USE_PYTHON_BUILD=	2
27
USE_SCONS=	yes
28
MAKE_JOBS_SAFE=	defined
29
30
WRKSRC=		${WRKDIR}/xorp
31
OPTIONS=								\
32
	    OPTIMIZE	 "Build with optimization" On			\
33
	    ORIGIN	 "Use ORIGIN with shared libraries" On		\
34
	    SHARED	 "Build with shared libraries" On		\
35
	    STRIP	 "Strip binaries before installing" On		\
36
	    TCP_RPC	 "Use TCP as RPC transport (defaults to AF_LOCAL)" Off
40
37
41
NO_STAGE=	yes
38
.include <bsd.port.pre.mk>
42
.include <bsd.port.options.mk>
43
39
44
.if ${PORT_OPTIONS:MADVMCAST}
40
.if ${OSVERSION} < 700000
45
CONFIGURE_ARGS+=	--enable-advanced-mcast-api
41
IGNORE=		unsupported on FreeBSD versions prior to 7.0
46
.endif
42
.endif
47
43
48
.if ${PORT_OPTIONS:MIPV6}
44
USE_RC_SUBR=	xorp.sh
49
CONFIGURE_ARGS+=	--enable-ipv6
45
XORP_SAMPLECONF=	rtrmgr/config/multicast4.boot
50
.else
46
SUB_FILES=	pkg-message
51
CONFIGURE_ARGS+=	--disable-ipv6
52
.endif
53
47
54
.if ${PORT_OPTIONS:MSNMP}
48
SCONS_ARGS+=	prefix=${PREFIX} enable_boost=1
55
BUILD_DEPENDS+=		${LOCALBASE}/sbin/snmpd:${PORTSDIR}/net-mgmt/net-snmp
49
56
CONFIGURE_ARGS+=	--with-snmp					 \
50
.if defined(WITHOUT_OPTIMIZE)
57
	--with-path-to-snmpd=${LOCALBASE}/sbin				 \
51
SCONS_ARGS+=	optimize=no
58
	--with-path-to-net-snmpd-config=${LOCALBASE}/bin/net-snmp-config \
59
	--enable-shared
60
PLIST_SUB+=		XORP_SNMP=""
61
USE_LDCONFIG=		${PREFIX}/mibs
62
.else
52
.else
63
PLIST_SUB+=		XORP_SNMP="@comment "
53
SCONS_ARGS+=	optimize=highest
64
.endif
54
.endif
65
55
66
.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS}
56
.if defined(WITHOUT_SHARED)
67
CONFIGURE_ARGS+=	--enable-optimize --disable-debug
57
SCONS_ARGS+=	shared=false
58
PLIST_SUB+=	XORP_SHLIB="@comment "
59
.else
60
SCONS_ARGS+=	shared=true
61
PLIST_SUB+=	XORP_SHLIB=""
62
USE_LDCONFIG=	${PREFIX}/lib/xorp/lib
63
. if defined (WITHOUT_ORIGIN)
64
SCONS_ARGS+=	origin=false
65
. else
66
SCONS_ARGS+=	origin=true
67
. endif
68
.endif
68
.endif
69
69
70
.if ${PORT_OPTIONS:MTEST}
70
.if defined(WITHOUT_STRIP)
71
BUILD_DEPENDS+=	${LOCALBASE}/bin/python:${PORTSDIR}/lang/python \
71
SCONS_ARGS+=	strip=false
72
		${LOCALBASE}/bin/bash:${PORTSDIR}/shells/bash
72
.else
73
SCONS_ARGS+=	strip=true
73
.endif
74
.endif
74
75
75
.if ${PORT_OPTIONS:MDEBUG}
76
.if defined(WITH_TCP_RPC)
76
CONFIGURE_ARGS+=	--enable-debug-msgs --enable-debug-fnames
77
SCONS_ARGS+=	transport=tcp
78
.else
79
SCONS_ARGS+=	transport=local
77
.endif
80
.endif
78
81
79
.if ${PORT_OPTIONS:MPROFILE}
82
# XXX is this still true?
80
CONFIGURE_ARGS+=	--enable-profile
83
.if ${ARCH} == "sparc64"
84
BROKEN=		Does not compile on sparc64
81
.endif
85
.endif
82
86
83
NOT_FOR_ARCH=	sparc64
87
post-stage:
84
88
	${CP} -p ${WRKSRC}/${XORP_SAMPLECONF} ${STAGEDIR}${PREFIX}/etc/xorp.conf.sample
85
.include <bsd.port.pre.mk>
86
87
pre-everything::
88
.if !defined(PREFIX) || ${PREFIX} == "/usr/local"
89
	@${ECHO_MSG} "XORP does not currently follow the hier(7) filesystem layout."
90
	@${ECHO_MSG} "It will therefore install all its directories relative to ${PREFIX}."
91
	@${ECHO_MSG} "If you do not want this, hit ^C now and set PREFIX in the"
92
	@${ECHO_MSG} "build environment to something other than ${PREFIX}."
93
	@${ECHO_MSG}
94
	@${ECHO_MSG} "If you plan to build with SNMP support, please ensure that"
95
	@${ECHO_MSG} "the net-mgmt/net-snmp port is already installed under ${LOCALBASE}"
96
	@${ECHO_MSG} "before doing this."
97
.endif
98
89
90
.ifmake install
99
post-install:
91
post-install:
100
	${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
92
	${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
93
.endif
101
94
102
.include <bsd.port.post.mk>
95
.include <bsd.port.post.mk>
(-)./distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (xorp-1.6.tar.gz) = d3faff56f5e58cf43fa300e14d6b5702ea9e75147f3d2d2aae44da8bda3f8f82
1
SHA256 (xorp-1.8.5-src.tar.bz2) = 4aa414e248f0ef3903a4ae8fd1862d8dd713a69f6bbc926d81dd693a88ef8e72
2
SIZE (xorp-1.6.tar.gz) = 7895108
2
SIZE (xorp-1.8.5-src.tar.bz2) = 3104442
(-)./files/patch-SConstruct (+27 lines)
Line 0 Link Here
1
--- SConstruct.orig	2011-03-22 22:08:58.000000000 +0100
2
+++ SConstruct	2011-03-25 11:14:54.359000184 +0100
3
@@ -160,22 +160,13 @@
4
 
5
 # XXX TODO: Make initial CPPPATH/LIBPATH derive from
6
 # autodetected host system *or* command line.
7
-#env = Environment(
8
-#		  TOOLS = ['default', 'autotest', 'clntgen', 'tgtgen',
9
-#		           'TOOL_SUBST'],
10
-#		  ENV = os.environ,
11
-#		  BUILDDIR = builddir,
12
-#		  CPPPATH=['/usr/local/include', '$BUILDDIR'],
13
-#		  LIBPATH=['usr/lib', '/usr/local/lib'],
14
-#		  variables = vars)
15
-
16
 env = Environment(
17
 		  TOOLS = ['default', 'autotest', 'clntgen', 'tgtgen',
18
 		           'TOOL_SUBST'],
19
 		  ENV = os.environ,
20
 		  BUILDDIR = builddir,
21
-		  CPPPATH=['$BUILDDIR'],
22
-		  LIBPATH=['usr/lib'],
23
+		  CPPPATH=['/usr/local/include', '$BUILDDIR'],
24
+		  LIBPATH=['usr/lib', '/usr/local/lib'],
25
 		  variables = vars)
26
 
27
 prefix = env['prefix']
(-)./files/patch-bgp__bgp_trie.cc (+11 lines)
Line 0 Link Here
1
--- bgp/bgp_trie.cc.orig	2010-07-19 23:10:33.000000000 +0200
2
+++ bgp/bgp_trie.cc	2014-02-07 17:24:59.000000000 +0100
3
@@ -115,7 +115,7 @@
4
 		   net.str().c_str(),
5
 		   found->attributes()->str().c_str());
6
 	XLOG_INFO("Pathmap dump follows: \n");
7
-	for (pmi == _pathmap.begin(); pmi != _pathmap.end(); pmi++) {
8
+	for (pmi = _pathmap.begin(); pmi != _pathmap.end(); pmi++) {
9
 	    XLOG_INFO("%s\n\n", pmi->second->str().c_str());
10
 	}
11
 	XLOG_FATAL("Exiting\n");
(-)./files/patch-bgp__harness__coord.hh (+12 lines)
Line 0 Link Here
1
--- bgp/harness/coord.hh.orig	2010-07-19 23:10:33.000000000 +0200
2
+++ bgp/harness/coord.hh	2014-02-07 17:56:28.000000000 +0100
3
@@ -42,7 +42,9 @@
4
 
5
 private:
6
     bool _done;
7
+public:
8
     EventLoop& _eventloop;
9
+private:
10
     Command& _command;
11
 };
12
 
(-)./files/patch-bgp__path_attribute.cc (+16 lines)
Line 0 Link Here
1
--- bgp/path_attribute.cc.orig	2011-03-16 22:15:59.000000000 +0100
2
+++ bgp/path_attribute.cc	2014-02-07 17:44:17.000000000 +0100
3
@@ -830,8 +830,11 @@
4
 ClusterListAttribute::clone() const
5
 {
6
     ClusterListAttribute *ca = new ClusterListAttribute();
7
-    list<IPv4>::const_reverse_iterator i = cluster_list().rbegin();
8
-    for(; i != cluster_list().rend(); i++)
9
+    // list<IPv4>::const_reverse_iterator i = cluster_list().rbegin();
10
+    list<IPv4>::const_iterator i = cluster_list().end();
11
+    if (! cluster_list().empty())
12
+    // for(; i != cluster_list().rend(); i++)
13
+    for(; i-- != cluster_list().begin(); )
14
 	ca->prepend_cluster_id(*i);
15
     return ca;
16
 }
(-)./files/patch-cli__cli_client.cc (+29 lines)
Line 0 Link Here
1
--- cli/cli_client.cc.orig	2011-03-22 22:08:58.000000000 +0100
2
+++ cli/cli_client.cc	2014-02-04 20:15:39.000000000 +0100
3
@@ -832,7 +832,7 @@
4
     //
5
     // Print help
6
     //
7
-    if ((val == 'h')) {
8
+    if (val == 'h') {
9
 	if (! is_help_mode()) {
10
 	    set_help_mode(true);
11
 	    _is_page_buffer_mode = &_is_help_buffer_mode;
12
@@ -958,7 +958,7 @@
13
     // Display the output all at once instead of oen screen at a time.
14
     // (Same as specifying the "| no-more" command.)
15
     //
16
-    if ((val == 'N')) {
17
+    if (val == 'N') {
18
 	while (page_buffer_last_line_n() < page_buffer_lines_n()) {
19
 	    set_page_buffer_mode(false);
20
 	    cli_print(page_buffer_line(page_buffer_last_line_n()));
21
@@ -1021,7 +1021,7 @@
22
     //
23
     // Redraw the output of the screen
24
     //
25
-    if ((val == CHAR_TO_CTRL('l'))) {
26
+    if (val == CHAR_TO_CTRL('l')) {
27
     redisplay_screen_label:
28
 	size_t i, start_window_line = 0;
29
 	set_page_buffer_mode(false);
(-)./files/patch-cli__xrl_cli_node.hh (+21 lines)
Line 0 Link Here
1
--- cli/xrl_cli_node.hh.orig	2011-03-16 22:27:45.000000000 +0100
2
+++ cli/xrl_cli_node.hh	2014-02-04 23:37:29.000000000 +0100
3
@@ -224,6 +224,9 @@
4
 				     const string *cli_term_name,
5
 				     const uint32_t *cli_session_id,
6
 				     const string *command_output);
7
+
8
+    EventLoop&		_eventloop;
9
+
10
 private:
11
     /**
12
      * Called when Finder connection is established.
13
@@ -241,7 +244,7 @@
14
 
15
     CliNode&	cli_node() const { return (_cli_node); }
16
 
17
-    EventLoop&		_eventloop;
18
+    // EventLoop&		_eventloop;
19
     CliNode&		_cli_node;
20
 
21
     XrlCliProcessorV0p1Client _xrl_cli_processor_client;
(-)./files/patch-contrib__olsr__face.hh (+14 lines)
Line 0 Link Here
1
--- contrib/olsr/face.hh.orig	2010-07-19 23:10:33.000000000 +0200
2
+++ contrib/olsr/face.hh	2014-02-07 15:40:51.000000000 +0100
3
@@ -291,8 +291,10 @@
4
      */
5
     void originate_hello();
6
 
7
-  private:
8
     Olsr&		_olsr;
9
+
10
+  private:
11
+    // Olsr&		_olsr;
12
     FaceManager&	_fm;
13
     Neighborhood*	_nh;
14
     MessageDecoder&	_md;
(-)./files/patch-contrib__olsr__face_manager.cc (+16 lines)
Line 0 Link Here
1
--- contrib/olsr/face_manager.cc.orig	2011-07-25 19:55:36.000000000 +0200
2
+++ contrib/olsr/face_manager.cc	2014-02-07 16:00:05.000000000 +0100
3
@@ -239,8 +239,11 @@
4
 
5
 	// Walk the list of message handler functions in reverse,
6
 	// looking for one which is willing to consume this message.
7
-	vector<MessageReceiveCB>::reverse_iterator jj;
8
-	for (jj = _handlers.rbegin(); jj != _handlers.rend(); jj++) {
9
+	// vector<MessageReceiveCB>::reverse_iterator jj;
10
+	vector<MessageReceiveCB>::iterator jj;
11
+	if (! _handlers.empty())
12
+	// for (jj = _handlers.rbegin(); jj != _handlers.rend(); jj++) {
13
+	for (jj = _handlers.end(); jj-- != _handlers.begin(); ) {
14
 	    try {
15
 		is_consumed = (*jj)->dispatch(msg, src, face->local_addr());
16
 		if (is_consumed)
(-)./files/patch-contrib__olsr__message.hh (+13 lines)
Line 0 Link Here
1
--- contrib/olsr/message.hh.orig	2012-01-11 18:46:45.000000000 +0100
2
+++ contrib/olsr/message.hh	2014-02-07 16:29:50.000000000 +0100
3
@@ -668,8 +668,8 @@
4
 	return (str += '\n');
5
     }
6
 
7
-private:
8
-    size_t	_opaque_data_offset;
9
+// private:
10
+//    size_t	_opaque_data_offset;
11
 };
12
 
13
 /**
(-)./files/patch-contrib__olsr__policy_varrw.cc (+11 lines)
Line 0 Link Here
1
--- contrib/olsr/policy_varrw.cc.orig	2010-07-19 23:10:33.000000000 +0200
2
+++ contrib/olsr/policy_varrw.cc	2014-02-07 16:57:40.000000000 +0100
3
@@ -39,7 +39,7 @@
4
 #include "policy_varrw.hh"
5
 
6
 OlsrVarRW::OlsrVarRW(IPv4Net& network, IPv4& nexthop, uint32_t& metric,
7
-		     IPv4& originator, IPv4& main_addr, uint32_t vtype,
8
+		     IPv4& originator, IPv4& main_addr, uint32_t& vtype,
9
 		     PolicyTags& policytags)
10
     : _network(network), _nexthop(nexthop), _metric(metric),
11
       _originator(originator), _main_addr(main_addr), _vtype(vtype),
(-)./files/patch-contrib__olsr__policy_varrw.hh (+11 lines)
Line 0 Link Here
1
--- contrib/olsr/policy_varrw.hh.orig	2010-07-19 23:10:33.000000000 +0200
2
+++ contrib/olsr/policy_varrw.hh	2014-02-07 16:59:38.000000000 +0100
3
@@ -45,7 +45,7 @@
4
     };
5
 
6
     OlsrVarRW(IPv4Net& network, IPv4& nexthop, uint32_t& metric,
7
-	      IPv4& originator, IPv4& main_addr, uint32_t vtype,
8
+	      IPv4& originator, IPv4& main_addr, uint32_t& vtype,
9
 	      PolicyTags& policytags);
10
 
11
     // SingleVarRW inteface:
(-)./files/patch-contrib__olsr__tools__print_databases.cc (+170 lines)
Line 0 Link Here
1
--- contrib/olsr/tools/print_databases.cc.orig	2011-03-16 22:16:01.000000000 +0100
2
+++ contrib/olsr/tools/print_databases.cc	2014-02-07 15:15:48.000000000 +0100
3
@@ -161,7 +161,8 @@
4
 };
5
 
6
 void
7
-GetExternals::get(int argc, char *argv[])
8
+// GetExternals::get(int argc, char *argv[])
9
+GetExternals::get(int, char *[])
10
 {
11
     XrlOlsr4V0p1Client cl(&this->_xr);
12
 
13
@@ -172,8 +173,8 @@
14
     if (! success)
15
 	XLOG_WARNING("Failed to get external route list.");
16
 
17
-    UNUSED(argc);
18
-    UNUSED(argv);
19
+    // UNUSED(argc);
20
+    // UNUSED(argv);
21
 }
22
 
23
 void
24
@@ -309,7 +310,8 @@
25
 };
26
 
27
 void
28
-GetInterfaces::get(int argc, char *argv[])
29
+// GetInterfaces::get(int argc, char *argv[])
30
+GetInterfaces::get(int, char *[])
31
 {
32
     XrlOlsr4V0p1Client cl(&this->_xr);
33
 
34
@@ -320,8 +322,8 @@
35
     if (! success)
36
 	XLOG_WARNING("Failed to get interface list.");
37
 
38
-    UNUSED(argc);
39
-    UNUSED(argv);
40
+    // UNUSED(argc);
41
+    // UNUSED(argv);
42
 }
43
 
44
 void
45
@@ -476,7 +478,8 @@
46
 };
47
 
48
 void
49
-GetLinks::get(int argc, char *argv[])
50
+// GetLinks::get(int argc, char *argv[])
51
+GetLinks::get(int, char *[])
52
 {
53
     XrlOlsr4V0p1Client cl(&this->_xr);
54
 
55
@@ -487,8 +490,8 @@
56
     if (! success)
57
 	XLOG_WARNING("Failed to get link list.");
58
 
59
-    UNUSED(argc);
60
-    UNUSED(argv);
61
+    // UNUSED(argc);
62
+    // UNUSED(argv);
63
 }
64
 
65
 void
66
@@ -649,7 +652,8 @@
67
 };
68
 
69
 void
70
-GetMids::get(int argc, char *argv[])
71
+// GetMids::get(int argc, char *argv[])
72
+GetMids::get(int, char *[])
73
 {
74
     XrlOlsr4V0p1Client cl(&this->_xr);
75
 
76
@@ -660,8 +664,8 @@
77
     if (! success)
78
 	XLOG_WARNING("Failed to get MID list.");
79
 
80
-    UNUSED(argc);
81
-    UNUSED(argv);
82
+    // UNUSED(argc);
83
+    // UNUSED(argv);
84
 }
85
 
86
 void
87
@@ -803,7 +807,8 @@
88
 };
89
 
90
 void
91
-GetNeighbors::get(int argc, char *argv[])
92
+// GetNeighbors::get(int argc, char *argv[])
93
+GetNeighbors::get(int, char *[])
94
 {
95
     XrlOlsr4V0p1Client cl(&this->_xr);
96
 
97
@@ -814,8 +819,8 @@
98
     if (! success)
99
 	XLOG_WARNING("Failed to get neighbor list.");
100
 
101
-    UNUSED(argc);
102
-    UNUSED(argv);
103
+    // UNUSED(argc);
104
+    // UNUSED(argv);
105
 }
106
 
107
 void
108
@@ -979,7 +984,8 @@
109
 };
110
 
111
 void
112
-GetTopology::get(int argc, char *argv[])
113
+// GetTopology::get(int argc, char *argv[])
114
+GetTopology::get(int, char *[])
115
 {
116
     XrlOlsr4V0p1Client cl(&this->_xr);
117
 
118
@@ -990,8 +996,8 @@
119
     if (! success)
120
 	XLOG_WARNING("Failed to get topology list.");
121
 
122
-    UNUSED(argc);
123
-    UNUSED(argv);
124
+    // UNUSED(argc);
125
+    // UNUSED(argv);
126
 }
127
 
128
 void
129
@@ -1126,7 +1132,8 @@
130
 };
131
 
132
 void
133
-GetTwohopLinks::get(int argc, char *argv[])
134
+// GetTwohopLinks::get(int argc, char *argv[])
135
+GetTwohopLinks::get(int, char *[])
136
 {
137
     XrlOlsr4V0p1Client cl(&this->_xr);
138
 
139
@@ -1137,8 +1144,8 @@
140
     if (! success)
141
 	XLOG_WARNING("Failed to get neighbor list.");
142
 
143
-    UNUSED(argc);
144
-    UNUSED(argv);
145
+    // UNUSED(argc);
146
+    // UNUSED(argv);
147
 }
148
 
149
 void
150
@@ -1271,7 +1278,8 @@
151
 };
152
 
153
 void
154
-GetTwohopNeighbors::get(int argc, char *argv[])
155
+// GetTwohopNeighbors::get(int argc, char *argv[])
156
+GetTwohopNeighbors::get(int, char *[])
157
 {
158
     XrlOlsr4V0p1Client cl(&this->_xr);
159
 
160
@@ -1283,8 +1291,8 @@
161
     if (! success)
162
 	XLOG_WARNING("Failed to get two-hop neighbor list.");
163
 
164
-    UNUSED(argc);
165
-    UNUSED(argv);
166
+    // UNUSED(argc);
167
+    // UNUSED(argv);
168
 }
169
 
170
 void
(-)./files/patch-contrib__olsr__twohop.hh (+14 lines)
Line 0 Link Here
1
--- contrib/olsr/twohop.hh.orig	2011-03-16 22:27:46.000000000 +0100
2
+++ contrib/olsr/twohop.hh	2014-02-07 17:09:13.000000000 +0100
3
@@ -140,8 +140,10 @@
4
 	return _twohop_links;
5
     }
6
 
7
-  private:
8
     EventLoop&		    _ev;
9
+
10
+  private:
11
+    // EventLoop&		    _ev;
12
     Neighborhood*	    _parent;
13
 
14
     /**
(-)./files/patch-fea__data_plane__control_socket__routing_socket.cc (+14 lines)
Line 0 Link Here
1
--- fea/data_plane/control_socket/routing_socket.cc.orig	2011-03-16 22:27:46.000000000 +0100
2
+++ fea/data_plane/control_socket/routing_socket.cc	2014-02-05 14:11:37.000000000 +0100
3
@@ -240,9 +240,10 @@
4
 // Observe routing sockets activity
5
 //
6
 
7
-struct RoutingSocketPlumber {
8
+class RoutingSocketPlumber {
9
     typedef RoutingSocket::ObserverList ObserverList;
10
 
11
+public:
12
     static void
13
     plumb(RoutingSocket& r, RoutingSocketObserver* o)
14
     {
(-)./files/patch-fea__data_plane__control_socket__routing_socket.hh (+11 lines)
Line 0 Link Here
1
--- fea/data_plane/control_socket/routing_socket.hh.orig	2011-03-16 22:27:46.000000000 +0100
2
+++ fea/data_plane/control_socket/routing_socket.hh	2014-02-05 13:20:10.000000000 +0100
3
@@ -31,7 +31,7 @@
4
 
5
 
6
 class RoutingSocketObserver;
7
-struct RoutingSocketPlumber;
8
+// struct RoutingSocketPlumber;
9
 
10
 /**
11
  * RoutingSocket class opens a routing socket and forwards data arriving
(-)./files/patch-fea__data_plane__control_socket__windows_rtm_pipe.cc (+14 lines)
Line 0 Link Here
1
--- fea/data_plane/control_socket/windows_rtm_pipe.cc.orig	2011-03-16 22:16:01.000000000 +0100
2
+++ fea/data_plane/control_socket/windows_rtm_pipe.cc	2014-02-05 14:59:02.000000000 +0100
3
@@ -288,9 +288,10 @@
4
 // Observe routing sockets activity
5
 //
6
 
7
-struct WinRtmPipePlumber {
8
+class WinRtmPipePlumber {
9
     typedef WinRtmPipe::ObserverList ObserverList;
10
 
11
+public:
12
     static void
13
     plumb(WinRtmPipe& r, WinRtmPipeObserver* o)
14
     {
(-)./files/patch-fea__data_plane__control_socket__windows_rtm_pipe.hh (+11 lines)
Line 0 Link Here
1
--- fea/data_plane/control_socket/windows_rtm_pipe.hh.orig	2011-03-16 22:16:01.000000000 +0100
2
+++ fea/data_plane/control_socket/windows_rtm_pipe.hh	2014-02-05 13:38:25.000000000 +0100
3
@@ -29,7 +29,7 @@
4
 #include "libxorp/exceptions.hh"
5
 
6
 class WinRtmPipeObserver;
7
-struct WinRtmPipePlumber;
8
+// struct WinRtmPipePlumber;
9
 
10
 /**
11
  * WinRtmPipe class opens a routing socket and forwards data arriving
(-)./files/patch-fea__data_plane__fibconfig__fibconfig_table_observer_rtmv2.hh (+21 lines)
Line 0 Link Here
1
--- fea/data_plane/fibconfig/fibconfig_table_observer_rtmv2.hh.orig	2011-03-16 22:16:02.000000000 +0100
2
+++ fea/data_plane/fibconfig/fibconfig_table_observer_rtmv2.hh	2014-02-05 13:46:16.000000000 +0100
3
@@ -73,15 +73,15 @@
4
 private:
5
     class RtmV2Observer : public WinRtmPipeObserver {
6
     public:
7
-    	RtmV2Observer(WinRtmPipe& rs, int af,
8
+    	RtmV2Observer(WinRtmPipe& rs, /* int af, */
9
 		      FibConfigTableObserverRtmV2& rtmo)
10
-	    : WinRtmPipeObserver(rs), _af(af), _rtmo(rtmo) {}
11
+	    : WinRtmPipeObserver(rs), /* _af(af), */ _rtmo(rtmo) {}
12
     	virtual ~RtmV2Observer() {}
13
 	void routing_socket_data(const vector<uint8_t>& buffer) {
14
 	    _rtmo.receive_data(buffer);
15
 	}
16
     private:
17
-	int _af;
18
+	// int _af;
19
     	FibConfigTableObserverRtmV2& _rtmo;
20
     };
21
 
(-)./files/patch-fea__data_plane__managers__fea_data_plane_manager_linux.cc (+15 lines)
Line 0 Link Here
1
--- fea/data_plane/managers/fea_data_plane_manager_linux.cc.orig	2011-03-16 22:27:48.000000000 +0100
2
+++ fea/data_plane/managers/fea_data_plane_manager_linux.cc	2014-02-05 15:21:50.000000000 +0100
3
@@ -71,8 +71,10 @@
4
 
5
 
6
 FeaDataPlaneManagerLinux::FeaDataPlaneManagerLinux(FeaNode& fea_node)
7
-    : FeaDataPlaneManager(fea_node, "Linux"),
8
-      _ifconfig_get_ioctl(NULL)
9
+    : FeaDataPlaneManager(fea_node, "Linux")
10
+#if defined(HAVE_PROC_LINUX) && defined(HAVE_IOCTL_SIOCGIFCONF) and !defined(HAVE_NETLINK_SOCKETS)
11
+      , _ifconfig_get_ioctl(NULL)
12
+#endif
13
 {
14
 }
15
 
(-)./files/patch-fea__data_plane__managers__fea_data_plane_manager_linux.hh (+14 lines)
Line 0 Link Here
1
--- fea/data_plane/managers/fea_data_plane_manager_linux.hh.orig	2011-03-16 22:27:48.000000000 +0100
2
+++ fea/data_plane/managers/fea_data_plane_manager_linux.hh	2014-02-05 15:06:24.000000000 +0100
3
@@ -118,10 +118,10 @@
4
      * @return the @ref IfConfigGetIoctl plugin.
5
      */
6
     IfConfigGetIoctl* ifconfig_get_ioctl() { return (_ifconfig_get_ioctl); }
7
-#endif
8
 
9
 private:
10
     IfConfigGetIoctl*	_ifconfig_get_ioctl;
11
+#endif
12
 };
13
 
14
 #endif // __FEA_DATA_PLANE_MANAGERS_FEA_DATA_PLANE_MANAGER_LINUX_HH__
(-)./files/patch-fea__fibconfig.hh (+18 lines)
Line 0 Link Here
1
--- fea/fibconfig.hh.orig	2012-01-11 18:46:45.000000000 +0100
2
+++ fea/fibconfig.hh	2014-02-05 15:49:04.000000000 +0100
3
@@ -736,12 +736,14 @@
4
      */
5
     Trie6& trie6() { return _trie6; }
6
 
7
+    FeaNode&				_fea_node;
8
+
9
 protected:
10
     Trie4	_trie4;		// IPv4 trie (used for testing purpose)
11
     Trie6	_trie6;		// IPv6 trie (used for testing purpose)
12
     
13
 private:
14
-    FeaNode&				_fea_node;
15
+    // FeaNode&				_fea_node;
16
     EventLoop&				_eventloop;
17
 #ifndef XORP_DISABLE_PROFILE
18
     Profile&				_profile;
(-)./files/patch-fea__firewall_manager.hh (+20 lines)
Line 0 Link Here
1
--- fea/firewall_manager.hh.orig	2011-03-16 22:27:49.000000000 +0100
2
+++ fea/firewall_manager.hh	2014-02-05 17:18:17.000000000 +0100
3
@@ -313,6 +313,8 @@
4
      */
5
     void delete_browse_state(uint32_t token);
6
 
7
+    FeaNode&				_fea_node;
8
+
9
 private:
10
     /**
11
      * Update the firewall entries by pushing them into the underlying system.
12
@@ -364,7 +366,7 @@
13
      */
14
     void generate_token();
15
 
16
-    FeaNode&				_fea_node;
17
+    // FeaNode&				_fea_node;
18
     EventLoop&				_eventloop;
19
     const IfTree&			_iftree;
20
 
(-)./files/patch-fea__ifconfig.hh (+20 lines)
Line 0 Link Here
1
--- fea/ifconfig.hh.orig	2011-03-16 22:27:49.000000000 +0100
2
+++ fea/ifconfig.hh	2014-02-05 16:07:56.000000000 +0100
3
@@ -442,6 +442,8 @@
4
      */
5
     void report_updates(IfTree& iftree);
6
 
7
+    FeaNode&			_fea_node;
8
+
9
 private:
10
     /**
11
      * Restore the interface configuration.
12
@@ -455,7 +457,7 @@
13
 		       const IfTree& old_system_config,
14
 		       string& error_msg);
15
 
16
-    FeaNode&			_fea_node;
17
+    // FeaNode&			_fea_node;
18
     EventLoop&			_eventloop;
19
     NexthopPortMapper&		_nexthop_port_mapper;
20
     IfConfigTransactionManager* _itm;	// The interface transaction manager
(-)./files/patch-fea__mfea_mrouter.hh (+11 lines)
Line 0 Link Here
1
--- fea/mfea_mrouter.hh.orig	2011-03-16 22:27:49.000000000 +0100
2
+++ fea/mfea_mrouter.hh	2014-02-05 16:57:00.000000000 +0100
3
@@ -437,6 +437,8 @@
4
     // Original state from the underlying system before the MFEA was started
5
     //
6
     bool	_multicast_forwarding_enabled;
7
+
8
+public:
9
     const FibConfig& _fibconfig;
10
 };
11
 
(-)./files/patch-fea__tools__show_interfaces.hh (+20 lines)
Line 0 Link Here
1
--- fea/tools/show_interfaces.hh.orig	2010-07-19 23:10:33.000000000 +0200
2
+++ fea/tools/show_interfaces.hh	2014-02-05 15:34:37.000000000 +0100
3
@@ -79,6 +79,8 @@
4
      */
5
     void print_interfaces(const string& print_iface_name) const;
6
 
7
+    EventLoop&		_eventloop;
8
+
9
 protected:
10
     //
11
     // IfMgrHintObserver methods
12
@@ -132,7 +134,7 @@
13
      */
14
     int ifmgr_shutdown();
15
 
16
-    EventLoop&		_eventloop;
17
+    // EventLoop&		_eventloop;
18
 
19
     IfMgrXrlMirror	_ifmgr;
20
 
(-)./files/patch-fea__xrl_mfea_node.hh (+20 lines)
Line 0 Link Here
1
--- fea/xrl_mfea_node.hh.orig	2011-03-16 22:27:49.000000000 +0100
2
+++ fea/xrl_mfea_node.hh	2014-02-06 20:13:08.000000000 +0100
3
@@ -504,6 +504,8 @@
4
 	// Input values,
5
 	const bool&	enable);
6
 
7
+    EventLoop&			_eventloop;
8
+
9
 private:
10
     /**
11
      * Called when Finder connection is established.
12
@@ -570,7 +572,7 @@
13
     
14
     int family() const { return (MfeaNode::family()); }
15
 
16
-    EventLoop&			_eventloop;
17
+    // EventLoop&			_eventloop;
18
     const string		_finder_target;
19
 
20
     XrlMfeaClientV0p1Client	_xrl_mfea_client_client;
(-)./files/patch-libproto__packet.cc (+11 lines)
Line 0 Link Here
1
--- libproto/packet.cc.orig	2011-03-22 22:08:59.000000000 +0100
2
+++ libproto/packet.cc	2014-02-04 20:02:26.000000000 +0100
3
@@ -233,7 +233,7 @@
4
 }
5
 
6
 ArpHeader::ArpHeader() {
7
-    memset(this, 0, sizeof(this));
8
+    memset(this, 0, sizeof(*this));
9
     ah_hw_len = 6;
10
     ah_proto_len = 4;
11
 }
(-)./files/patch-libxipc__xrl_pf_stcp.cc (+29 lines)
Line 0 Link Here
1
--- libxipc/xrl_pf_stcp.cc.orig	2011-03-22 22:08:59.000000000 +0100
2
+++ libxipc/xrl_pf_stcp.cc	2014-02-04 19:11:08.000000000 +0100
3
@@ -548,7 +548,7 @@
4
 		 bool		  batch,
5
 		 const Xrl&	  x,
6
 		 const Callback&  cb)
7
-	: _p(p), _sn(sn), _b(_buffer), _cb(cb), _keepalive(false)
8
+	: _p(p), _sn(sn), _b(_buffer), _cb(cb) //, _keepalive(false)
9
     {
10
 	size_t header_bytes = STCPPacketHeader::header_size();
11
 	size_t xrl_bytes = x.packed_bytes();
12
@@ -572,7 +572,7 @@
13
     }
14
 
15
     RequestState(XrlPFSTCPSender* p, uint32_t sn)
16
-	: _p(p), _sn(sn), _b(_buffer), _keepalive(true)
17
+	: _p(p), _sn(sn), _b(_buffer) //, _keepalive(true)
18
     {
19
 	size_t header_bytes = STCPPacketHeader::header_size();
20
 
21
@@ -621,7 +621,7 @@
22
     uint8_t		_buffer[256];	// XXX important performance parameter
23
     uint32_t		_size;
24
     Callback		_cb;
25
-    bool		_keepalive;
26
+    // bool		_keepalive;
27
 };
28
 
29
 
(-)./files/patch-libxorp-utility.h (-20 lines)
Lines 1-20 Link Here
1
--- libxorp/utility.h.orig	2012-10-01 17:45:19.000000000 +0800
2
+++ libxorp/utility.h	2012-10-01 17:47:34.000000000 +0800
3
@@ -31,7 +31,7 @@
4
  * Compile time assertion.
5
  */
6
 #ifndef static_assert
7
-#define static_assert(a) switch (a) case 0: case (a):
8
+#define static_assert(a) ((void)sizeof(int[(a) ? 1 : -1]))
9
 #endif /* static_assert */
10
 
11
 /*
12
@@ -42,7 +42,7 @@
13
 #ifdef UNUSED
14
 # undef UNUSED
15
 #endif /* UNUSED */
16
-#define UNUSED(var)	static_assert(sizeof(var) != 0)
17
+#define UNUSED(var)	((void)var)
18
 
19
 #ifdef __cplusplus
20
 #define cstring(s) (s).str().c_str()
(-)./files/patch-mibs-bgp4_mib_1657_bgp4pathattrtable.cc (-35 lines)
Lines 1-35 Link Here
1
--- mibs/bgp4_mib_1657_bgp4pathattrtable.cc.orig	2009-01-05 18:31:00.000000000 +0000
2
+++ mibs/bgp4_mib_1657_bgp4pathattrtable.cc	2011-12-27 03:17:03.000000000 +0000
3
@@ -139,7 +139,7 @@
4
 	    DEBUGMSGTL((BgpMib::the_instance().name(),
5
 		"updating local bgp4PathAttrTable...\n"));
6
 	    DEBUGMSGTL((BgpMib::the_instance().name(),
7
-		"local table size: %d\n", CONTAINER_SIZE(cb.container)));
8
+		"local table size: %zd\n", CONTAINER_SIZE(cb.container)));
9
 	    bgp_mib.send_get_v4_route_list_start("bgp", net, true, false,
10
 			     callback(get_v4_route_list_start_done));
11
 	    break;
12
@@ -156,12 +156,12 @@
13
 	    DEBUGMSGTL((BgpMib::the_instance().name(),
14
 		"removing old routes from bgp4PathAttrTable...\n"));
15
 	    DEBUGMSGTL((BgpMib::the_instance().name(),
16
-		"local table size: %d old_routes stack: %d\n", 
17
+		"local table size: %zd old_routes stack: %zd\n", 
18
 		CONTAINER_SIZE(cb.container), update.old_routes.size()));
19
 	    CONTAINER_FOR_EACH(cb.container, find_old_routes, NULL);
20
 	    while (update.old_routes.size()) {  
21
 		DEBUGMSGTL((BgpMib::the_instance().name(),
22
-		    "update.old_routes.size() = %d\n", 
23
+		    "update.old_routes.size() = %zd\n", 
24
 		    update.old_routes.size()));
25
 	        row = (bgp4PathAttrTable_context*) 
26
 		    CONTAINER_FIND(cb.container, &update.old_routes.top());	
27
@@ -745,7 +745,7 @@
28
 
29
     if (row->update_signature != (update.list_token)) {
30
         DEBUGMSGTL((BgpMib::the_instance().name(),
31
-	    "removing %#010x from table\n", row->bgp4PathAttrIpAddrPrefix));
32
+	    "removing %#010lx from table\n", row->bgp4PathAttrIpAddrPrefix));
33
 	update.old_routes.push(row->index); 
34
     }
35
 }
(-)./files/patch-mibs-bgp4_mib_1657_bgppeertable.cc (-11 lines)
Lines 1-11 Link Here
1
--- mibs/bgp4_mib_1657_bgppeertable.cc-orig	2011-12-27 00:37:40.000000000 +0000
2
+++ mibs/bgp4_mib_1657_bgppeertable.cc	2011-12-27 00:38:11.000000000 +0000
3
@@ -476,7 +476,7 @@
4
 
5
 void free_context(void * context, struct netsnmp_iterator_info_s * /* iinfo */)
6
 {
7
-    DEBUGMSGTL((BgpMib::the_instance().name(),"freeing context %x\n", context));
8
+    DEBUGMSGTL((BgpMib::the_instance().name(),"freeing context %p\n", context));
9
     if (NULL != context) free(context);
10
     context = NULL;
11
 }
(-)./files/patch-mibs-xorpevents.cc (-11 lines)
Lines 1-11 Link Here
1
--- mibs/xorpevents.cc-orig	2011-12-27 00:35:22.000000000 +0000
2
+++ mibs/xorpevents.cc	2011-12-27 00:36:01.000000000 +0000
3
@@ -55,7 +55,7 @@
4
 {
5
     SnmpEventLoop& e = SnmpEventLoop::the_instance();
6
     DEBUGMSGTL((e._log_name, "run all xorp timers\n"));
7
-    DEBUGMSGTL((e._log_name, "# of timers: %d\n", e.timer_list().size()));
8
+    DEBUGMSGTL((e._log_name, "# of timers: %zd\n", e.timer_list().size()));
9
     e.timer_list().run();
10
     SnmpEventLoop::AlarmMap::iterator p;
11
     for (p = e._pending_alarms.begin(); p != e._pending_alarms.end(); ++p) {
(-)./files/patch-pim__pim_mrt_task.cc (+42 lines)
Line 0 Link Here
1
--- pim/pim_mrt_task.cc.orig	2011-09-20 02:33:28.000000000 +0200
2
+++ pim/pim_mrt_task.cc	2014-02-06 18:34:33.000000000 +0100
3
@@ -166,7 +166,8 @@
4
     //
5
     list<PimMreTask *>::reverse_iterator iter;
6
     iter = pim_mre_task_list().rbegin();
7
-    if (iter != pim_mre_task_list().rend()) {
8
+//  if (iter != pim_mre_task_list().rend()) {
9
+    if (pim_mre_task_list().end() != pim_mre_task_list().begin()) {
10
 	pim_mre_task = *iter;
11
 	if (pim_mre_task->input_state()
12
 	    == PimMreTrackState::INPUT_STATE_IN_REMOVE_MISC) {
13
@@ -1159,7 +1160,8 @@
14
     //
15
     list<PimMreTask *>::reverse_iterator iter;
16
     iter = pim_mre_task_list().rbegin();
17
-    if (iter != pim_mre_task_list().rend()) {
18
+//  if (iter != pim_mre_task_list().rend()) {
19
+    if (pim_mre_task_list().end() != pim_mre_task_list().begin()) {
20
 	pim_mre_task = *iter;
21
 	if (pim_mre_task->input_state() == input_state) {
22
 	    pim_mre_task->add_pim_mre(pim_mre);
23
@@ -1224,7 +1226,8 @@
24
     //
25
     list<PimMreTask *>::reverse_iterator iter;
26
     iter = pim_mre_task_list().rbegin();
27
-    if (iter != pim_mre_task_list().rend()) {
28
+//  if (iter != pim_mre_task_list().rend()) {
29
+    if (pim_mre_task_list().end() != pim_mre_task_list().begin()) {
30
 	pim_mre_task = *iter;
31
 	if (pim_mre_task->input_state() == input_state) {
32
 	    pim_mre_task->add_pim_mre(pim_mre);		// XXX
33
@@ -1266,7 +1269,8 @@
34
     //
35
     list<PimMreTask *>::reverse_iterator iter;
36
     iter = pim_mre_task_list().rbegin();
37
-    if (iter != pim_mre_task_list().rend()) {
38
+//  if (iter != pim_mre_task_list().rend()) {
39
+    if (pim_mre_task_list().end() != pim_mre_task_list().begin()) {
40
 	pim_mre_task = *iter;
41
 	if (pim_mre_task->input_state()
42
 	    == PimMreTrackState::INPUT_STATE_IN_REMOVE_PIM_MFC) {
(-)./files/patch-policy__backend__iv_exec.cc (+15 lines)
Line 0 Link Here
1
--- policy/backend/iv_exec.cc.orig	2011-03-16 22:27:54.000000000 +0100
2
+++ policy/backend/iv_exec.cc	2014-02-05 18:44:26.000000000 +0100
3
@@ -275,7 +275,11 @@
4
 IvExec::visit(Store& s)
5
 {
6
     if (_stackptr < _stack)
7
-	xorp_throw(RuntimeError, "Stack empty on assign of " + s.var());
8
+	// xorp_throw(RuntimeError, "Stack empty on assign of " + s.var());
9
+	{ char *tmpstr;
10
+	  asprintf(&tmpstr, "Stack empty on assign of %d", s.var());
11
+	  xorp_throw(RuntimeError, tmpstr);
12
+	}
13
 
14
     const Element* arg = *_stackptr;
15
     _stackptr--;
(-)./files/patch-policy__backend__lex.yy_policy_backend_parser.cc (+11 lines)
Line 0 Link Here
1
--- policy/backend/lex.yy_policy_backend_parser.cc.orig	2010-07-19 23:10:33.000000000 +0200
2
+++ policy/backend/lex.yy_policy_backend_parser.cc	2014-02-05 19:09:23.000000000 +0100
3
@@ -617,6 +617,8 @@
4
 static int yy_flex_strlen (yyconst char * );
5
 #endif
6
 
7
+#define YY_NO_INPUT
8
+
9
 #ifndef YY_NO_INPUT
10
 
11
 #ifdef __cplusplus
(-)./files/patch-policy__backend__single_varrw.cc (+15 lines)
Line 0 Link Here
1
--- policy/backend/single_varrw.cc.orig	2010-07-19 23:10:33.000000000 +0200
2
+++ policy/backend/single_varrw.cc	2014-02-05 18:56:49.000000000 +0100
3
@@ -70,7 +70,11 @@
4
 
5
 	// out of luck...
6
 	if(!e)
7
-	    xorp_throw(SingleVarRWErr, "Unable to read variable " + id);
8
+	    // xorp_throw(SingleVarRWErr, "Unable to read variable " + id);
9
+	    { char *tmpstr;
10
+	      asprintf(&tmpstr, "Unable to read variable %d", id);
11
+	      xorp_throw(SingleVarRWErr, tmpstr);
12
+	    }
13
     }
14
 
15
     return *e;
(-)./files/patch-policy__configuration.cc (+13 lines)
Line 0 Link Here
1
--- policy/configuration.cc.orig	2011-03-16 22:27:54.000000000 +0100
2
+++ policy/configuration.cc	2014-02-06 20:00:41.000000000 +0100
3
@@ -766,7 +766,9 @@
4
     POLICY* p = find_policy(proto);
5
     XLOG_ASSERT(p);
6
 
7
-    for (POLICY::reverse_iterator i = p->rbegin(); i != p->rend(); ++i) {
8
+//    for (POLICY::reverse_iterator i = p->rbegin(); i != p->rend(); ++i) {
9
+    if (! p->empty())
10
+    for (POLICY::iterator i = p->end(); --i != p->begin(); ) {
11
 	PolicyList* pl = i->second;
12
 
13
 	pl->link_code(code);
(-)./files/patch-policy__configuration.hh (+22 lines)
Line 0 Link Here
1
--- policy/configuration.hh.orig	2011-03-16 22:27:54.000000000 +0100
2
+++ policy/configuration.hh	2014-02-12 11:14:04.000000000 +0100
3
@@ -43,11 +43,19 @@
4
 
5
 // XXX we go reverse in order to make peer specific policies override global
6
 // ones.  Global is "" so it's always smallest (first).
7
+/*
8
 #define FOR_ALL_POLICIES(n) \
9
     for (PROTOCOL::reverse_iterator i = _protocols.rbegin(); \
10
 	 i != _protocols.rend(); ++i) \
11
 	for (POLICY::reverse_iterator n = i->second->rbegin(); \
12
 	    n != i->second->rend(); ++n)
13
+*/
14
+#define FOR_ALL_POLICIES(n) \
15
+    if (! _protocols.empty()) \
16
+    for (PROTOCOL::iterator i = _protocols.end(); \
17
+	i-- != _protocols.begin(); ) \
18
+	for (POLICY::iterator n = i->second->end(); \
19
+	    (! i->second->empty()) & (n-- != i->second->begin()); )
20
 
21
 class IEMap {
22
 public:
(-)./files/patch-policy__lex.yy_policy_parser.cc (+10 lines)
Line 0 Link Here
1
--- policy/lex.yy_policy_parser.cc.orig	2010-07-19 23:10:33.000000000 +0200
2
+++ policy/lex.yy_policy_parser.cc	2014-02-06 20:17:42.000000000 +0100
3
@@ -2982,6 +2982,7 @@
4
 static int yy_flex_strlen (yyconst char * );
5
 #endif
6
 
7
+#define YY_NO_INPUT
8
 #ifndef YY_NO_INPUT
9
 
10
 #ifdef __cplusplus
(-)./files/patch-rib__vifmanager.hh (+23 lines)
Line 0 Link Here
1
--- rib/vifmanager.hh.orig	2010-07-19 23:10:33.000000000 +0200
2
+++ rib/vifmanager.hh	2014-02-06 21:03:13.000000000 +0100
3
@@ -110,6 +110,9 @@
4
      */
5
     int		final_stop();
6
 
7
+    XrlRouter&		_xrl_router;
8
+    EventLoop&		_eventloop;
9
+
10
 protected:
11
     //
12
     // IfMgrHintObserver methods
13
@@ -163,8 +166,8 @@
14
      */
15
     int ifmgr_shutdown();
16
 
17
-    XrlRouter&		_xrl_router;
18
-    EventLoop&		_eventloop;
19
+    // XrlRouter&		_xrl_router;
20
+    // EventLoop&		_eventloop;
21
     RibManager*		_rib_manager;
22
 
23
     IfMgrXrlMirror	_ifmgr;
(-)./files/patch-rip__packets.hh (+10 lines)
Line 0 Link Here
1
--- rip/packets.hh.orig	2011-03-16 22:16:12.000000000 +0100
2
+++ rip/packets.hh	2014-02-07 18:07:00.000000000 +0100
3
@@ -586,6 +586,7 @@
4
     const uint8_t* _key_id;	// Key number used
5
     const uint8_t* _auth_bytes;	// Auth data length at end of packet
6
     const uint8_t* _seqno;	// Monotonically increasing seqno
7
+public:
8
     const uint8_t* _mbz;	// Must-be-zero
9
 };
10
 
(-)./files/patch-rtrmgr__cli.cc (+20 lines)
Line 0 Link Here
1
--- rtrmgr/cli.cc.orig	2011-03-16 22:16:13.000000000 +0100
2
+++ rtrmgr/cli.cc	2014-02-07 13:47:22.000000000 +0100
3
@@ -741,7 +741,7 @@
4
     path = token_vector2line(command_global_name);
5
     XLOG_ASSERT(path.substr(0, 4) == "help");
6
     if (path.size() == 4) {
7
-	trimmed_path == "";
8
+	trimmed_path = "";
9
     } else {
10
 	XLOG_ASSERT(path.substr(0, 5) == "help ");
11
 	trimmed_path = path.substr(5, path.size() - 5);
12
@@ -1062,7 +1062,7 @@
13
     path = token_vector2line(command_global_name);
14
     XLOG_ASSERT(path.substr(0, 4) == "help");
15
     if (path.size() == 4) {
16
-	trimmed_path == "";
17
+	trimmed_path = "";
18
     } else {
19
 	XLOG_ASSERT(path.substr(0, 5) == "help ");
20
 	trimmed_path = path.substr(5, path.size() - 5);
(-)./files/patch-rtrmgr__lex.boot.cc (+27 lines)
Line 0 Link Here
1
--- rtrmgr/lex.boot.cc.orig	2010-07-19 23:10:33.000000000 +0200
2
+++ rtrmgr/lex.boot.cc	2014-02-06 21:19:35.000000000 +0100
3
@@ -9552,6 +9552,7 @@
4
 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
5
 #endif
6
 
7
+#define YY_NO_INPUT
8
 #ifndef YY_NO_INPUT
9
 #ifdef __cplusplus
10
 static int yyinput YY_PROTO(( void ));
11
@@ -10483,6 +10484,7 @@
12
 #endif	/* ifndef YY_NO_UNPUT */
13
 
14
 
15
+#ifndef YY_NO_INPUT
16
 #ifdef __cplusplus
17
 static int yyinput()
18
 #else
19
@@ -10554,7 +10556,7 @@
20
 
21
 	return c;
22
 	}
23
-
24
+#endif
25
 
26
 #ifdef YY_USE_PROTOS
27
 void yyrestart( FILE *input_file )
(-)./files/patch-rtrmgr__lex.opcmd.cc (+27 lines)
Line 0 Link Here
1
--- rtrmgr/lex.opcmd.cc.orig	2010-07-19 23:10:33.000000000 +0200
2
+++ rtrmgr/lex.opcmd.cc	2014-02-06 21:29:26.000000000 +0100
3
@@ -518,6 +518,7 @@
4
 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
5
 #endif
6
 
7
+#define YY_NO_INPUT
8
 #ifndef YY_NO_INPUT
9
 #ifdef __cplusplus
10
 static int yyinput YY_PROTO(( void ));
11
@@ -1322,6 +1323,7 @@
12
 #endif	/* ifndef YY_NO_UNPUT */
13
 
14
 
15
+#ifndef YY_NO_INPUT
16
 #ifdef __cplusplus
17
 static int yyinput()
18
 #else
19
@@ -1393,7 +1395,7 @@
20
 
21
 	return c;
22
 	}
23
-
24
+#endif
25
 
26
 #ifdef YY_USE_PROTOS
27
 void yyrestart( FILE *input_file )
(-)./files/patch-rtrmgr__lex.tplt.cc (+27 lines)
Line 0 Link Here
1
--- rtrmgr/lex.tplt.cc.orig	2010-07-19 23:10:33.000000000 +0200
2
+++ rtrmgr/lex.tplt.cc	2014-02-06 21:33:41.000000000 +0100
3
@@ -8667,6 +8667,7 @@
4
 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
5
 #endif
6
 
7
+#define YY_NO_INPUT
8
 #ifndef YY_NO_INPUT
9
 #ifdef __cplusplus
10
 static int yyinput YY_PROTO(( void ));
11
@@ -9708,6 +9709,7 @@
12
 #endif	/* ifndef YY_NO_UNPUT */
13
 
14
 
15
+#ifndef YY_NO_INPUT
16
 #ifdef __cplusplus
17
 static int yyinput()
18
 #else
19
@@ -9779,7 +9781,7 @@
20
 
21
 	return c;
22
 	}
23
-
24
+#endif
25
 
26
 #ifdef YY_USE_PROTOS
27
 void yyrestart( FILE *input_file )
(-)./files/patch-rtrmgr__module_command.hh (+10 lines)
Line 0 Link Here
1
--- rtrmgr/module_command.hh.orig	2010-07-19 23:10:33.000000000 +0200
2
+++ rtrmgr/module_command.hh	2014-02-06 22:38:09.000000000 +0100
3
@@ -87,6 +87,7 @@
4
     Action*		_status_method;
5
     Action*		_startup_method;
6
     Action*		_shutdown_method;
7
+public:
8
     bool		_execute_done;
9
     bool		_verbose;	// Set to true if output is verbose
10
 };
(-)./files/patch-rtrmgr__module_manager.hh (+12 lines)
Line 0 Link Here
1
--- rtrmgr/module_manager.hh.orig	2011-09-20 02:33:28.000000000 +0200
2
+++ rtrmgr/module_manager.hh	2014-02-06 22:48:01.000000000 +0100
3
@@ -144,7 +144,9 @@
4
     string	_expath;	// The expanded absolute path to the program
5
     bool	_do_exec;	// false indicates we're running in test mode,
6
 				// when we may not actually start any processes
7
+public:
8
     bool	_verbose;	// Set to true if output is verbose
9
+private:
10
     XorpTimer	_shutdown_timer; // A timer used during shutdown
11
     XorpCallback0<void>::RefPtr _terminate_cb; // The cb when module terminated
12
 };
(-)./files/patch-rtrmgr__op_commands.hh (+11 lines)
Line 0 Link Here
1
--- rtrmgr/op_commands.hh.orig	2011-03-16 22:27:56.000000000 +0100
2
+++ rtrmgr/op_commands.hh	2014-02-06 22:52:04.000000000 +0100
3
@@ -215,7 +215,7 @@
4
 
5
     // Below here is temporary storage for use in parsing
6
     list<string>	_path_segments;
7
-    OpCommand*		_current_command;
8
+    // OpCommand*		_current_command;
9
     const TemplateTree*	_template_tree;
10
     SlaveConfigTree*	_slave_config_tree;
11
     SlaveModuleManager& _mmgr;
(-)./files/patch-rtrmgr__template_commands.hh (+20 lines)
Line 0 Link Here
1
--- rtrmgr/template_commands.hh.orig	2011-03-16 22:16:14.000000000 +0100
2
+++ rtrmgr/template_commands.hh	2014-02-06 23:35:47.000000000 +0100
3
@@ -78,6 +78,8 @@
4
     string related_module() const;
5
     string affected_module() const;
6
 
7
+    const XRLdb*	_xrldb;
8
+
9
 private:
10
 #ifdef DEBUG_XRLDB
11
     bool check_xrl_is_valid(const list<string>& action,
12
@@ -92,7 +94,7 @@
13
     string		_request;
14
     list<string>	_split_response;
15
     string		_response;
16
-    const XRLdb*	_xrldb;
17
+    // const XRLdb*	_xrldb;
18
 };
19
 
20
 class ProgramAction : public Action {
(-)./files/patch-rtrmgr__template_tree_node.cc (+17 lines)
Line 0 Link Here
1
--- rtrmgr/template_tree_node.cc.orig	2011-03-16 22:16:14.000000000 +0100
2
+++ rtrmgr/template_tree_node.cc	2014-02-07 13:00:37.000000000 +0100
3
@@ -543,9 +543,12 @@
4
 {
5
     map<string,string> varmap;
6
     const TemplateTreeNode* ttn = this;
7
-    list<string>::const_reverse_iterator iter;
8
+    // list<string>::const_reverse_iterator iter;
9
+    list<string>::const_iterator iter;
10
 
11
-    for (iter = segments.rbegin(); iter != segments.rend(); ++iter) {
12
+//    for (iter = segments.rbegin(); iter != segments.rend(); ++iter) {
13
+    if (! segments.empty())
14
+    for (iter = segments.end(); iter-- != segments.begin(); ) {
15
 	if (ttn->name_is_variable())
16
 	    varmap[ttn->segname()] = *iter;
17
 	ttn = ttn->parent();
(-)./files/patch-rtrmgr__template_tree_node.hh (+19 lines)
Line 0 Link Here
1
--- rtrmgr/template_tree_node.hh.orig	2011-03-16 22:16:14.000000000 +0100
2
+++ rtrmgr/template_tree_node.hh	2014-02-07 13:04:29.000000000 +0100
3
@@ -189,13 +189,15 @@
4
     TemplateTreeNode*	_parent;
5
     list<TemplateTreeNode*> _children;
6
 
7
+    TemplateTree&	_template_tree;
8
+
9
 private:
10
     bool split_up_varname(const string& varname,
11
 			  list<string>& var_parts) const;
12
     TemplateTreeNode* find_parent_varname_node(const list<string>& var_parts);
13
     TemplateTreeNode* find_child_varname_node(const list<string>& var_parts);
14
 
15
-    TemplateTree&	_template_tree;
16
+    // TemplateTree&	_template_tree;
17
 
18
     string _module_name;
19
     string _default_target_name;
(-)./files/patch-rtrmgr__userdb.hh (+10 lines)
Line 0 Link Here
1
--- rtrmgr/userdb.hh.orig	2011-03-16 22:16:14.000000000 +0100
2
+++ rtrmgr/userdb.hh	2014-02-07 13:14:26.000000000 +0100
3
@@ -98,6 +98,7 @@
4
 
5
 private:
6
     map<uid_t, User*> _users;
7
+public:
8
     bool _verbose;	// Set to true if output is verbose
9
 };
10
 
(-)./files/patch-rtrmgr__xorpsh_main.cc (+20 lines)
Line 0 Link Here
1
--- rtrmgr/xorpsh_main.cc.orig	2012-01-11 18:46:45.000000000 +0100
2
+++ rtrmgr/xorpsh_main.cc	2014-02-07 13:35:51.000000000 +0100
3
@@ -146,7 +146,7 @@
4
       _verbose(verbose),
5
       _ipc_name(IPCname),
6
       _got_config(false),
7
-      _got_modules(false),
8
+      // _got_modules(false),
9
       _mode(MODE_INITIALIZING),
10
       _xorpsh_interface(&_xrl_router, *this)
11
 {
12
@@ -667,7 +667,7 @@
13
 	_router_cli->notify_user(response, /* urgent */ true);
14
 	// XXX it's not clear we can continue if this happens
15
     }
16
-    response == "";
17
+    // response == "";
18
     if (!_ct->apply_deletions(user_id, deletions,
19
 			      /* this is not a provisional change */ false,
20
 			      response)) {
(-)./files/patch-rtrmgr__xorpsh_main.hh (+11 lines)
Line 0 Link Here
1
--- rtrmgr/xorpsh_main.hh.orig	2011-03-16 22:16:14.000000000 +0100
2
+++ rtrmgr/xorpsh_main.hh	2014-02-07 13:34:19.000000000 +0100
3
@@ -151,7 +151,7 @@
4
     string		_authfile;
5
     string		_authtoken;
6
     bool		_got_config;
7
-    bool		_got_modules;
8
+    // bool		_got_modules;
9
     string		_configuration;
10
 
11
     bool		_xrl_generic_done;	// XRL startup/shutdown flag
(-)./files/patch-site_scons__config__allconfig.py (+26 lines)
Line 0 Link Here
1
--- site_scons/config/allconfig.py.orig	2012-01-11 18:46:46.000000000 +0100
2
+++ site_scons/config/allconfig.py	2014-02-10 19:25:36.000000000 +0100
3
@@ -21,6 +21,7 @@
4
 import os
5
 import string
6
 from SCons.Script.SConscript import SConsEnvironment
7
+import fnmatch;
8
 
9
 # TODO SCons support for headerfilename needs to be fixed at source--
10
 # that would let us use confdefs.h for the include file header
11
@@ -226,10 +227,12 @@
12
     if has_af_inet and has_sock_raw:
13
         conf.Define('HAVE_IP_RAW_SOCKETS')
14
         # TODO:  This needs to be properly detected.
15
-        # TODO:  This used to check for bsd and linux in an error prone
16
-        #        way.  Now, do negative checks, but this could break Solaris
17
+        # <http://www.xorp.org/bugzilla/show_bug.cgi?id=106#c1>:
18
+        # TODO:  This used to check for openbsd and linux in an error prone
19
+        #        way.  Now, do negative checks, but this could break Solaris and other OS
20
         #        (or not..no idea if it supports raw or not).
21
-	if not (env.has_key('mingw') and env['mingw']):
22
+        if not ((env.has_key('mingw') and env['mingw']) or
23
+                   fnmatch.fnmatch(host_os, 'freebsd*')):
24
             conf.Define('IPV4_RAW_OUTPUT_IS_RAW')
25
             conf.Define('IPV4_RAW_INPUT_IS_RAW')
26
     
(-)./files/patch-vrrp__vrrp.cc (+29 lines)
Line 0 Link Here
1
--- vrrp/vrrp.cc.orig	2011-03-16 22:27:57.000000000 +0100
2
+++ vrrp/vrrp.cc	2014-02-07 18:20:15.000000000 +0100
3
@@ -36,7 +36,7 @@
4
 
5
 template <class T>
6
 void
7
-out_of_range(const string& msg, const T& x)
8
+out_of_range_(const string& msg, const T& x)
9
 {
10
     ostringstream oss;
11
 
12
@@ -64,7 +64,7 @@
13
       //, _arpd(_vif)
14
 {
15
     if (_vrid < 1 || _vrid > 255)
16
-	out_of_range("VRID out of range", _vrid);
17
+	out_of_range_("VRID out of range", _vrid);
18
 
19
     char tmp[sizeof "ff:ff:ff:ff:ff:ff"];
20
 
21
@@ -94,7 +94,7 @@
22
 Vrrp::set_priority(uint32_t priority)
23
 {
24
     if (priority == PRIORITY_LEAVE || priority >= PRIORITY_OWN)
25
-	out_of_range("priority out of range", priority);
26
+	out_of_range_("priority out of range", priority);
27
 
28
     _priority = priority;
29
 
(-)./files/patch-xrl__scripts__Xif__parse.py (+14 lines)
Line 0 Link Here
1
--- xrl/scripts/Xif/parse.py.orig	2011-03-22 22:08:59.000000000 +0100
2
+++ xrl/scripts/Xif/parse.py	2014-02-04 19:22:04.000000000 +0100
3
@@ -71,8 +71,10 @@
4
         pop_file()
5
         pop_file()
6
         push_file(file, line)
7
+    elif (flag == "3") | (flag == "4"):
8
+	print "Pre-processor #line flag (%s)" % flag
9
     else:
10
-        print "Invalid pre-processor #line flag (%d)\n", flag
11
+        print "Invalid pre-processor #line flag (%s)" % flag
12
         sys.exit(1)
13
     return 1
14
 
(-)./files/pkg-message.in (+14 lines)
Line 0 Link Here
1
Add the following lines to /etc/rc.conf to enable xorp:
2
3
defaultrouter="NO"
4
xorp_enable="YES"
5
6
A configuration file must be created at
7
8
%%PREFIX%%/etc/xorp.conf
9
10
before use.
11
12
Users who will be changing the xorp configuration via
13
%%PREFIX%%/sbin/xorpsh
14
must be members of the group xorp.
(-)./files/xorp.in (-104 lines)
Lines 1-104 Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD: head/net/xorp/files/xorp.in 340872 2014-01-24 00:14:07Z mat $
4
#
5
# A sample XORP startup script.
6
#
7
8
# PROVIDE: xorp
9
# REQUIRE: netif routing mountcritlocal
10
# BEFORE:  NETWORKING
11
12
# Add the following lines to /etc/rc.conf to enable xorp:
13
#
14
# xorp_enable="YES"
15
# xorp_flags="<set as needed>"
16
# xorp_config_boot="%%PREFIX%%/etc/xorp.conf.sample"
17
18
. /etc/rc.subr
19
20
name="xorp"
21
rcvar=xorp_enable
22
23
load_rc_config $name
24
25
: ${xorp_enable="NO"}
26
: ${xorp_config_boot="%%PREFIX%%/etc/xorp.conf"}
27
: ${xorp_rtrmgr_pidfile="/var/run/xorp_rtrmgr.pid"}
28
: ${xorp_rtrmgr_logfile="/var/log/xorp_rtrmgr.log"}
29
: ${xorp_rtrmgr_poll_enable=true}
30
: ${xorp_rtrmgr_poll_timeout=90}
31
: ${xorp_hardkill_enable=false}
32
33
required_files=${xorp_config_boot}
34
command=%%PREFIX%%/bin/xorp_rtrmgr
35
command_args="-b ${xorp_config_boot}"
36
pidfile=${xorp_rtrmgr_pidfile}
37
sig_stop=INT
38
39
start_precmd="xorp_prestart"
40
start_cmd="xorp_start"
41
stop_postcmd="xorp_poststop"
42
43
xorp_prestart()
44
{
45
	touch ${xorp_rtrmgr_logfile}
46
	return 0
47
}
48
49
xorp_start() 
50
{
51
	pidfile=${xorp_rtrmgr_pidfile}
52
53
	echo -n 'Starting XORP router processes:'
54
55
	echo -n ' xorp_rtrmgr'
56
	if ! daemon </dev/null >>${xorp_rtrmgr_logfile} 2>&1 -c -p ${pidfile} \
57
	     ${command} ${command_args} ; then
58
		warn 'could not bring up xorp_rtrmgr.'
59
		return 1
60
	fi
61
62
	${xorp_rtrmgr_poll_enable} || return 0
63
64
	# If startup polling is enabled, then poll xorp_rtrmgr every
65
	# second to see if it died, or if it logged successful bringup.
66
	# XXX This may be racy on very fast machines, but without
67
	# daemonizing support from xorp_rtrmgr it's difficult not to race.
68
69
	pid=$(cat ${xorp_rtrmgr_pidfile})
70
	timeout=${xorp_rtrmgr_poll_timeout}
71
	tick=0
72
	fail=true
73
74
	until [ $tick = $timeout ];
75
	do
76
		sleep 1 ; kill -0 ${pid} || break
77
		if ( tail -5 ${xorp_rtrmgr_logfile} | \
78
		    grep 'No more tasks to run' > /dev/null 2>&1 ) ; then
79
			fail=false
80
			break
81
		fi
82
		tick=$((tick + 1))
83
	done
84
85
	if $fail ; then
86
		warn 'xorp_rtrmgr failed to start'
87
		return 1
88
	fi
89
90
	echo '.'
91
	return 0
92
}
93
94
xorp_poststop()
95
{
96
	rm -f ${xorp_rtrmgr_pidfile} >/dev/null 2>&1 || true
97
98
	${xorp_hardkill_enable} || return 0
99
	killall -9 -m xorp_\* || true
100
101
	return 0
102
}
103
104
run_rc_command "$1"
(-)./files/xorp.sh.in (+76 lines)
Line 0 Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD$
4
#
5
# A sample XORP startup script.
6
#
7
8
# PROVIDE: xorp
9
# REQUIRE: netif routing mountcritlocal ldconfig
10
# BEFORE:  NETWORKING
11
# KEYWORD: shutdown
12
13
# Add the following line to /etc/rc.conf to enable xorp:
14
#
15
# xorp_enable="YES"
16
#
17
# Note: You have to create a config file before you can start xorp!
18
#       Set ${xorp_conf} to its location, the default is defined below.
19
#
20
# Besides the xorp_* variables which you'll find below with their
21
# default values, you can also define the following in rc.conf:
22
#
23
# xorp_rtprio=n
24
#
25
# This will run the xorp processes with realtime priority n, see rtprio(1).
26
27
. /etc/rc.subr
28
29
name=xorp
30
rcvar=xorp_enable
31
32
load_rc_config $name
33
34
: ${xorp_enable:=NO}
35
: ${xorp_conf=%%PREFIX%%/etc/xorp.conf}
36
: ${xorp_rtrmgr_pidfile=/var/run/xorp_rtrmgr.pid}
37
: ${xorp_rtrmgr_logfile=/var/log/xorp_rtrmgr.log}
38
: ${xorp_flags=-l ${xorp_rtrmgr_logfile}}
39
: ${xorp_hardkill_enable:=NO}
40
41
required_files=${xorp_conf}
42
43
command=%%PREFIX%%/sbin/xorp_rtrmgr
44
pidfile=${xorp_rtrmgr_pidfile}
45
logfile=${xorp_rtrmgr_logfile}
46
command_args="-d -c ${xorp_conf} -P ${pidfile}"
47
sig_stop=INT
48
49
start_precmd=xorp_prestart
50
stop_postcmd=xorp_poststop
51
52
xorp_prestart()
53
{
54
	[ -z ${logfile} ] || [ -f ${logfile} ] || touch ${logfile}
55
56
	# required for rtprio(1) until handled like nice(1) by rc.subr(8)
57
	if [ -n "$xorp_rtprio" ] && [ "$xorp_rtprio" -ge 0 ]
58
	then
59
		rc_flags="$xorp_rtprio $command $xorp_flags"
60
		command=/usr/sbin/rtprio
61
	fi
62
63
	return 0
64
}
65
66
xorp_poststop()
67
{
68
	rm -f ${pidfile} >/dev/null 2>&1 || true
69
70
	checkyesno xorp_hardkill_enable || return 0
71
	killall -9 -m xorp_\* || true
72
73
	return 0
74
}
75
76
run_rc_command "$1"
(-)./pkg-deinstall (-8 / +4 lines)
Lines 5-22 Link Here
5
5
6
PATH=/bin:/usr/sbin
6
PATH=/bin:/usr/sbin
7
7
8
if [ -z "${XORP_GROUP}" ]; then
9
	XORP_GROUP=xorp
10
fi
11
12
case $2 in
8
case $2 in
13
	POST-DEINSTALL)
9
	POST-DEINSTALL)
14
		if pw group show ${XORP_GROUP} 2>/dev/null 
10
		if pw group show xorp 2>/dev/null 
15
		then
11
		then
16
			echo "Deleting group ${XORP_GROUP}..."
12
			echo "Deleting group xorp..."
17
			pw groupdel -n ${XORP_GROUP} 2>/dev/null
13
			pw groupdel -n xorp 2>/dev/null
18
		else
14
		else
19
			echo "Group ${XORP_GROUP} not found!"
15
			echo "Group xorp not found!"
20
		fi
16
		fi
21
	;;
17
	;;
22
esac
18
esac
(-)./pkg-install (-23 / +5 lines)
Lines 5-35 Link Here
5
5
6
PATH=/bin:/usr/bin:/usr/sbin
6
PATH=/bin:/usr/bin:/usr/sbin
7
7
8
if [ -z "${XORP_GROUP}" ]; then
9
	XORP_GROUP=xorp
10
fi
11
12
case $2 in
8
case $2 in
13
        POST-INSTALL)
9
        POST-INSTALL)
14
		if [ ! -f ${PREFIX}/etc/xorp.conf.sample ]; then \
10
		if pw group show xorp 2>/dev/null; then
15
			cp ${WRKSRC}/rtrmgr/config.boot.sample ${PREFIX}/etc/xorp.conf.sample; \
11
			echo "You already have a group xorp, so I will use it.";
16
		fi
12
		else
17
		if pw group show "${XORP_GROUP}" 2>/dev/null; then \
13
			echo "Adding group xorp.";
18
			echo "You already have a group \"${XORP_GROUP}\", so I will use it."; \
14
			pw groupadd -n xorp 2>/dev/null;
19
		else \
20
			echo "Adding group \"${XORP_GROUP}\"."; \
21
			pw groupadd -n ${XORP_GROUP} 2>/dev/null; \
22
		fi
15
		fi
23
		echo ""
24
		echo "Add the following lines to /etc/rc.conf to enable xorp:"
25
		echo ""
26
		echo "defaultrouter=\"NO\""
27
		echo "xorp_enable=\"YES\""
28
		echo ""
29
		echo "A configuration file must be created at ${PREFIX}/etc/xorp.conf before use."
30
		echo ""
31
		echo "Users who will be changing the xorp configuration via xorpsh"
32
		echo "must be members of the group xorp."
33
		echo ""
34
	;;
16
	;;
35
esac
17
esac
(-)./pkg-plist (-156 / +200 lines)
Lines 1-156 Link Here
1
bin/call_xrl
1
etc/xorp.conf.sample
2
bin/xorp_profiler
2
lib/xorp/bin/bgp_print_peers
3
bin/xorp_rtrmgr
3
lib/xorp/bin/bgp_print_routes
4
bin/xorpsh
4
lib/xorp/bin/cli_generic
5
bgp/xorp_bgp
5
lib/xorp/bin/cli_send_processor_xrl
6
bgp/tools/xorpsh_print_peers
6
lib/xorp/bin/fea_show_interfaces
7
bgp/tools/xorpsh_print_routes
7
lib/xorp/bin/olsr_print_databases
8
cli/tools/send_cli_processor_xrl
8
lib/xorp/bin/olsr_clear_database
9
cli/tools/cli_generic
9
lib/xorp/bin/ospf_clear_database
10
contrib/olsr/tools/clear_database
10
lib/xorp/bin/ospf_print_lsas
11
contrib/olsr/tools/print_databases
11
lib/xorp/bin/ospf_print_neighbours
12
contrib/olsr/xorp_olsr4
12
lib/xorp/bin/rib_show_distances
13
etc/templates/bgp.cmds
13
lib/xorp/bin/rib_show_routes
14
etc/templates/bgp.tp
14
lib/xorp/bin/rip_show_peer_stats
15
etc/templates/fea.cmds
15
lib/xorp/bin/rip_show_stats
16
etc/templates/fea.tp
16
%%XORP_SHLIB%%lib/xorp/lib/libxif_bgp.so
17
etc/templates/fib2mrib.tp
17
%%XORP_SHLIB%%lib/xorp/lib/libxif_cli_manager.so
18
etc/templates/firewall.tp
18
%%XORP_SHLIB%%lib/xorp/lib/libxif_cli_processor.so
19
etc/templates/host.cmds
19
%%XORP_SHLIB%%lib/xorp/lib/libxif_common.so
20
etc/templates/igmp.cmds
20
%%XORP_SHLIB%%lib/xorp/lib/libxif_coord.so
21
etc/templates/igmp.tp
21
%%XORP_SHLIB%%lib/xorp/lib/libxif_datain.so
22
etc/templates/interfaces.tp
22
%%XORP_SHLIB%%lib/xorp/lib/libxif_fea_fib.so
23
etc/templates/mfea.cmds
23
%%XORP_SHLIB%%lib/xorp/lib/libxif_fea_fib_client.so
24
etc/templates/mfea4.tp
24
%%XORP_SHLIB%%lib/xorp/lib/libxif_fea_firewall.so
25
etc/templates/mfea6.cmds
25
%%XORP_SHLIB%%lib/xorp/lib/libxif_fea_ifmgr.so
26
etc/templates/mfea6.tp
26
%%XORP_SHLIB%%lib/xorp/lib/libxif_fea_ifmgr_mirror.so
27
etc/templates/misc.cmds
27
%%XORP_SHLIB%%lib/xorp/lib/libxif_fea_ifmgr_replicator.so
28
etc/templates/mld.cmds
28
%%XORP_SHLIB%%lib/xorp/lib/libxif_fea_rawlink.so
29
etc/templates/mld.tp
29
%%XORP_SHLIB%%lib/xorp/lib/libxif_fea_rawlink_client.so
30
etc/templates/olsr4.cmds
30
%%XORP_SHLIB%%lib/xorp/lib/libxif_fea_rawpkt4.so
31
etc/templates/olsr4.tp
31
%%XORP_SHLIB%%lib/xorp/lib/libxif_fea_rawpkt4_client.so
32
etc/templates/ospfv2.cmds
32
%%XORP_SHLIB%%lib/xorp/lib/libxif_fea_rawpkt6.so
33
etc/templates/ospfv2.tp
33
%%XORP_SHLIB%%lib/xorp/lib/libxif_fea_rawpkt6_client.so
34
etc/templates/ospfv3.cmds
34
%%XORP_SHLIB%%lib/xorp/lib/libxif_fib2mrib.so
35
etc/templates/ospfv3.tp
35
%%XORP_SHLIB%%lib/xorp/lib/libxif_finder.so
36
etc/templates/pim.cmds
36
%%XORP_SHLIB%%lib/xorp/lib/libxif_finder_client.so
37
etc/templates/pim6.cmds
37
%%XORP_SHLIB%%lib/xorp/lib/libxif_finder_event_notifier.so
38
etc/templates/rib.tp
38
%%XORP_SHLIB%%lib/xorp/lib/libxif_finder_event_observer.so
39
etc/templates/pimsm4.tp
39
%%XORP_SHLIB%%lib/xorp/lib/libxif_fti.so
40
etc/templates/pimsm6.tp
40
%%XORP_SHLIB%%lib/xorp/lib/libxif_mfea.so
41
etc/templates/plumbing.tp
41
%%XORP_SHLIB%%lib/xorp/lib/libxif_mfea_client.so
42
etc/templates/policy.tp
42
%%XORP_SHLIB%%lib/xorp/lib/libxif_mld6igmp.so
43
etc/templates/protocols.tp
43
%%XORP_SHLIB%%lib/xorp/lib/libxif_mld6igmp_client.so
44
etc/templates/rib.cmds
44
%%XORP_SHLIB%%lib/xorp/lib/libxif_ospfv2.so
45
etc/templates/rip.cmds
45
%%XORP_SHLIB%%lib/xorp/lib/libxif_ospfv3.so
46
etc/templates/rip.tp
46
%%XORP_SHLIB%%lib/xorp/lib/libxif_pim.so
47
etc/templates/ripng.cmds
47
%%XORP_SHLIB%%lib/xorp/lib/libxif_policy.so
48
etc/templates/ripng.tp
48
%%XORP_SHLIB%%lib/xorp/lib/libxif_policy_backend.so
49
etc/templates/rtrmgr.tp
49
%%XORP_SHLIB%%lib/xorp/lib/libxif_policy_redist4.so
50
etc/templates/snmp.tp
50
%%XORP_SHLIB%%lib/xorp/lib/libxif_policy_redist6.so
51
etc/templates/static_routes.tp
51
%%XORP_SHLIB%%lib/xorp/lib/libxif_profile.so
52
etc/templates/xorpsh.cmds
52
%%XORP_SHLIB%%lib/xorp/lib/libxif_profile_client.so
53
fea/xorp_fea
53
%%XORP_SHLIB%%lib/xorp/lib/libxif_redist4.so
54
fea/xorp_fea_click_config_generator
54
%%XORP_SHLIB%%lib/xorp/lib/libxif_redist6.so
55
fea/xorp_fea_dummy
55
%%XORP_SHLIB%%lib/xorp/lib/libxif_redist_transaction4.so
56
fea/tools/show_interfaces
56
%%XORP_SHLIB%%lib/xorp/lib/libxif_redist_transaction6.so
57
fib2mrib/xorp_fib2mrib
57
%%XORP_SHLIB%%lib/xorp/lib/libxif_rib.so
58
libxipc/xorp_finder
58
%%XORP_SHLIB%%lib/xorp/lib/libxif_rib_client.so
59
mld6igmp/xorp_igmp
59
%%XORP_SHLIB%%lib/xorp/lib/libxif_rip.so
60
mld6igmp/xorp_mld
60
%%XORP_SHLIB%%lib/xorp/lib/libxif_ripng.so
61
ospf/xorp_ospfv2
61
%%XORP_SHLIB%%lib/xorp/lib/libxif_rtrmgr.so
62
ospf/xorp_ospfv3
62
%%XORP_SHLIB%%lib/xorp/lib/libxif_rtrmgr_client.so
63
ospf/tools/clear_database
63
%%XORP_SHLIB%%lib/xorp/lib/libxif_socket4.so
64
ospf/tools/print_lsas
64
%%XORP_SHLIB%%lib/xorp/lib/libxif_socket4_user.so
65
ospf/tools/print_neighbours
65
%%XORP_SHLIB%%lib/xorp/lib/libxif_socket6.so
66
pim/xorp_pimsm4
66
%%XORP_SHLIB%%lib/xorp/lib/libxif_socket6_user.so
67
pim/xorp_pimsm6
67
%%XORP_SHLIB%%lib/xorp/lib/libxif_static_routes.so
68
policy/xorp_policy
68
%%XORP_SHLIB%%lib/xorp/lib/libxif_vrrp.so
69
rib/xorp_rib
69
%%XORP_SHLIB%%lib/xorp/lib/libxorp_cli.so
70
rib/tools/show_distances
70
%%XORP_SHLIB%%lib/xorp/lib/libxorp_comm.so
71
rib/tools/show_routes
71
%%XORP_SHLIB%%lib/xorp/lib/libxorp_core.so
72
rip/xorp_rip
72
%%XORP_SHLIB%%lib/xorp/lib/libxorp_fea.so
73
rip/xorp_ripng
73
%%XORP_SHLIB%%lib/xorp/lib/libxorp_fea_client.so
74
rip/tools/show_peer_stats
74
%%XORP_SHLIB%%lib/xorp/lib/libxorp_fea_control_socket.so
75
rip/tools/show_stats
75
%%XORP_SHLIB%%lib/xorp/lib/libxorp_fea_data_plane_managers.so
76
static_routes/xorp_static_routes
76
%%XORP_SHLIB%%lib/xorp/lib/libxorp_fea_fibconfig.so
77
vrrp/xorp_vrrp
77
%%XORP_SHLIB%%lib/xorp/lib/libxorp_fea_firewall.so
78
xrl/targets/bgp.xrls
78
%%XORP_SHLIB%%lib/xorp/lib/libxorp_fea_ifconfig.so
79
xrl/targets/bgp4_mib.xrls
79
%%XORP_SHLIB%%lib/xorp/lib/libxorp_fea_io.so
80
xrl/targets/cli.xrls
80
%%XORP_SHLIB%%lib/xorp/lib/libxorp_fib2mrib.so
81
xrl/targets/coord.xrls
81
%%XORP_SHLIB%%lib/xorp/lib/libxorp_finder.so
82
xrl/targets/fea.xrls
82
%%XORP_SHLIB%%lib/xorp/lib/libxorp_ipc.so
83
xrl/targets/fea_ifmgr_mirror.xrls
83
%%XORP_SHLIB%%lib/xorp/lib/libxorp_mld6igmp.so
84
xrl/targets/fib2mrib.xrls
84
%%XORP_SHLIB%%lib/xorp/lib/libxorp_mrt.so
85
xrl/targets/finder.xrls
85
%%XORP_SHLIB%%lib/xorp/lib/libxorp_ospf.so
86
xrl/targets/finder_client.xrls
86
%%XORP_SHLIB%%lib/xorp/lib/libxorp_pim.so
87
xrl/targets/mfea.xrls
87
%%XORP_SHLIB%%lib/xorp/lib/libxorp_policy.so
88
xrl/targets/mld6igmp.xrls
88
%%XORP_SHLIB%%lib/xorp/lib/libxorp_policy_backend.so
89
xrl/targets/olsr4.xrls
89
%%XORP_SHLIB%%lib/xorp/lib/libxorp_policy_common.so
90
xrl/targets/ospfv2.xrls
90
%%XORP_SHLIB%%lib/xorp/lib/libxorp_proto.so
91
xrl/targets/ospfv3.xrls
91
%%XORP_SHLIB%%lib/xorp/lib/libxorp_rib.so
92
xrl/targets/pim.xrls
92
%%XORP_SHLIB%%lib/xorp/lib/libxorp_rip.so
93
xrl/targets/policy.xrls
93
%%XORP_SHLIB%%lib/xorp/lib/libxorp_rip_xrl.so
94
xrl/targets/profiler.xrls
94
%%XORP_SHLIB%%lib/xorp/lib/libxorp_ripng.so
95
xrl/targets/rib.xrls
95
%%XORP_SHLIB%%lib/xorp/lib/libxorp_ripng_xrl.so
96
xrl/targets/ribclient.xrls
96
%%XORP_SHLIB%%lib/xorp/lib/libxorp_static_routes.so
97
xrl/targets/rip.xrls
97
%%XORP_SHLIB%%lib/xorp/lib/libxorp_tecla.so
98
xrl/targets/ripng.xrls
98
%%XORP_SHLIB%%lib/xorp/lib/libxorp_vrrp.so
99
xrl/targets/rtrmgr.xrls
99
%%XORP_SHLIB%%lib/xorp/lib/libxst_bgp.so
100
xrl/targets/show_distances.xrls
100
%%XORP_SHLIB%%lib/xorp/lib/libxst_cli.so
101
xrl/targets/show_routes.xrls
101
%%XORP_SHLIB%%lib/xorp/lib/libxst_coord.so
102
xrl/targets/static_routes.xrls
102
%%XORP_SHLIB%%lib/xorp/lib/libxst_fea.so
103
xrl/targets/test.xrls
103
%%XORP_SHLIB%%lib/xorp/lib/libxst_fea_ifmgr_mirror.so
104
xrl/targets/test_fea_ifmgr_mirror.xrls
104
%%XORP_SHLIB%%lib/xorp/lib/libxst_fib2mrib.so
105
xrl/targets/test_fea_rawlink.xrls
105
%%XORP_SHLIB%%lib/xorp/lib/libxst_finder.so
106
xrl/targets/test_finder_events.xrls
106
%%XORP_SHLIB%%lib/xorp/lib/libxst_finder_client.so
107
xrl/targets/test_peer.xrls
107
%%XORP_SHLIB%%lib/xorp/lib/libxst_mfea.so
108
xrl/targets/test_socket4.xrls
108
%%XORP_SHLIB%%lib/xorp/lib/libxst_mld6igmp.so
109
xrl/targets/test_socket6.xrls
109
%%XORP_SHLIB%%lib/xorp/lib/libxst_ospfv2.so
110
xrl/targets/test_xrls.xrls
110
%%XORP_SHLIB%%lib/xorp/lib/libxst_ospfv3.so
111
xrl/targets/vrrp.xrls
111
%%XORP_SHLIB%%lib/xorp/lib/libxst_pim.so
112
xrl/targets/xorp_if_mib.xrls
112
%%XORP_SHLIB%%lib/xorp/lib/libxst_policy.so
113
xrl/targets/xorpsh.xrls
113
%%XORP_SHLIB%%lib/xorp/lib/libxst_profiler.so
114
%%XORP_SNMP%%mibs/bgp4_mib_1657.la
114
%%XORP_SHLIB%%lib/xorp/lib/libxst_rib.so
115
%%XORP_SNMP%%mibs/bgp4_mib_1657.so
115
%%XORP_SHLIB%%lib/xorp/lib/libxst_ribclient.so
116
%%XORP_SNMP%%mibs/libnetsnmpxorp.la
116
%%XORP_SHLIB%%lib/xorp/lib/libxst_rip.so
117
%%XORP_SNMP%%mibs/libnetsnmpxorp.so
117
%%XORP_SHLIB%%lib/xorp/lib/libxst_ripng.so
118
%%XORP_SNMP%%mibs/ospf_mib_1850.la
118
%%XORP_SHLIB%%lib/xorp/lib/libxst_rtrmgr.so
119
%%XORP_SNMP%%mibs/ospf_mib_1850.so
119
%%XORP_SHLIB%%lib/xorp/lib/libxst_show_distances.so
120
%%XORP_SNMP%%mibs/xorp_if_mib_module.la
120
%%XORP_SHLIB%%lib/xorp/lib/libxst_show_routes.so
121
%%XORP_SNMP%%mibs/xorp_if_mib_module.so
121
%%XORP_SHLIB%%lib/xorp/lib/libxst_static_routes.so
122
%%XORP_SNMP%%mibs/snmpdscripts/getbgppeertable
122
%%XORP_SHLIB%%lib/xorp/lib/libxst_vrrp.so
123
%%XORP_SNMP%%mibs/snmpdscripts/getbgpversion
123
%%XORP_SHLIB%%lib/xorp/lib/libxst_xorpsh.so
124
%%XORP_SNMP%%mibs/snmpdscripts/startsnmp
124
%%XORP_SHLIB%%lib/xorp/lib/libxst_olsr4.so
125
%%XORP_SNMP%%mibs/snmpdscripts/stopsnmp
125
%%XORP_SHLIB%%lib/xorp/lib/libolsrxrl.so
126
@dirrm xrl/targets
126
%%XORP_SHLIB%%lib/xorp/lib/libxif_olsr4.so
127
@dirrm xrl
127
%%XORP_SHLIB%%lib/xorp/lib/libxorp_bgp.so
128
@dirrm static_routes
128
%%XORP_SHLIB%%lib/xorp/lib/libolsr.so
129
@dirrm rip/tools
129
lib/xorp/sbin/xorp_bgp
130
@dirrm rip
130
lib/xorp/sbin/xorp_fea
131
@dirrm rib/tools
131
lib/xorp/sbin/xorp_fea_dummy
132
@dirrm rib
132
lib/xorp/sbin/xorp_fib2mrib
133
@dirrm policy
133
lib/xorp/sbin/xorp_igmp
134
@dirrm pim
134
lib/xorp/sbin/xorp_mld
135
@dirrm ospf/tools
135
lib/xorp/sbin/xorp_olsr4
136
@dirrm ospf
136
lib/xorp/sbin/xorp_ospfv2
137
@dirrm mld6igmp
137
lib/xorp/sbin/xorp_ospfv3
138
@dirrm vrrp
138
lib/xorp/sbin/xorp_pimsm4
139
%%XORP_SNMP%%@dirrm mibs/snmpdscripts
139
lib/xorp/sbin/xorp_pimsm6
140
%%XORP_SNMP%%@dirrm mibs
140
lib/xorp/sbin/xorp_policy
141
@dirrm libxipc
141
lib/xorp/sbin/xorp_rib
142
%%XORP_SNMP%%@dirrmtry libdata/ldconfig/xorp
142
lib/xorp/sbin/xorp_rip
143
%%XORP_SNMP%%@dirrmtry libdata/ldconfig
143
lib/xorp/sbin/xorp_ripng
144
%%XORP_SNMP%%@dirrmtry libdata
144
lib/xorp/sbin/xorp_static_routes
145
@dirrm fib2mrib
145
lib/xorp/sbin/xorp_vrrp
146
@dirrmtry fea/tools
146
sbin/call_xrl
147
@dirrm fea
147
sbin/fea_xrl_shell_funcs.sh
148
@dirrmtry etc/templates
148
sbin/bgp_xrl_shell_funcs.sh
149
@dirrm contrib/olsr/tools
149
sbin/rib_xrl_shell_funcs.sh
150
@dirrm contrib/olsr
150
sbin/xorp_profiler
151
@dirrm contrib
151
sbin/xorp_rtrmgr
152
@dirrm cli/tools
152
sbin/xorpsh
153
@dirrm cli
153
share/xorp/templates/bgp.cmds
154
@dirrmtry bin
154
share/xorp/templates/bgp.tp
155
@dirrm bgp/tools
155
share/xorp/templates/fea.cmds
156
@dirrm bgp
156
share/xorp/templates/fea.tp
157
share/xorp/templates/fib2mrib.tp
158
share/xorp/templates/firewall.tp
159
share/xorp/templates/host.cmds
160
share/xorp/templates/igmp.cmds
161
share/xorp/templates/igmp.tp
162
share/xorp/templates/interfaces.tp
163
share/xorp/templates/mfea.cmds
164
share/xorp/templates/mfea4.tp
165
share/xorp/templates/mfea6.cmds
166
share/xorp/templates/mfea6.tp
167
share/xorp/templates/misc.cmds
168
share/xorp/templates/mld.cmds
169
share/xorp/templates/mld.tp
170
share/xorp/templates/olsr4.cmds
171
share/xorp/templates/olsr4.tp
172
share/xorp/templates/ospfv2.cmds
173
share/xorp/templates/ospfv2.tp
174
share/xorp/templates/ospfv3.cmds
175
share/xorp/templates/ospfv3.tp
176
share/xorp/templates/pim.cmds
177
share/xorp/templates/pim6.cmds
178
share/xorp/templates/pimsm4.tp
179
share/xorp/templates/pimsm6.tp
180
share/xorp/templates/plumbing.tp
181
share/xorp/templates/policy.cmds
182
share/xorp/templates/policy.tp
183
share/xorp/templates/protocols.tp
184
share/xorp/templates/rib.cmds
185
share/xorp/templates/rib.tp
186
share/xorp/templates/rip.cmds
187
share/xorp/templates/rip.tp
188
share/xorp/templates/ripng.cmds
189
share/xorp/templates/ripng.tp
190
share/xorp/templates/rtrmgr.tp
191
share/xorp/templates/static_routes.tp
192
share/xorp/templates/vrrp.cmds
193
share/xorp/templates/vrrp.tp
194
share/xorp/templates/xorpsh.cmds
195
@dirrm share/xorp/templates
196
@dirrm share/xorp
197
%%XORP_SHLIB%%@dirrm lib/xorp/lib
198
@dirrm lib/xorp/bin
199
@dirrm lib/xorp/sbin
200
@dirrm lib/xorp

Return to bug 186982