diff options
Diffstat (limited to 'emulators')
-rw-r--r-- | emulators/dynamips/Makefile | 4 | ||||
-rw-r--r-- | emulators/dynamips/files/patch-gen_eth.c | 26 | ||||
-rw-r--r-- | emulators/dynamips/files/patch-net.c | 20 |
3 files changed, 42 insertions, 8 deletions
diff --git a/emulators/dynamips/Makefile b/emulators/dynamips/Makefile index f81c73abaec8..07fc3fdf471b 100644 --- a/emulators/dynamips/Makefile +++ b/emulators/dynamips/Makefile @@ -7,11 +7,11 @@ PORTNAME= dynamips DISTVERSION= 0.2.7 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= emulators MASTER_SITES= http://www.ipflow.utc.fr/dynamips/ -MAINTAINER= fjoe@FreeBSD.org +MAINTAINER= nork@FreeBSD.org COMMENT= Cisco 3600/7200 Simulator LIB_DEPENDS= elf.0:${PORTSDIR}/devel/libelf diff --git a/emulators/dynamips/files/patch-gen_eth.c b/emulators/dynamips/files/patch-gen_eth.c new file mode 100644 index 000000000000..97f60cdd3222 --- /dev/null +++ b/emulators/dynamips/files/patch-gen_eth.c @@ -0,0 +1,26 @@ +--- gen_eth.c.orig 2007-05-26 18:52:33.000000000 +0900 ++++ gen_eth.c 2009-07-21 03:18:35.194759073 +0900 +@@ -22,6 +22,7 @@ + #include <sys/types.h> + #include <sys/socket.h> + #include <sys/wait.h> ++#include <sys/ioctl.h> + #include <netinet/in.h> + #include <arpa/inet.h> + #include <pthread.h> +@@ -45,8 +46,13 @@ + if (!(p = pcap_open_live(device,2048,TRUE,10,pcap_errbuf))) + goto pcap_error; + +- /* Accept only incoming packets */ +- pcap_setdirection(p,PCAP_D_IN); ++ pcap_setdirection(p,PCAP_D_INOUT); ++#ifdef BIOCFEEDBACK ++ { ++ int on = 1; ++ ioctl(pcap_fileno(p), BIOCFEEDBACK, &on); ++ } ++#endif + #else + p = pcap_open(device,2048, + PCAP_OPENFLAG_PROMISCUOUS | diff --git a/emulators/dynamips/files/patch-net.c b/emulators/dynamips/files/patch-net.c index 155b2c913433..88746365ed8f 100644 --- a/emulators/dynamips/files/patch-net.c +++ b/emulators/dynamips/files/patch-net.c @@ -1,6 +1,14 @@ ---- net.c.orig Wed Mar 21 11:34:17 2007 -+++ net.c Wed Mar 21 11:55:29 2007 -@@ -353,7 +353,7 @@ +--- net.c.orig 2007-05-26 18:52:33.000000000 +0900 ++++ net.c 2009-07-21 03:16:45.891581213 +0900 +@@ -208,6 +208,7 @@ + addr->eth_addr_byte[3] = v[1] & 0xFF; + addr->eth_addr_byte[4] = (v[2] >> 8) & 0xFF; + addr->eth_addr_byte[5] = v[2] & 0xFF; ++ return(0); + } + + return(-1); +@@ -353,7 +354,7 @@ #if HAS_RFC2553 /* Listen on the specified port */ @@ -9,7 +17,7 @@ { struct addrinfo hints,*res,*res0; char port_str[20]; -@@ -370,7 +370,7 @@ +@@ -370,7 +371,7 @@ snprintf(port_str,sizeof(port_str),"%d",port); @@ -18,7 +26,7 @@ fprintf(stderr,"ip_listen: %s", gai_strerror(error)); return(-1); } -@@ -405,7 +405,7 @@ +@@ -405,7 +406,7 @@ } #else /* Listen on the specified port */ @@ -27,7 +35,7 @@ { struct sockaddr_in sin; int i,sck,reuse=1; -@@ -422,6 +422,8 @@ +@@ -422,6 +423,8 @@ memset(&sin,0,sizeof(sin)); sin.sin_family = PF_INET; sin.sin_port = htons(port); |