Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Feb 2011 07:20:09 GMT
From:      "Alexander V. Chernikov" <melifaro@ipfw.ru>
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   Re: ports/154521: [ports] emulators/dynamips-devel receives nothing from real interface
Message-ID:  <201102070720.p177K9Xu057045@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/154521; it has been noted by GNATS.

From: "Alexander V. Chernikov" <melifaro@ipfw.ru>
To: bug-followup@FreeBSD.org, melifaro@ipfw.ru
Cc:  
Subject: Re: ports/154521: [ports] emulators/dynamips-devel receives nothing
 from real interface
Date: Mon, 07 Feb 2011 10:16:49 +0300

 This is a multi-part message in MIME format.
 --------------020600050402060107000108
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 
 
 
 --------------020600050402060107000108
 Content-Type: text/plain;
  name="patch-gen_eth.txt"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="patch-gen_eth.txt"
 
 --- 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 | 
 
 --------------020600050402060107000108--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201102070720.p177K9Xu057045>