One more diff:
http://pdp-11.nsk.ru/~form/files/bridge/bridge-tap.patch
It contains my previous path for OpenBSD and adds support for OpenBSD/Linux `tun'
interface, so you
can use it for SimH:
bridge.conf:
------------
[bridge]
tunnel @tun0
------------
pdp11.ini:
------------
att xq tun0
------------
On 11/22/2011 09:24 AM, Oleg Safiullin wrote:
On 11/22/2011 02:25 AM, Johnny Billquist wrote:
Ok. After some whacky hacking to merge what Hans sent me, I've uploaded a new version
at
http://www.update.uu.se/~bqt/hecnet
o Update for OpenBSD to avoid loops.
o Drop MAX() definition - it isn't used
--- bridge.c.orig Tue Nov 22 02:17:15 2011
+++ bridge.c Tue Nov 22 09:21:34 2011
@@ -70,8 +70,6 @@
#define ETHERTYPE_MOPRC 0x6002
#define ETHERTYPE_LOOPBACK 0x9000
-#define MAX(a,b) (a>b?a:b)
-
/* This is a very simple and small program for bpf that just
filters out anything by any protocol that we *know* we're
not interested in.
@@ -248,6 +246,13 @@
perror("BIOCSHDRCMPLT");
exit(1);
}
+#ifdef __OpenBSD__
+ i = BPF_DIRECTION_OUT;
+ if (ioctl(bridge[bcnt].fd,BIOCSDIRFILT,&i)) {
+ perror("BIOCSDIRFILT");
+ exit(1);
+ }
+#endif
#endif
found = -1;