FreeBSD Bugzilla – Attachment 76784 Details for
Bug 110614
New port: emualtors/dynamips-devel, development version of dynamips, Cisco 7200/3600/2600 router emulator
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
file.shar
file.shar (text/plain), 13.94 KB, created by
Pavel Volkov
on 2007-03-21 13:40:06 UTC
(
hide
)
Description:
file.shar
Filename:
MIME Type:
Creator:
Pavel Volkov
Created:
2007-03-21 13:40:06 UTC
Size:
13.94 KB
patch
obsolete
># This is a shell archive. Save it in a file, remove anything before ># this line, and then unpack it by entering "sh file". Note, it may ># create directories; files and directories will be owned by you and ># have default permissions. ># ># This archive contains: ># ># /usr/ports/local/dynamips-devel/ ># /usr/ports/local/dynamips-devel/files ># /usr/ports/local/dynamips-devel/files/patch-Makefile ># /usr/ports/local/dynamips-devel/files/patch-utils.c ># /usr/ports/local/dynamips-devel/files/patch-utils.h ># /usr/ports/local/dynamips-devel/files/patch-README.hypervisor ># /usr/ports/local/dynamips-devel/files/patch-dynamips.c ># /usr/ports/local/dynamips-devel/files/patch-hypervisor_mode.7 ># /usr/ports/local/dynamips-devel/files/patch-hypervisor.h ># /usr/ports/local/dynamips-devel/files/patch-hypervisor.c ># /usr/ports/local/dynamips-devel/files/patch-net.h ># /usr/ports/local/dynamips-devel/files/patch-net.c ># /usr/ports/local/dynamips-devel/files/patch-dynamips.1 ># /usr/ports/local/dynamips-devel/Makefile ># /usr/ports/local/dynamips-devel/distinfo ># /usr/ports/local/dynamips-devel/pkg-descr ># >echo c - /usr/ports/local/dynamips-devel/ >mkdir -p /usr/ports/local/dynamips-devel/ > /dev/null 2>&1 >echo c - /usr/ports/local/dynamips-devel/files >mkdir -p /usr/ports/local/dynamips-devel/files > /dev/null 2>&1 >echo x - /usr/ports/local/dynamips-devel/files/patch-Makefile >sed 's/^X//' >/usr/ports/local/dynamips-devel/files/patch-Makefile << 'END-of-/usr/ports/local/dynamips-devel/files/patch-Makefile' >X--- Makefile.orig Thu Feb 8 15:23:36 2007 >X+++ Makefile Thu Feb 8 15:34:39 2007 >X@@ -12,6 +12,9 @@ >X # (WinPcap is used for Cygwin) >X HAS_PCAP?=1 >X >X+# Change this to 1 if your system has posix_memalign >X+HAS_POSIX_MEMALIGN?=0 >X+ >X # Current dynamips release >X VERSION_TRAIN=0.2.6 >X VERSION_SUB=-RC5 >X@@ -34,16 +37,17 @@ >X -DJIT_ARCH=\"$(DYNAMIPS_ARCH)\" \ >X -DARCH_INC_FILE=$(ARCH_INC_FILE) -DDYNAMIPS_VERSION=\"$(VERSION)\" \ >X -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE \ >X- -DHAS_RFC2553=$(HAS_RFC2553) >X+ -DHAS_RFC2553=$(HAS_RFC2553) -DHAS_POSIX_MEMALIGN=$(HAS_POSIX_MEMALIGN) >X >X-PCAP_LIB=/usr/local/lib/libpcap.a >X-#PCAP_LIB=-lpcap >X+#PCAP_LIB=/usr/local/lib/libpcap.a >X+PCAP_LIB=-lpcap >X >X ifeq ($(shell uname), FreeBSD) >X PTHREAD_LIBS?=-pthread >X- CFLAGS+=-I/usr/local/include -I/usr/local/include/libelf $(PTHREAD_CFLAGS) \ >X+ LOCALBASE?=/usr/local >X+ CFLAGS+=-I$(LOCALBASE)/include -I$(LOCALBASE)/include/libelf $(PTHREAD_CFLAGS) \ >X -D_FILE_OFFSET_BITS=64 >X- LIBS=-L/usr/local/lib -L. -lelf $(PTHREAD_LIBS) >X+ LIBS=-L$(LOCALBASE)/lib -L. -lelf $(PTHREAD_LIBS) $(LDFLAGS) >X else >X ifeq ($(shell uname), Linux) >X PTHREAD_LIBS?=-lpthread >END-of-/usr/ports/local/dynamips-devel/files/patch-Makefile >echo x - /usr/ports/local/dynamips-devel/files/patch-utils.c >sed 's/^X//' >/usr/ports/local/dynamips-devel/files/patch-utils.c << 'END-of-/usr/ports/local/dynamips-devel/files/patch-utils.c' >X--- utils.c.orig Wed Mar 8 22:53:21 2006 >X+++ utils.c Wed Mar 8 22:53:37 2006 >X@@ -187,7 +187,7 @@ >X { >X void *p; >X >X-#ifdef __linux__ >X+#if defined(__linux__) || HAS_POSIX_MEMALIGN >X if (posix_memalign((void *)&p,boundary,size)) >X #else >X #ifdef __CYGWIN__ >END-of-/usr/ports/local/dynamips-devel/files/patch-utils.c >echo x - /usr/ports/local/dynamips-devel/files/patch-utils.h >sed 's/^X//' >/usr/ports/local/dynamips-devel/files/patch-utils.h << 'END-of-/usr/ports/local/dynamips-devel/files/patch-utils.h' >X--- utils.h.orig Wed Feb 14 20:37:58 2007 >X+++ utils.h Tue Feb 20 18:56:54 2007 >X@@ -12,6 +12,8 @@ >X #include <sys/time.h> >X #include <time.h> >X #include <netinet/in.h> >X+#include <pthread.h> >X+#include <signal.h> >X >X /* True/False definitions */ >X #ifndef FALSE >X@@ -35,6 +37,8 @@ >X #elif defined(__i386) || defined(__i386__) || defined(i386) >X #define ARCH_BYTE_ORDER ARCH_LITTLE_ENDIAN >X #elif defined(__x86_64__) >X+#define ARCH_BYTE_ORDER ARCH_LITTLE_ENDIAN >X+#elif defined(__ia64__) >X #define ARCH_BYTE_ORDER ARCH_LITTLE_ENDIAN >X #endif >X >END-of-/usr/ports/local/dynamips-devel/files/patch-utils.h >echo x - /usr/ports/local/dynamips-devel/files/patch-README.hypervisor >sed 's/^X//' >/usr/ports/local/dynamips-devel/files/patch-README.hypervisor << 'END-of-/usr/ports/local/dynamips-devel/files/patch-README.hypervisor' >X--- README.hypervisor.orig Wed Mar 21 10:00:28 2007 >X+++ README.hypervisor Wed Mar 21 10:01:22 2007 >X@@ -8,7 +8,7 @@ >X Running dynamips in hypervisor mode >X =================================== >X >X-dynamips -H <tcp_port> >X+dynamips -H [ip_address:]<tcp_port> >X >X Managing the hypervisor >X ======================= >END-of-/usr/ports/local/dynamips-devel/files/patch-README.hypervisor >echo x - /usr/ports/local/dynamips-devel/files/patch-dynamips.c >sed 's/^X//' >/usr/ports/local/dynamips-devel/files/patch-dynamips.c << 'END-of-/usr/ports/local/dynamips-devel/files/patch-dynamips.c' >X--- dynamips.c.orig Wed Mar 21 10:07:17 2007 >X+++ dynamips.c Wed Mar 21 13:39:57 2007 >X@@ -61,6 +61,7 @@ >X /* Hypervisor */ >X int hypervisor_mode = 0; >X int hypervisor_tcp_port = 0; >X+char hypervisor_ip_address[263]; /* 256(MAXHOSTNAMELEN)+1(:)+5(port)+NULL */ >X >X /* Log file */ >X char *log_file_name = NULL; >X@@ -227,7 +228,7 @@ >X printf("Usage: %s [options] <ios_image>\n\n",argv[0]); >X >X printf("Available options:\n" >X- " -H <tcp_port> : Run in hypervisor mode\n\n" >X+ " -H [ip_address:]<tcp_port> : Run in hypervisor mode\n\n" >X " -P <platform> : Platform to emulate (7200, 3600, " >X "2691, 3725 or 3745) " >X "(default: 7200)\n\n" >X@@ -1061,6 +1062,7 @@ >X static int run_hypervisor(int argc,char *argv[]) >X { >X char *options_list = "H:l:hN:"; >X+ char *index; >X int i,option; >X >X for(i=1;i<argc;i++) >X@@ -1079,7 +1081,15 @@ >X { >X /* Hypervisor TCP port */ >X case 'H': >X- hypervisor_tcp_port = atoi(optarg); >X+ strncpy(hypervisor_ip_address,optarg,sizeof(hypervisor_ip_address)); >X+ index=strrchr(hypervisor_ip_address,':'); >X+ if (index != NULL) { >X+ *index++='\000'; >X+ hypervisor_tcp_port = atoi(index); >X+ } else { >X+ hypervisor_tcp_port = atoi(hypervisor_ip_address); >X+ hypervisor_ip_address[0]='\000'; >X+ } >X break; >X >X /* Log file */ >X@@ -1244,7 +1254,7 @@ >X /* Free resources used by instance */ >X vm_release(vm); >X } else { >X- hypervisor_tcp_server(hypervisor_tcp_port); >X+ hypervisor_tcp_server(hypervisor_ip_address,hypervisor_tcp_port); >X } >X >X dynamips_reset(); >END-of-/usr/ports/local/dynamips-devel/files/patch-dynamips.c >echo x - /usr/ports/local/dynamips-devel/files/patch-hypervisor_mode.7 >sed 's/^X//' >/usr/ports/local/dynamips-devel/files/patch-hypervisor_mode.7 << 'END-of-/usr/ports/local/dynamips-devel/files/patch-hypervisor_mode.7' >X--- hypervisor_mode.7.orig Wed Mar 21 11:02:14 2007 >X+++ hypervisor_mode.7 Wed Mar 21 11:02:40 2007 >X@@ -5,7 +5,7 @@ >X or Frame-Relay networks. >X .SH SYNOPSIS >X .B dynamips -H >X-\fItcp_port\fP >X+\fI[ip_address:]tcp_port\fP >X >X .SH DESCRIPTION >X You can connect directly to the TCP control port with telnet, or use >END-of-/usr/ports/local/dynamips-devel/files/patch-hypervisor_mode.7 >echo x - /usr/ports/local/dynamips-devel/files/patch-hypervisor.h >sed 's/^X//' >/usr/ports/local/dynamips-devel/files/patch-hypervisor.h << 'END-of-/usr/ports/local/dynamips-devel/files/patch-hypervisor.h' >X--- hypervisor.h.orig Wed Mar 21 10:58:06 2007 >X+++ hypervisor.h Wed Mar 21 11:09:40 2007 >X@@ -136,6 +136,6 @@ >X int hypervisor_stopsig(void); >X >X /* Hypervisor TCP server */ >X-int hypervisor_tcp_server(int tcp_port); >X+int hypervisor_tcp_server(char *ip_address,int tcp_port); >X >X #endif >END-of-/usr/ports/local/dynamips-devel/files/patch-hypervisor.h >echo x - /usr/ports/local/dynamips-devel/files/patch-hypervisor.c >sed 's/^X//' >/usr/ports/local/dynamips-devel/files/patch-hypervisor.c << 'END-of-/usr/ports/local/dynamips-devel/files/patch-hypervisor.c' >X--- hypervisor.c.orig Wed Mar 21 11:11:12 2007 >X+++ hypervisor.c Wed Mar 21 11:29:55 2007 >X@@ -535,7 +535,7 @@ >X } >X >X /* Hypervisor TCP server */ >X-int hypervisor_tcp_server(int tcp_port) >X+int hypervisor_tcp_server(char* ip_address,int tcp_port) >X { >X int fd_array[HYPERVISOR_MAX_FD]; >X struct sockaddr_storage remote_addr; >X@@ -565,7 +565,7 @@ >X if (!tcp_port) >X tcp_port = HYPERVISOR_TCP_PORT; >X >X- fd_count = ip_listen(tcp_port,SOCK_STREAM,HYPERVISOR_MAX_FD,fd_array); >X+ fd_count = ip_listen(ip_address,tcp_port,SOCK_STREAM,HYPERVISOR_MAX_FD,fd_array); >X >X if (fd_count <= 0) { >X fprintf(stderr,"Hypervisor: unable to create TCP sockets.\n"); >END-of-/usr/ports/local/dynamips-devel/files/patch-hypervisor.c >echo x - /usr/ports/local/dynamips-devel/files/patch-net.h >sed 's/^X//' >/usr/ports/local/dynamips-devel/files/patch-net.h << 'END-of-/usr/ports/local/dynamips-devel/files/patch-net.h' >X--- net.h.orig Wed Mar 21 11:32:05 2007 >X+++ net.h Wed Mar 21 11:33:28 2007 >X@@ -218,6 +218,6 @@ >X int udp_connect(int local_port,char *remote_host,int remote_port); >X >X /* Listen on the specified port */ >X-int ip_listen(int port,int sock_type,int max_fd,int fd_array[]); >X+int ip_listen(char *ip_address,int port,int sock_type,int max_fd,int fd_array[]); >X >X #endif >END-of-/usr/ports/local/dynamips-devel/files/patch-net.h >echo x - /usr/ports/local/dynamips-devel/files/patch-net.c >sed 's/^X//' >/usr/ports/local/dynamips-devel/files/patch-net.c << 'END-of-/usr/ports/local/dynamips-devel/files/patch-net.c' >X--- net.c.orig Wed Mar 21 11:34:17 2007 >X+++ net.c Wed Mar 21 11:55:29 2007 >X@@ -353,7 +353,7 @@ >X >X #if HAS_RFC2553 >X /* Listen on the specified port */ >X-int ip_listen(int port,int sock_type,int max_fd,int fd_array[]) >X+int ip_listen(char *ip_address,int port,int sock_type,int max_fd,int fd_array[]) >X { >X struct addrinfo hints,*res,*res0; >X char port_str[20]; >X@@ -370,7 +370,7 @@ >X >X snprintf(port_str,sizeof(port_str),"%d",port); >X >X- if ((error = getaddrinfo(NULL,port_str,&hints,&res0)) != 0) { >X+ if ((error = getaddrinfo((strlen(ip_address)==0)?NULL:ip_address,port_str,&hints,&res0)) != 0) { >X fprintf(stderr,"ip_listen: %s", gai_strerror(error)); >X return(-1); >X } >X@@ -405,7 +405,7 @@ >X } >X #else >X /* Listen on the specified port */ >X-int ip_listen(int port,int sock_type,int max_fd,int fd_array[]) >X+int ip_listen(char *ip_address,int port,int sock_type,int max_fd,int fd_array[]) >X { >X struct sockaddr_in sin; >X int i,sck,reuse=1; >X@@ -422,6 +422,8 @@ >X memset(&sin,0,sizeof(sin)); >X sin.sin_family = PF_INET; >X sin.sin_port = htons(port); >X+ if (strlen(ip_address) != 0 && inet_addr(ip_address) != INADDR_NONE) >X+ sin.sin_addr = inet_addr(ip_address); >X >X setsockopt(fd_array[0],SOL_SOCKET,SO_REUSEADDR,&reuse,sizeof(reuse)); >X >END-of-/usr/ports/local/dynamips-devel/files/patch-net.c >echo x - /usr/ports/local/dynamips-devel/files/patch-dynamips.1 >sed 's/^X//' >/usr/ports/local/dynamips-devel/files/patch-dynamips.1 << 'END-of-/usr/ports/local/dynamips-devel/files/patch-dynamips.1' >X--- dynamips.1.orig Wed Mar 21 14:26:01 2007 >X+++ dynamips.1 Wed Mar 21 14:26:30 2007 >X@@ -44,7 +44,7 @@ >X .SH OPTIONS >X A summary of options is included below. >X .TP >X-.B -H <tcp_port> >X+.B -H [ip_address:]<tcp_port> >X Enable hypervisor mode. >X .br >X The hypervisor mode of dynamips allows you to run simultaneously >END-of-/usr/ports/local/dynamips-devel/files/patch-dynamips.1 >echo x - /usr/ports/local/dynamips-devel/Makefile >sed 's/^X//' >/usr/ports/local/dynamips-devel/Makefile << 'END-of-/usr/ports/local/dynamips-devel/Makefile' >X# New ports collection makefile for: dynamips >X# Date created: 21 Mar 2007 >X# Whom: Pavel Volkov <pol@opk.ru> >X# >X# $FreeBSD$ >X# >X >XPORTNAME= dynamips >XDISTVERSION= 0.2.7-RC1 >XCATEGORIES= emulators >XMASTER_SITES= http://www.ipflow.utc.fr/dynamips/ >X >XMAINTAINER= pol@opk.ru >XCOMMENT= Cisco 3600/7200 Simulator >X >XLIB_DEPENDS= elf.0:${PORTSDIR}/devel/libelf >X >XUSE_GMAKE= yes >XUSE_GCC= 3.2+ >XUSE_GETOPT_LONG=yes >XALL_TARGET= ${PORTNAME} nvram_export >XMAKE_ENV= DYNAMIPS_ARCH=${DYNAMIPS_ARCH}\ >X PTHREAD_CFLAGS=${PTHREAD_CFLAGS}\ >X PTHREAD_LIBS=${PTHREAD_LIBS}\ >X LDFLAGS="${LDFLAGS}" >X >XPLIST_FILES= bin/${PORTNAME} bin/nvram_export >X.if !defined(NOPORTDOCS) >XPORTDOCS= README README.hypervisor >X.endif >X.if !defined(NO_INSTALL_MANPAGES) >XMAN1= ${PORTNAME}.1 nvram_export.1 >XMAN7= hypervisor_mode.7 >X.endif >X >Xdo-install: >X ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin >X ${INSTALL_PROGRAM} ${WRKSRC}/nvram_export ${PREFIX}/bin >X.if !defined(NOPORTDOCS) >X ${MKDIR} ${DOCSDIR} >X ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR} >X ${INSTALL_DATA} ${WRKSRC}/README.hypervisor ${DOCSDIR} >X.endif >X.if !defined(NO_INSTALL_MANPAGES) >X ${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${PREFIX}/man/man1 >X ${INSTALL_MAN} ${WRKSRC}/nvram_export.1 ${PREFIX}/man/man1 >X ${INSTALL_MAN} ${WRKSRC}/hypervisor_mode.7 ${PREFIX}/man/man7 >X.endif >X >X.include <bsd.port.pre.mk> >X >X.if ${ARCH} == "i386" >XDYNAMIPS_ARCH= "x86" >X.elif ${ARCH} == "amd64" >XDYNAMIPS_ARCH= "nojit" # JIT does not work on amd64 for some reason >X.else >XDYNAMIPS_ARCH= "nojit" >X.endif >X >X.if ${OSVERSION} < 602100 || ${OSVERSION} < 700021 >X# >X# Requires libpcap 0.9.4 >XBUILD_DEPENDS+= libpcap>=0.9.4:${PORTSDIR}/net/libpcap >X.endif >X >X.if ${OSVERSION} >= 700013 >XMAKE_ENV+= HAS_POSIX_MEMALIGN=1 >X.endif >X >X.include <bsd.port.post.mk> >END-of-/usr/ports/local/dynamips-devel/Makefile >echo x - /usr/ports/local/dynamips-devel/distinfo >sed 's/^X//' >/usr/ports/local/dynamips-devel/distinfo << 'END-of-/usr/ports/local/dynamips-devel/distinfo' >XMD5 (dynamips-0.2.7-RC1.tar.gz) = 1e736add1285fef3bf7671f6217aee4c >XSHA256 (dynamips-0.2.7-RC1.tar.gz) = 6ff4458853b07ac63c6f83dcbea687db2b97d38177e15701da7153cd037bf80a >XSIZE (dynamips-0.2.7-RC1.tar.gz) = 480761 >END-of-/usr/ports/local/dynamips-devel/distinfo >echo x - /usr/ports/local/dynamips-devel/pkg-descr >sed 's/^X//' >/usr/ports/local/dynamips-devel/pkg-descr << 'END-of-/usr/ports/local/dynamips-devel/pkg-descr' >XCisco 3600/7200 simulator. >X >XWWW: http://www.ipflow.utc.fr/index.php/Cisco_7200_Simulator >X http://www.ipflow.utc.fr/blog/ >X http://hacki.at/7200emu/index.php >END-of-/usr/ports/local/dynamips-devel/pkg-descr >exit
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 110614
: 76784