25 lines
856 B
Text
25 lines
856 B
Text
|
--- sim_ether.c.orig Fri Mar 30 16:30:26 2012
|
||
|
+++ sim_ether.c Wed Jun 13 06:47:21 2012
|
||
|
@@ -1750,14 +1750,19 @@ strcpy(dev->name, savname);
|
||
|
dev->dptr = dptr;
|
||
|
dev->dbit = dbit;
|
||
|
|
||
|
-#if !defined(HAS_PCAP_SENDPACKET) && defined (xBSD) && !defined (__APPLE__)
|
||
|
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||
|
/* Tell the kernel that the header is fully-formed when it gets it.
|
||
|
This is required in order to fake the src address. */
|
||
|
if (dev->eth_api == ETH_API_PCAP) {
|
||
|
int one = 1;
|
||
|
ioctl(pcap_fileno(dev->handle), BIOCSHDRCMPLT, &one);
|
||
|
+#ifdef __OpenBSD__
|
||
|
+ /* set direction filter */
|
||
|
+ one = BPF_DIRECTION_OUT;
|
||
|
+ ioctl(pcap_fileno(dev->handle), BIOCSDIRFILT, &one);
|
||
|
+#endif /* __OpenBSD__ */
|
||
|
}
|
||
|
-#endif /* xBSD */
|
||
|
+#endif /* __FreeBSD__ || __NetBSD__ || __OpenBSD__ */
|
||
|
|
||
|
#if defined (USE_READER_THREAD)
|
||
|
if (1) {
|