Date: Sat, 25 Oct 2003 11:58:10 -0400 (EDT) From: Jason Slagle <raistlin@tacorp.net> To: freebsd-hackers@freebsd.org Subject: PCAP Open BPF R/W? Message-ID: <20031025115710.Q647@mail.tacorp.net>
next in thread | raw e-mail | index | archive | help
Could someone consider applying the following to the in tree pcap? It makes it possible to write to the pcap fd to send packets out the interface. Some simulators expect this ability to properly do networking.. Jason --- pcap-bpf.c.old Sat Oct 25 11:56:32 2003 +++ pcap-bpf.c Sat Oct 25 11:49:10 2003 @@ -185,7 +185,7 @@ */ do { (void)snprintf(device, sizeof(device), "/dev/bpf%d", n++); - fd = open(device, O_RDONLY); + fd = open(device, O_RDWR); } while (fd < 0 && errno == EBUSY); /* -- Jason Slagle - CCNP - CCDP /"\ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . \ / ASCII Ribbon Campaign . X - NO HTML/RTF in e-mail . / \ - NO Word docs in e-mail .
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031025115710.Q647>