View | Details | Raw Unified | Return to bug 203182 | Differences between
and this patch

Collapse All | Expand All

(-)libbgpdump-new/Makefile (-10 / +9 lines)
Lines 1-11 Link Here
1
# $FreeBSD: head/net/libbgpdump/Makefile 365034 2014-08-15 20:24:06Z pi $
1
# $FreeBSD: head/net/libbgpdump/Makefile 365034 2014-08-15 20:24:06Z pi $
2
2
3
PORTNAME=	libbgpdump
3
PORTNAME=	libbgpdump
4
PORTVERSION=	1.4.99.13
4
PORTVERSION=	1.4.99.15
5
PORTREVISION=	3
6
CATEGORIES=	net
5
CATEGORIES=	net
7
MASTER_SITES=	http://www.ris.ripe.net/source/bgpdump/
6
MASTER_SITES=	http://www.ris.ripe.net/source/bgpdump/
8
EXTRACT_SUFX=	.tgz
9
7
10
MAINTAINER=	mjl@luckie.org.nz
8
MAINTAINER=	mjl@luckie.org.nz
11
COMMENT=	Analyzing dump files produced by Zebra/Quagga or MRT
9
COMMENT=	Analyzing dump files produced by Zebra/Quagga or MRT
Lines 14-31 Link Here
14
12
15
GNU_CONFIGURE=	yes
13
GNU_CONFIGURE=	yes
16
USE_LDCONFIG=	yes
14
USE_LDCONFIG=	yes
15
USES=		tar:tgz
17
16
18
OPTIONS_DEFINE=	DOCS EXAMPLES
17
OPTIONS_DEFINE=	DOCS EXAMPLES
19
18
20
do-install:
19
do-install:
21
	@${INSTALL_PROGRAM} ${WRKSRC}/bgpdump ${STAGEDIR}${PREFIX}/bin
20
	${INSTALL_PROGRAM} ${WRKSRC}/bgpdump ${STAGEDIR}${PREFIX}/bin
22
	@${INSTALL_DATA} ${WRKSRC}/libbgpdump.* ${STAGEDIR}${PREFIX}/lib
21
	${INSTALL_DATA} ${WRKSRC}/libbgpdump.* ${STAGEDIR}${PREFIX}/lib
23
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libbgpdump.so
22
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libbgpdump.so
24
.for i in bgpdump_attr.h bgpdump_formats.h bgpdump_lib.h
23
.for i in bgpdump_attr.h bgpdump_formats.h bgpdump_lib.h
25
	@${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${PREFIX}/include
24
	${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${PREFIX}/include
26
.endfor
25
.endfor
27
	@${MKDIR} ${STAGEDIR}${DOCSDIR} ${STAGEDIR}${EXAMPLESDIR}
26
	${MKDIR} ${STAGEDIR}${DOCSDIR} ${STAGEDIR}${EXAMPLESDIR}
28
	@${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}
27
	${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}
29
	@${INSTALL_DATA} ${WRKSRC}/example.c ${STAGEDIR}${EXAMPLESDIR}
28
	${INSTALL_DATA} ${WRKSRC}/example.c ${STAGEDIR}${EXAMPLESDIR}
30
29
31
.include <bsd.port.mk>
30
.include <bsd.port.mk>
(-)libbgpdump-new/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (libbgpdump-1.4.99.13.tgz) = 7551a285fa5c0885aec7290e1f316e58968baab70a4f3467f8f70868d338311e
1
SHA256 (libbgpdump-1.4.99.15.tgz) = 04ad874a745541ec88c87639cb6cfdddaba4db515360855108bc9d65f14b7576
2
SIZE (libbgpdump-1.4.99.13.tgz) = 84083
2
SIZE (libbgpdump-1.4.99.15.tgz) = 131580
(-)libbgpdump-new/files/patch-bgpdump.c (-13 lines)
Lines 1-13 Link Here
1
--- bgpdump.c.old	2014-07-24 13:02:50.000000000 +0000
2
+++ bgpdump.c	2014-07-24 13:03:27.000000000 +0000
3
@@ -164,10 +164,6 @@
4
         exit(1);        
5
     }
6
 
7
-    // more efficient then line buffering
8
-    char buffer[16000];
9
-    setbuffer(stdout, buffer, sizeof buffer);
10
-    
11
     BGPDUMP *my_dump = bgpdump_open_dump(argv[0]);
12
     
13
     do {
(-)libbgpdump-new/files/patch-util.c (-29 lines)
Lines 1-29 Link Here
1
--- util.c.orig	2014-08-15 12:58:56.000000000 -0700
2
+++ util.c	2014-08-15 13:01:14.000000000 -0700
3
@@ -29,6 +29,7 @@
4
 #include <syslog.h>
5
 #include <time.h>
6
 #include <string.h>
7
+#include <inttypes.h>
8
 
9
 static bool use_syslog = true;
10
 
11
@@ -110,17 +111,7 @@
12
 
13
 int int2str(uint32_t value, char* str)
14
 {
15
-    const int LEN = 11;
16
-    char b[LEN];
17
-    int i = LEN;
18
-    b[i--] = '\0';
19
-    
20
-    do {
21
-        b[i--] = (char)(48 + (value % 10));
22
-    } while (value /= 10);
23
-
24
-    memcpy(str, b + i + 1, LEN - i);
25
-    return LEN - i - 1;
26
+  return snprintf(str, 11, "%"PRIu32, value);
27
 }
28
 
29
 static void ti2s(uint32_t value) {

Return to bug 203182