Jeremy,

I haven't tried SIMH 3.8.1nb1 on my Mac, but I suspect you have permission problems accessing the pcap devices. My notes from my SIMH installation describe a ChmodBPF script included with the libpcap package that takes care of that:

Install the ChmodBPF system startup item to change the permission on the BPF (BSD packet filter) devices (/dev/bpf*) to allow users in the “admin” group to read from and write to the Ethernet network:

# mv ChmodBPF /Library/StartupItems/

Mac OS X must be restarted for ChmodBPF to take effect.

ChmodBPF is a directory:

$ ls -lR /Library/StartupItems/ChmodBPF
total 16
drwxr-xr-x  5 root  wheel  170 Jun  1  2005 CVS
-rwxr-xr-x  1 root  wheel  900 Oct 18  2004 ChmodBPF
-rw-r--r--  1 root  wheel  126 Oct 18  2004 StartupParameters.plist

/Library/StartupItems/ChmodBPF/CVS:
total 24
-rw-r--r--  1 root  wheel  99 Jun  1  2005 Entries
-rw-r--r--  1 root  wheel  17 Jun  1  2005 Repository
-rw-r--r--  1 root  wheel  49 Jun  1  2005 Root


The actual script that modifies the permissions is:

$ cat /Library/StartupItems/ChmodBPF/ChmodBPF
#! /bin/sh

. /etc/rc.common

StartService ()
{
        #
        # Unfortunately, Mac OS X's devfs is based on the old FreeBSD
        # one, not the current one, so there's no way to configure it
        # to create BPF devices with particular owners or groups.
        # This startup item will make it owned by the admin group,
        # with permissions rw-rw----, so that anybody in the admin
        # group can use programs that capture or send raw packets.
        #
        # Change this as appropriate for your site, e.g. to make
        # it owned by a particular user without changing the permissions,
        # so only that user and the super-user can capture or send raw
        # packets, or give it the permissions rw-r-----, so that
        # only the super-user can send raw packets but anybody in the
        # admin group can capture packets.
        #
        chgrp admin /dev/bpf*
        chmod g+rw /dev/bpf*
}

StopService ()
{
        return 0;
}

RestartService () { StartService; }

RunService "$1"


On my system, the /dev/bpf* devices look like this:

$ ls -l /dev/bpf*
crw-rw----  1 root  admin   23,   0 Oct 14 20:13 /dev/bpf0
crw-rw----  1 root  admin   23,   1 Oct 14 20:13 /dev/bpf1
crw-rw----  1 root  admin   23,   2 Oct 14 20:13 /dev/bpf2
crw-rw----  1 root  admin   23,   3 Oct 14 20:13 /dev/bpf3


If your /dev/bpf* devices already look like this, maybe your account is not a member of the admin group. The "id" command will list your groups:

$ id
uid=xxxx(baker) gid=xxx groups=xxx,98(_lpadmin),81(_appserveradm), 79(_appserverusr),105(com.apple.sharepoint.group.4),80(admin)



Larry Baker
US Geological Survey
650-329-5608
[email protected]

On 28 Oct 2011, at 9:00 AM, [email protected] wrote:

----------------------------------------------------------------------

Message: 1
Date: Fri, 28 Oct 2011 10:06:12 -0500 (CDT)
From: "Jeremy C. Reed" <[email protected]>
To: [email protected]
Subject: [Simh] networking with simh on MacOS?
Message-ID: <[email protected]>
Content-Type: TEXT/PLAIN; charset=US-ASCII

I have

$ uname -mprsv
Darwin 10.6.0 Darwin Kernel Version 10.6.0: Wed Nov 10 18:11:58 PST
2010; root:xnu-1504.9.26~3/RELEASE_X86_64 x86_64 i386

I installed simh-3.8.1nb1 as installed using pkgsrc with these patches:

http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/emulators/simh/patches/?only_with_tag=MAIN

It is built using libpcap and USE_NETWORK=YES OSTYPE=darwin.

I am trying to use OpenBSD 4.9.

I am unable to get the networking to work:

 sim> at xq0 en0
 File open error

Any suggestions for the networking on Mac OS X?

My simh configuration is:

 load -r /Local/Users/jreed/opt/pkg//share/simh/ka655x.bin
 set cpu 64m
 at nvr openbsd.nvram
 deposit rq qtime 1000000
 set rq0 ra92
 at rq0 openbsd.ra0.disk
 set rq2 cdrom
 at rq2 floppy48.fs
 at xq0 en0
 boot cpu
 exit

It does boot that OpenBSD image.

The output including OpenBSD kernel output follows:


VAX simulator V3.8-1
NVR: buffering file in memory
openbsd.simh> at xq0 en0
File open error


_______________________________________________
Simh mailing list
[email protected]
http://mailman.trailing-edge.com/mailman/listinfo/simh

Reply via email to