Login  •  Register


The time is now: Thu Nov 22, 2018 11:01 am

Emaculation wiki  •  Delete all board cookies



Post new topic  Reply to topic Page 1 of 2 [ 30 posts ]    Go to page 1, 2  Next
Print view Previous topic  |  Next topic
Author Message
PostPosted: Tue Apr 10, 2018 8:02 pm 
Offline
Student Driver

Joined: Tue Apr 10, 2018 7:24 pm
Posts: 14
I compiled the sheep_net driver on a Raspberry Pi running Raspbian Jessie, kernel 4.9.35-v7+ and received the error shown in the picture during make.
I set ether wlan0 in prefs. I've tried static and dynamic settings in the TCP/IP control panel. Networking doesn't work.
I'm using a System 8.1 install that I've tested with ether slirp in Windows and it works fine.

Any help or advice on the problem appreciated.

Image


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Apr 11, 2018 8:14 pm 
Offline
Mac Mechanic
User avatar

Joined: Mon Sep 15, 2014 7:59 pm
Posts: 156
It is a warning. You module should have been built according to your screenshot.
See user guide : https://github.com/cebix/macemu/tree/ma ... /NetDriver

_________________
There is an App for that!
https://github.com/rickyzhang82


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Apr 11, 2018 11:30 pm 
Offline
Student Driver

Joined: Tue Apr 10, 2018 7:24 pm
Posts: 14
Hi Ricky, thanks for replying. Yes I followed the instructions and didn't receive any error messages from Basilisk.
But the network does not work. I tried manual and dynamic IP addressing. I tested the Mac OS 8.1 install on
Basilisk/Windows and it works OK (preferences - ether slirp).

So my questions are:

1. Is "ether wlan0" in preferences correct? (wlan0 is the name of my wifi connection)
2. Are there any logs I can check for sheep_net.ko messages?
3. Is there any way to test sheep_net.ko outside of Basilisk?

Any help you can give is appreciated.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu Apr 12, 2018 12:25 am 
Offline
Mac Mechanic
User avatar

Joined: Mon Sep 15, 2014 7:59 pm
Posts: 156
1. Yes. It should be your physical NIC. ifconfig can print them out. Use the dropdown menu and pick it up.

2. Set DEBUG macro to 1 in line https://github.com/cebix/macemu/blob/ma ... net.c#L119
Use dmesg command to check the print out.

3. Yes, write your own user space program like BasiliskII to open/read/write /dev/sheep_net. But it is way too much work. I don't recommend it.

Base on the question you asked, you may not be an experienced kernel programmer. You can use wireshark to sniff the packet of you physical NIC and see what went wrong.

You'd better check if BasiliskII **actually** open /dev/sheep_net when boot your OS. Your settings may not even open the device at all.

_________________
There is an App for that!
https://github.com/rickyzhang82


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sat Apr 14, 2018 1:35 am 
Offline
Student Driver

Joined: Tue Apr 10, 2018 7:24 pm
Posts: 14
OK Ricky, I recompiled sheep_net.ko with DEBUG 1. Just to clarify, I'm running Basilisk without X, using SDL video/audio and no GUI config.
To obtain the output I did the following:

1. sudo modprobe sheep_net, sudo chown mac /dev/sheep_net
2. lsmod to check module has loaded (users 0)
3. Started Basilisk using System 7.5.5 Starterdisk.hfv file from this site, with OT 1.1.2 and icab
4. Set manual IP address, 192.168.1.75
5. Switched to tty2 and lsmod to check module has users (users 2)
6. Tried to open google.com in icab (Failed - network error)
7. Pinged my router 192.168.1.1 using OTTool 1.2.1 (Failed - no response)
8. Shut down Basilisk (no error messages)
9. dmesg > error.txt

Please let me know what you think.

Code:
[   35.050824] sheep_net: loading out-of-tree module taints kernel.
[   35.054071] sheep net: driver installed
[   60.930739] sheep_net: open
[   60.930761] sheep_net: ioctl 8911
[   60.930776] sheep_net: ioctl 8915
[   60.930951] sheep_net: poll
[   61.416454] sheep_net: packet received
[   61.433715] sheep_net: packet received
[   61.433729] sheep_net: drop incoming IP packet 94.177.187.22 for filter 0.0.0.0
[   62.416456] sheep_net: packet received
[   62.456725] sheep_net: packet received
[   62.456771] sheep_net: drop incoming IP packet 213.251.52.250 for filter 0.0.0.0
[   66.486801] sheep_net: packet received
[   66.493656] sheep_net: packet received
[   66.493670] sheep_net: retain incoming unicast IP packet 37.92.192.168
[   66.493700] sheep_net: poll
[   66.495862] sheep_net: read
[   66.495875] sheep_net: read
[   66.495916] sheep_net: poll
[   86.416559] sheep_net: packet received
[   86.439539] sheep_net: packet received
[   86.439561] sheep_net: drop incoming IP packet 193.204.114.233 for filter 0.0.0.0
[   88.416480] sheep_net: packet received
[   88.439509] sheep_net: packet received
[   88.439523] sheep_net: drop incoming IP packet 193.204.114.233 for filter 0.0.0.0
[   89.416535] sheep_net: packet received
[   89.743888] sheep_net: write
[   89.743899] sheep_net: ipfilter set to 192.168.1.75
[   89.743910] sheep_net: packet received
[   89.744272] sheep_net: ioctl 8931
[   89.782289] sheep_net: write
[   89.782310] sheep_net: packet received
[   89.785096] sheep_net: packet received
[   89.785105] sheep_net: retain incoming unicast IP packet 37.92.192.168
[   89.785124] sheep_net: poll
[   89.785148] sheep_net: read
[   89.785203] sheep_net: read
[   89.785218] sheep_net: poll
[   89.785841] sheep_net: write
[   89.785853] sheep_net: packet received
[   90.311527] sheep_net: write
[   90.311548] sheep_net: packet received
[   90.416487] sheep_net: packet received
[   90.439439] sheep_net: packet received
[   90.439452] sheep_net: drop incoming IP packet 193.204.114.233 for filter 192.168.1.75
[   91.342290] sheep_net: write
[   91.342311] sheep_net: packet received
[   92.416488] sheep_net: packet received
[   92.439567] sheep_net: packet received
[   92.439580] sheep_net: drop incoming IP packet 193.204.114.233 for filter 192.168.1.75
[   93.403791] sheep_net: write
[   93.403812] sheep_net: packet received
[   94.416491] sheep_net: packet received
[   94.439704] sheep_net: packet received
[   94.439718] sheep_net: drop incoming IP packet 193.204.114.233 for filter 192.168.1.75
[   96.416555] sheep_net: packet received
[   96.440120] sheep_net: packet received
[   96.440143] sheep_net: drop incoming IP packet 193.204.114.233 for filter 192.168.1.75
[   97.510507] sheep_net: write
[   97.510537] sheep_net: packet received
[  108.976605] sheep_net: packet received
[  108.976631] sheep_net: poll
[  108.976666] sheep_net: read
[  108.976711] sheep_net: read
[  108.976725] sheep_net: poll
[  115.046881] sheep_net: packet received
[  115.046943] sheep_net: poll
[  115.047002] sheep_net: read
[  115.047087] sheep_net: read
[  115.047568] sheep_net: poll
[  123.416525] sheep_net: packet received
[  123.433943] sheep_net: packet received
[  123.433953] sheep_net: drop incoming IP packet 94.177.187.22 for filter 192.168.1.75
[  126.416527] sheep_net: packet received
[  126.462604] sheep_net: packet received
[  126.462618] sheep_net: drop incoming IP packet 213.251.52.250 for filter 192.168.1.75
[  131.446886] sheep_net: packet received
[  131.451490] sheep_net: packet received
[  131.451503] sheep_net: retain incoming unicast IP packet 37.92.192.168
[  131.451533] sheep_net: poll
[  131.451701] sheep_net: read
[  131.451786] sheep_net: read
[  131.451810] sheep_net: poll
[  140.576028] sheep_net: ioctl 8931
[  140.583499] sheep_net: write
[  140.583525] sheep_net: packet received
[  140.583541] sheep_net: packet received
[  140.801681] sheep_net: write
[  140.801708] sheep_net: packet received
[  140.801728] sheep_net: packet received
[  141.018185] sheep_net: write
[  141.018210] sheep_net: packet received
[  141.018234] sheep_net: packet received
[  141.234442] sheep_net: write
[  141.234468] sheep_net: packet received
[  141.234492] sheep_net: packet received
[  141.450031] sheep_net: write
[  141.450057] sheep_net: packet received
[  141.450079] sheep_net: packet received
[  141.666167] sheep_net: write
[  141.666192] sheep_net: packet received
[  141.666214] sheep_net: packet received
[  141.882275] sheep_net: write
[  141.882300] sheep_net: packet received
[  141.882319] sheep_net: packet received
[  142.098911] sheep_net: write
[  142.098935] sheep_net: packet received
[  142.098959] sheep_net: packet received
[  142.314537] sheep_net: write
[  142.314561] sheep_net: packet received
[  142.314583] sheep_net: packet received
[  142.530602] sheep_net: write
[  142.530627] sheep_net: packet received
[  142.530647] sheep_net: packet received
[  142.747108] sheep_net: write
[  142.747132] sheep_net: packet received
[  142.747151] sheep_net: packet received
[  143.262211] sheep_net: write
[  143.262238] sheep_net: packet received
[  143.262259] sheep_net: packet received
[  143.777572] sheep_net: write
[  143.777597] sheep_net: packet received
[  143.777617] sheep_net: packet received
[  144.292964] sheep_net: write
[  144.292989] sheep_net: packet received
[  144.293010] sheep_net: packet received
[  144.808335] sheep_net: write
[  144.808360] sheep_net: packet received
[  144.808379] sheep_net: packet received
[  145.324078] sheep_net: write
[  145.324102] sheep_net: packet received
[  145.324124] sheep_net: packet received
[  155.416617] sheep_net: packet received
[  155.440212] sheep_net: packet received
[  155.440233] sheep_net: drop incoming IP packet 193.204.114.233 for filter 192.168.1.75
[  157.799851] sheep_net: write
[  157.799869] sheep_net: packet received
[  158.416570] sheep_net: packet received
[  158.440184] sheep_net: packet received
[  158.440204] sheep_net: drop incoming IP packet 37.247.53.178 for filter 192.168.1.75
[  159.788814] sheep_net: write
[  159.788842] sheep_net: packet received
[  161.783790] sheep_net: write
[  161.783819] sheep_net: packet received
[  163.778805] sheep_net: write
[  163.778834] sheep_net: packet received
[  165.773792] sheep_net: write
[  165.773821] sheep_net: packet received
[  180.415866] sheep_net: ioctl 8932
[  180.921692] sheep_net: ioctl 8932
[  181.241290] sheep_net: poll
[  181.241367] sheep_net: close


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Mon Apr 16, 2018 6:29 pm 
Offline
Mac Mechanic
User avatar

Joined: Mon Sep 15, 2014 7:59 pm
Posts: 156
That's great. Sheep_net did get loaded and unloaded by BasiliskII. It did receive and response to some weird IP address.

What's your host OS IP address? In any case, it must be different from your emulated guest Mac OS IP (192.168.1.75). That's called IP alias where the same MAC address in your host OS shared different IP at the same time.

If it is different from your guest OS IP, can you ping from another physical machine (rather than your host machine) to your Mac OS IP (192.168.1.75)?

You'd better debug it in a controlled environment. i.e. Don't mess with DNS for now. (in other word, don't try to http to a URL like google.com). This requires that you set up DNS properly in your guest Mac OS.

Let's make sure that you can ping from another physical machine to your Mac OS IP.

_________________
There is an App for that!
https://github.com/rickyzhang82


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue Apr 17, 2018 4:14 am 
Offline
Student Driver

Joined: Tue Apr 10, 2018 7:24 pm
Posts: 14
The host IP from DHCP is definitely different to the guest IP I set manually. Mac OS does not respond to pings from
a different physical machine. However, today I tried a cabled connection (ether eth0 in prefs) and networking in Mac OS
works perfectly, ping both ways, DNS, and google.com loaded. The only thing that didn't work is DHCP.

So my question now, is can you think of any reason why sheep_net works with eth0 and not wlan0? The wifi connection
works fine on the host. I used it to get the source code and I've tested it at each stage before starting Basilisk.

This is the DEBUG output from the working eth0 test. I noticed that it doesn't say "drop incoming IP packet * for filter 192.168.1.75"
as it did in the failed wlan0 output in my previous post.

Code:
[   44.592222] sheep_net: loading out-of-tree module taints kernel.
[   44.592770] sheep net: driver installed
[   56.279235] sheep_net: open
[   56.279256] sheep_net: ioctl 8911
[   56.279274] sheep_net: ioctl 8915
[   56.279442] sheep_net: poll
[   60.664210] sheep_net: packet received
[   65.664254] sheep_net: packet received
[   65.681559] sheep_net: packet received
[   65.681597] sheep_net: drop incoming IP packet 31.14.131.188 for filter 0.0.0.0
[   65.685931] sheep_net: packet received
[   65.690707] sheep_net: packet received
[   65.690719] sheep_net: retain incoming unicast IP packet 37.92.192.168
[   65.690887] sheep_net: poll
[   65.693216] sheep_net: read
[   65.693229] sheep_net: read
[   65.693269] sheep_net: poll
[   73.204607] sheep_net: packet received
[   73.204644] sheep_net: drop incoming IP packet 192.168.1.1 for filter 0.0.0.0
[   75.205941] sheep_net: packet received
[   75.205969] sheep_net: drop incoming IP packet 192.168.1.18 for filter 0.0.0.0
[   88.388850] sheep_net: packet received
[   88.388876] sheep_net: drop incoming IP packet 192.168.1.253 for filter 0.0.0.0
[   89.664397] sheep_net: packet received
[   90.096872] sheep_net: write
[   90.096887] sheep_net: ipfilter set to 192.168.1.75
[   90.096899] sheep_net: packet received
[   90.097224] sheep_net: ioctl 8931
[   90.134294] sheep_net: write
[   90.134315] sheep_net: packet received
[   90.139119] sheep_net: packet received
[   90.139140] sheep_net: retain incoming unicast IP packet 37.92.192.168
[   90.139575] sheep_net: poll
[   90.139604] sheep_net: read
[   90.139675] sheep_net: read
[   90.139692] sheep_net: poll
[   90.140365] sheep_net: write
[   90.140381] sheep_net: packet received
[   90.158548] sheep_net: packet received
[   90.158902] sheep_net: poll
[   90.158944] sheep_net: read
[   90.158996] sheep_net: read
[   90.159011] sheep_net: poll
[   90.159409] sheep_net: write
[   90.159423] sheep_net: packet received
[   90.163211] sheep_net: packet received
[   90.163221] sheep_net: retain incoming unicast IP packet 192.168.1.1
[   90.163257] sheep_net: poll
[   90.163272] sheep_net: read
[   90.163310] sheep_net: read
[   90.163326] sheep_net: poll
[   90.353233] sheep_net: write
[   90.353252] sheep_net: packet received
[   90.383479] sheep_net: packet received
[   90.383502] sheep_net: retain incoming unicast IP packet 172.217.19.36
[   90.383623] sheep_net: poll
[   90.383666] sheep_net: read
[   90.383722] sheep_net: read
[   90.383740] sheep_net: poll
[   90.418849] sheep_net: write
[   90.418872] sheep_net: packet received
[   90.447627] sheep_net: packet received
[   90.447652] sheep_net: retain incoming unicast IP packet 172.217.19.36
[   90.447679] sheep_net: poll
[   90.447782] sheep_net: read
[   90.447828] sheep_net: read
[   90.447846] sheep_net: poll
[   90.449023] sheep_net: packet received
[   90.449030] sheep_net: retain incoming unicast IP packet 172.217.19.36
[   90.449050] sheep_net: poll
[   90.449066] sheep_net: read
[   90.449106] sheep_net: read
[   90.449119] sheep_net: poll
[   90.450472] sheep_net: packet received
[   90.450477] sheep_net: retain incoming unicast IP packet 172.217.19.36
[   90.450490] sheep_net: poll
[   90.450502] sheep_net: read
[   90.450531] sheep_net: read
[   90.450543] sheep_net: poll
[   90.450906] sheep_net: write
[   90.450920] sheep_net: packet received
[   90.590285] sheep_net: write
[   90.590307] sheep_net: packet received
[   90.644951] sheep_net: write
[   90.644972] sheep_net: packet received
[   90.659486] sheep_net: packet received
[   90.659497] sheep_net: retain incoming unicast IP packet 192.168.1.1
[   90.659517] sheep_net: poll
[   90.659559] sheep_net: read
[   90.659605] sheep_net: read
[   90.659621] sheep_net: poll
[   90.664299] sheep_net: packet received
[   90.723700] sheep_net: write
[   90.723721] sheep_net: packet received
[   90.757342] sheep_net: packet received
[   90.757363] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   90.757395] sheep_net: poll
[   90.757461] sheep_net: read
[   90.757523] sheep_net: read
[   90.757543] sheep_net: poll
[   90.799885] sheep_net: write
[   90.799908] sheep_net: packet received
[   90.832592] sheep_net: packet received
[   90.832603] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   90.832628] sheep_net: poll
[   90.832670] sheep_net: read
[   90.832713] sheep_net: read
[   90.832728] sheep_net: poll
[   90.876848] sheep_net: packet received
[   90.876869] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   90.876908] sheep_net: poll
[   90.876954] sheep_net: read
[   90.876983] sheep_net: packet received
[   90.876987] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   90.877018] sheep_net: read
[   90.877042] sheep_net: read
[   90.877064] sheep_net: poll
[   90.877163] sheep_net: packet received
[   90.877166] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   90.877183] sheep_net: poll
[   90.877202] sheep_net: read
[   90.877229] sheep_net: read
[   90.877239] sheep_net: poll
[   90.877918] sheep_net: packet received
[   90.877922] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   90.877940] sheep_net: poll
[   90.877960] sheep_net: read
[   90.877989] sheep_net: read
[   90.878000] sheep_net: poll
[   90.878582] sheep_net: write
[   90.878594] sheep_net: packet received
[   90.878670] sheep_net: packet received
[   90.878674] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   90.878692] sheep_net: poll
[   90.878709] sheep_net: read
[   90.878736] sheep_net: read
[   90.878746] sheep_net: poll
[   90.878858] sheep_net: packet received
[   90.878862] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   90.878874] sheep_net: poll
[   90.878890] sheep_net: read
[   90.878917] sheep_net: read
[   90.878927] sheep_net: poll
[   90.879050] sheep_net: packet received
[   90.879053] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   90.879067] sheep_net: poll
[   90.879083] sheep_net: read
[   90.879108] sheep_net: read
[   90.879118] sheep_net: poll
[   90.879812] sheep_net: packet received
[   90.879817] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   90.879833] sheep_net: poll
[   90.879852] sheep_net: read
[   90.879879] sheep_net: read
[   90.879889] sheep_net: poll
[   90.880011] sheep_net: packet received
[   90.880015] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   90.880028] sheep_net: poll
[   90.880044] sheep_net: read
[   90.880069] sheep_net: read
[   90.880080] sheep_net: poll
[   90.880119] sheep_net: write
[   90.880127] sheep_net: packet received
[   90.882583] sheep_net: write
[   90.882591] sheep_net: packet received
[   90.892791] sheep_net: packet received
[   90.892802] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   90.892830] sheep_net: poll
[   90.892885] sheep_net: read
[   90.892957] sheep_net: read
[   90.892973] sheep_net: poll
[   90.894070] sheep_net: write
[   90.894085] sheep_net: packet received
[   90.914438] sheep_net: packet received
[   90.914450] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   90.914489] sheep_net: poll
[   90.914525] sheep_net: read
[   90.914580] sheep_net: read
[   90.914597] sheep_net: poll
[   90.914605] sheep_net: packet received
[   90.914609] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   90.914621] sheep_net: poll
[   90.914637] sheep_net: read
[   90.914662] sheep_net: read
[   90.914673] sheep_net: poll
[   90.927411] sheep_net: packet received
[   90.927421] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   90.927446] sheep_net: poll
[   90.927536] sheep_net: read
[   90.927597] sheep_net: read
[   90.927612] sheep_net: poll
[   90.928689] sheep_net: packet received
[   90.928694] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   90.928713] sheep_net: poll
[   90.928731] sheep_net: read
[   90.928772] sheep_net: read
[   90.928783] sheep_net: poll
[   90.928875] sheep_net: packet received
[   90.928878] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   90.928892] sheep_net: poll
[   90.928907] sheep_net: read
[   90.928933] sheep_net: read
[   90.928943] sheep_net: poll
[   90.929474] sheep_net: packet received
[   90.929478] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   90.929493] sheep_net: poll
[   90.929507] sheep_net: read
[   90.929532] sheep_net: read
[   90.929542] sheep_net: poll
[   90.929665] sheep_net: packet received
[   90.929669] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   90.929680] sheep_net: poll
[   90.929695] sheep_net: read
[   90.929720] sheep_net: read
[   90.929730] sheep_net: poll
[   90.929982] sheep_net: write
[   90.929993] sheep_net: packet received
[   90.930301] sheep_net: packet received
[   90.930304] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   90.930319] sheep_net: poll
[   90.930335] sheep_net: read
[   90.930359] sheep_net: read
[   90.930370] sheep_net: poll
[   90.930498] sheep_net: packet received
[   90.930501] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   90.930514] sheep_net: poll
[   90.930531] sheep_net: read
[   90.930556] sheep_net: read
[   90.930566] sheep_net: poll
[   90.933567] sheep_net: packet received
[   90.933571] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   90.933590] sheep_net: poll
[   90.933611] sheep_net: read
[   90.933654] sheep_net: read
[   90.933667] sheep_net: poll
[   90.934197] sheep_net: packet received
[   90.934201] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   90.934215] sheep_net: poll
[   90.934232] sheep_net: read
[   90.934270] sheep_net: read
[   90.934281] sheep_net: poll
[   90.934394] sheep_net: packet received
[   90.934397] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   90.934410] sheep_net: poll
[   90.934424] sheep_net: read
[   90.934449] sheep_net: read
[   90.934460] sheep_net: poll
[   90.934989] sheep_net: write
[   90.934998] sheep_net: packet received
[   90.964204] sheep_net: packet received
[   90.964215] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   90.964255] sheep_net: poll
[   90.964292] sheep_net: read
[   90.964348] sheep_net: read
[   90.964367] sheep_net: poll
[   90.964386] sheep_net: packet received
[   90.964390] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   90.964405] sheep_net: poll
[   90.964419] sheep_net: read
[   90.964446] sheep_net: read
[   90.964457] sheep_net: poll
[   90.968681] sheep_net: packet received
[   90.968692] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   90.968733] sheep_net: poll
[   90.968764] sheep_net: read
[   90.968816] sheep_net: read
[   90.968833] sheep_net: poll
[   90.970215] sheep_net: packet received
[   90.970219] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   90.970239] sheep_net: poll
[   90.970259] sheep_net: read
[   90.970277] sheep_net: packet received
[   90.970280] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   90.970302] sheep_net: read
[   90.970325] sheep_net: read
[   90.970337] sheep_net: poll
[   90.970450] sheep_net: packet received
[   90.970454] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   90.970466] sheep_net: poll
[   90.970481] sheep_net: read
[   90.970501] sheep_net: read
[   90.970512] sheep_net: poll
[   90.972264] sheep_net: write
[   90.972275] sheep_net: packet received
[   90.972991] sheep_net: packet received
[   90.972995] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   90.973010] sheep_net: poll
[   90.973028] sheep_net: read
[   90.973064] sheep_net: read
[   90.973075] sheep_net: poll
[   90.973935] sheep_net: write
[   90.973941] sheep_net: packet received
[   91.288933] sheep_net: write
[   91.288955] sheep_net: packet received
[   91.596470] sheep_net: write
[   91.596491] sheep_net: packet received
[   91.664302] sheep_net: packet received
[   93.664287] sheep_net: packet received
[   95.664292] sheep_net: packet received
[   96.003186] sheep_net: write
[   96.003208] sheep_net: packet received
[   96.018379] sheep_net: packet received
[   96.018403] sheep_net: retain incoming unicast IP packet 192.168.1.1
[   96.018442] sheep_net: poll
[   96.018483] sheep_net: read
[   96.018532] sheep_net: read
[   96.018549] sheep_net: poll
[   96.045332] sheep_net: write
[   96.045351] sheep_net: packet received
[   96.075148] sheep_net: packet received
[   96.075159] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   96.075187] sheep_net: poll
[   96.075229] sheep_net: read
[   96.075268] sheep_net: read
[   96.075282] sheep_net: poll
[   96.131467] sheep_net: write
[   96.131488] sheep_net: packet received
[   96.406596] sheep_net: write
[   96.406615] sheep_net: packet received
[   96.433694] sheep_net: packet received
[   96.433727] sheep_net: retain incoming unicast IP packet 216.58.205.35
[   96.433772] sheep_net: poll
[   96.433811] sheep_net: read
[   96.433862] sheep_net: read
[   96.433882] sheep_net: poll
[   96.481721] sheep_net: write
[   96.481744] sheep_net: packet received
[   96.497220] sheep_net: write
[   96.497237] sheep_net: packet received
[   96.511420] sheep_net: packet received
[   96.511440] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   96.511494] sheep_net: poll
[   96.511535] sheep_net: read
[   96.511587] sheep_net: read
[   96.511604] sheep_net: poll
[   96.527754] sheep_net: packet received
[   96.527765] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   96.527790] sheep_net: poll
[   96.527833] sheep_net: read
[   96.527892] sheep_net: read
[   96.527906] sheep_net: poll
[   96.528471] sheep_net: packet received
[   96.528475] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   96.528492] sheep_net: poll
[   96.528508] sheep_net: read
[   96.528534] sheep_net: read
[   96.528545] sheep_net: poll
[   96.528663] sheep_net: packet received
[   96.528666] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   96.528679] sheep_net: poll
[   96.528694] sheep_net: read
[   96.528720] sheep_net: read
[   96.528730] sheep_net: poll
[   96.528752] sheep_net: write
[   96.528764] sheep_net: packet received
[   96.528861] sheep_net: packet received
[   96.528865] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   96.528874] sheep_net: packet received
[   96.528877] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   96.528879] sheep_net: poll
[   96.528894] sheep_net: read
[   96.528919] sheep_net: read
[   96.528931] sheep_net: read
[   96.528941] sheep_net: poll
[   96.529766] sheep_net: write
[   96.529771] sheep_net: packet received
[   96.530324] sheep_net: packet received
[   96.530328] sheep_net: retain incoming unicast IP packet 172.217.19.35
[   96.530342] sheep_net: poll
[   96.530358] sheep_net: read
[   96.530372] sheep_net: read
[   96.530382] sheep_net: poll
[   96.530584] sheep_net: write
[   96.530589] sheep_net: packet received
[   96.530925] sheep_net: write
[   96.530930] sheep_net: packet received
[   96.565983] sheep_net: write
[   96.566006] sheep_net: packet received
[   96.591550] sheep_net: packet received
[   96.591561] sheep_net: retain incoming unicast IP packet 216.58.205.35
[   96.591593] sheep_net: packet received
[   96.591596] sheep_net: retain incoming unicast IP packet 216.58.205.35
[   96.591598] sheep_net: poll
[   96.591603] sheep_net: packet received
[   96.591606] sheep_net: retain incoming unicast IP packet 216.58.205.35
[   96.591637] sheep_net: read
[   96.591677] sheep_net: read
[   96.591690] sheep_net: read
[   96.591700] sheep_net: read
[   96.591718] sheep_net: poll
[   96.592392] sheep_net: write
[   96.592405] sheep_net: packet received
[   96.917860] sheep_net: write
[   96.917881] sheep_net: packet received
[   97.099486] sheep_net: write
[   97.099506] sheep_net: packet received
[   97.664310] sheep_net: packet received
[   99.664363] sheep_net: packet received
[  118.861888] sheep_net: ioctl 8931
[  118.868731] sheep_net: write
[  118.868757] sheep_net: packet received
[  118.868786] sheep_net: packet received
[  119.074028] sheep_net: write
[  119.074055] sheep_net: packet received
[  119.074089] sheep_net: packet received
[  119.290104] sheep_net: write
[  119.290129] sheep_net: packet received
[  119.290158] sheep_net: packet received
[  119.506221] sheep_net: write
[  119.506245] sheep_net: packet received
[  119.506274] sheep_net: packet received
[  119.722352] sheep_net: write
[  119.722375] sheep_net: packet received
[  119.722401] sheep_net: packet received
[  119.938496] sheep_net: write
[  119.938523] sheep_net: packet received
[  119.938549] sheep_net: packet received
[  120.154608] sheep_net: write
[  120.154631] sheep_net: packet received
[  120.154659] sheep_net: packet received
[  120.370734] sheep_net: write
[  120.370758] sheep_net: packet received
[  120.370785] sheep_net: packet received
[  120.586858] sheep_net: write
[  120.586882] sheep_net: packet received
[  120.586912] sheep_net: packet received
[  120.802960] sheep_net: write
[  120.802986] sheep_net: packet received
[  120.803006] sheep_net: packet received
[  121.019453] sheep_net: write
[  121.019478] sheep_net: packet received
[  121.019503] sheep_net: packet received
[  121.534522] sheep_net: write
[  121.534546] sheep_net: packet received
[  121.534576] sheep_net: packet received
[  122.049921] sheep_net: write
[  122.049946] sheep_net: packet received
[  122.049974] sheep_net: packet received
[  122.565288] sheep_net: write
[  122.565313] sheep_net: packet received
[  122.565342] sheep_net: packet received
[  122.664392] sheep_net: packet received
[  123.081099] sheep_net: write
[  123.081124] sheep_net: packet received
[  123.081151] sheep_net: packet received
[  123.596052] sheep_net: write
[  123.596107] sheep_net: packet received
[  123.596146] sheep_net: packet received
[  127.846110] sheep_net: packet received
[  127.849964] sheep_net: packet received
[  127.849986] sheep_net: retain incoming unicast IP packet 37.92.192.168
[  127.850014] sheep_net: poll
[  127.850068] sheep_net: read
[  127.850141] sheep_net: read
[  127.850156] sheep_net: poll
[  129.664451] sheep_net: packet received
[  129.682229] sheep_net: packet received
[  129.682262] sheep_net: drop incoming IP packet 31.14.131.188 for filter 192.168.1.75
[  131.425908] sheep_net: write
[  131.425929] sheep_net: packet received
[  131.440925] sheep_net: packet received
[  131.440944] sheep_net: retain incoming unicast IP packet 192.168.1.1
[  131.441047] sheep_net: poll
[  131.441093] sheep_net: read
[  131.441142] sheep_net: read
[  131.441159] sheep_net: poll
[  132.458618] sheep_net: write
[  132.458647] sheep_net: packet received
[  132.471530] sheep_net: packet received
[  132.471557] sheep_net: retain incoming unicast IP packet 192.168.1.1
[  132.471662] sheep_net: poll
[  132.471734] sheep_net: read
[  132.471813] sheep_net: read
[  132.471849] sheep_net: poll
[  133.489367] sheep_net: write
[  133.489397] sheep_net: packet received
[  133.502272] sheep_net: packet received
[  133.502299] sheep_net: retain incoming unicast IP packet 192.168.1.1
[  133.502406] sheep_net: poll
[  133.502479] sheep_net: read
[  133.502559] sheep_net: read
[  133.502591] sheep_net: poll
[  134.522316] sheep_net: write
[  134.522345] sheep_net: packet received
[  134.535491] sheep_net: packet received
[  134.535518] sheep_net: retain incoming unicast IP packet 192.168.1.1
[  134.535570] sheep_net: poll
[  134.535620] sheep_net: read
[  134.535696] sheep_net: read
[  134.535724] sheep_net: poll
[  135.550857] sheep_net: write
[  135.550886] sheep_net: packet received
[  135.563794] sheep_net: packet received
[  135.563822] sheep_net: retain incoming unicast IP packet 192.168.1.1
[  135.563864] sheep_net: poll
[  135.563937] sheep_net: read
[  135.564026] sheep_net: read
[  135.564059] sheep_net: poll
[  146.903433] sheep_net: packet received
[  146.903492] sheep_net: poll
[  146.903563] sheep_net: read
[  146.903649] sheep_net: read
[  146.903679] sheep_net: poll
[  146.904678] sheep_net: write
[  146.904703] sheep_net: packet received
[  146.909471] sheep_net: packet received
[  146.909485] sheep_net: retain incoming unicast IP packet 192.168.1.17
[  146.909526] sheep_net: poll
[  146.909587] sheep_net: read
[  146.909659] sheep_net: read
[  146.909684] sheep_net: poll
[  146.911294] sheep_net: write
[  146.911316] sheep_net: packet received
[  147.912575] sheep_net: packet received
[  147.912604] sheep_net: retain incoming unicast IP packet 192.168.1.17
[  147.912650] sheep_net: poll
[  147.912714] sheep_net: read
[  147.912794] sheep_net: read
[  147.912824] sheep_net: poll
[  147.913642] sheep_net: write
[  147.913668] sheep_net: packet received
[  148.944314] sheep_net: packet received
[  148.944343] sheep_net: retain incoming unicast IP packet 192.168.1.17
[  148.944389] sheep_net: poll
[  148.944454] sheep_net: read
[  148.944536] sheep_net: read
[  148.944567] sheep_net: poll
[  148.945388] sheep_net: write
[  148.945414] sheep_net: packet received
[  149.959536] sheep_net: packet received
[  149.959563] sheep_net: retain incoming unicast IP packet 192.168.1.17
[  149.959608] sheep_net: poll
[  149.959670] sheep_net: read
[  149.959748] sheep_net: read
[  149.959776] sheep_net: poll
[  149.960661] sheep_net: write
[  149.960688] sheep_net: packet received
[  156.664612] sheep_net: packet received
[  157.664594] sheep_net: packet received
[  161.686256] sheep_net: packet received
[  161.690013] sheep_net: packet received
[  161.690038] sheep_net: retain incoming unicast IP packet 37.92.192.168
[  161.690079] sheep_net: poll
[  161.690159] sheep_net: read
[  161.690246] sheep_net: read
[  161.690273] sheep_net: poll
[  170.093550] sheep_net: ioctl 8932
[  170.138807] sheep_net: ioctl 8932
[  170.459589] sheep_net: poll
[  170.459679] sheep_net: close


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue Apr 17, 2018 5:16 pm 
Offline
Mac Mechanic
User avatar

Joined: Mon Sep 15, 2014 7:59 pm
Posts: 156
1. DHCP on your guest OS will NEVER work. Because from the outside, it only see your host physical MAC address and two different IP (if you manual specify IP correctly, one for your host OS and another for your emulated guest OS). Your router will NOT see the fake MAC address in your guest OS.

2. I suspect that you may mis-specify your wlan card name in Basilsik II pref file. Are your sure that wlan name wlan0 in your box? try ifconfig command.

3. Regarding to your observation about IP filter, I want to add that:
a. v->ipfilter initialize with 0.0.0.0. It get updated with your manually specified IP whenever you send packet out from your guest emulated OS, eg ping from Mac to outside.

b. In your lan case (the second one), your guest OS IP (v->ipfilter) is 0.0.0.0. In this temporary moment, sheep_net will not drop any IP packet received from outside at all. This also implies that you haven't send any packet out, either. That's why it is still 0.0.0.0 for the moment. Once you send packet, ipfilter will change accordingly.

c. In your wlan case (the first one), your guest OS IP (v->ipfilter) is 192.168.1.75. That implies you may have send packet to outside from your guest OS.

e. Your observation is incorrect. In your second case, it does have drop packet filter:
Quote:
[ 129.682262] sheep_net: drop incoming IP packet 31.14.131.188 for filter 192.168.1.75


In summary, I don't think it is related to your physical NIC either lan or wlan. Please specify your ifconfig from host OS, gateway and netmask from your guest OS.

See below code snippet:
Code:
   /* Apply any filters here (if fake is true, then we *know* we want this packet) */
   if (!fake) {
      if ((skb->protocol == htons(ETH_P_IP))
       && (!v->ipfilter || (ntohl(ip_hdr(skb)->daddr) != v->ipfilter && !multicast))) {
#if DEBUG
         char source[16];
         snprintf(source, 16, "%pI4", &ip_hdr(skb)->saddr);
         D(bug("sheep_net: drop incoming IP packet %s for filter %d.%d.%d.%d\n",
                source,
                (v->ipfilter >> 24) & 0xff, (v->ipfilter >> 16) & 0xff, (v->ipfilter >> 8) & 0xff, v->ipfilter & 0xff));
#endif
         goto drop;
      }



BTW, if you use SDL in Linux, you can build GTK pref UI with GTK dev package. See my sample build script:
https://github.com/rickyzhang82/macemu/ ... x/build.sh

_________________
There is an App for that!
https://github.com/rickyzhang82


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue Apr 17, 2018 5:23 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 2275
Location: Emaculation.com
It's a bit tangential, but I seem to recall discussion on here in the past that many WLAN NICs don't support all the traffic handled by wired NICs, specifically AppleTalk. This shouldn't be an issue for TCP ping traffic, but if you're doing further tests you may experience similar problems for different reasons.

Also, what happens if you create a virtual network device that talks to both your WLAN and wired NIC? Do you get the same traffic out of both? If not, it could be the NIC hardware, or it could be local rules set up to filter the WLAN NIC that are interfering.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue Apr 17, 2018 7:42 pm 
Offline
Student Driver

Joined: Tue Apr 10, 2018 7:24 pm
Posts: 14
Point noted about DHCP and thanks for the background on ipfilter in sheep_net. I'm using Basilisk via SDL with a framebuffer
backend (no Xorg, no GTK) so I won't be able to use GTK preferences. My ifconfig is as follows:

eth0 192.168.1.24
wlan0 192.168.1.23
gateway/DNS 192.168.1.1
netmask 255.255.255.0
MacOS IP 192.168.1.75

The wifi interface name is definitely wlan0.
I captured the DEBUG output again for both interfaces, this time with just 5 pings to 192.168.1.1
You can see the "retain incoming unicast IP packet 192.168.1.1" present for eth0 but not for wlan0.

adespoton thanks for the suggestions, I don't have iptables installed on the host, so I don't think there are any rules
that could be affecting the wlan0 interface. If I'm wrong about that please let me know.

ether eth0 (success):

Code:
[   31.074974] sheep_net: loading out-of-tree module taints kernel.
[   31.075561] sheep net: driver installed
[   44.128104] sheep_net: open
[   44.128126] sheep_net: ioctl 8911
[   44.128142] sheep_net: ioctl 8915
[   44.128321] sheep_net: poll
[   54.172774] sheep_net: ioctl 8931
[   54.179476] sheep_net: write
[   54.179501] sheep_net: packet received
[   54.179530] sheep_net: packet received
[   54.388643] sheep_net: write
[   54.388670] sheep_net: packet received
[   54.388700] sheep_net: packet received
[   54.605176] sheep_net: write
[   54.605200] sheep_net: packet received
[   54.605223] sheep_net: packet received
[   54.821229] sheep_net: write
[   54.821254] sheep_net: packet received
[   54.821299] sheep_net: packet received
[   55.036984] sheep_net: write
[   55.037015] sheep_net: packet received
[   55.037043] sheep_net: packet received
[   55.253090] sheep_net: write
[   55.253111] sheep_net: packet received
[   55.253136] sheep_net: packet received
[   55.469230] sheep_net: write
[   55.469252] sheep_net: packet received
[   55.469297] sheep_net: packet received
[   55.685352] sheep_net: write
[   55.685376] sheep_net: packet received
[   55.685420] sheep_net: packet received
[   55.901465] sheep_net: write
[   55.901485] sheep_net: packet received
[   55.901509] sheep_net: packet received
[   56.117572] sheep_net: write
[   56.117593] sheep_net: packet received
[   56.117619] sheep_net: packet received
[   56.334012] sheep_net: write
[   56.334035] sheep_net: packet received
[   56.334056] sheep_net: packet received
[   56.849164] sheep_net: write
[   56.849186] sheep_net: packet received
[   56.849211] sheep_net: packet received
[   57.364534] sheep_net: write
[   57.364556] sheep_net: packet received
[   57.364582] sheep_net: packet received
[   57.879910] sheep_net: write
[   57.879932] sheep_net: packet received
[   57.879958] sheep_net: packet received
[   58.395285] sheep_net: write
[   58.395307] sheep_net: packet received
[   58.395326] sheep_net: packet received
[   58.910670] sheep_net: write
[   58.910692] sheep_net: packet received
[   58.910718] sheep_net: packet received
[   59.544058] sheep_net: write
[   59.544072] sheep_net: ipfilter set to 192.168.1.75
[   59.544085] sheep_net: packet received
[   59.544435] sheep_net: ioctl 8931
[   64.530837] sheep_net: write
[   64.530856] sheep_net: packet received
[   64.535717] sheep_net: packet received
[   64.535737] sheep_net: retain incoming unicast IP packet 37.92.192.168
[   64.535776] sheep_net: poll
[   64.537078] sheep_net: read
[   64.537160] sheep_net: read
[   64.537193] sheep_net: poll
[   64.537892] sheep_net: write
[   64.537907] sheep_net: packet received
[   64.542777] sheep_net: packet received
[   64.542807] sheep_net: poll
[   64.542924] sheep_net: read
[   64.542964] sheep_net: read
[   64.542978] sheep_net: poll
[   64.543408] sheep_net: write
[   64.543427] sheep_net: packet received
[   64.556143] sheep_net: packet received
[   64.556153] sheep_net: retain incoming unicast IP packet 192.168.1.1
[   64.556173] sheep_net: poll
[   64.556209] sheep_net: read
[   64.556253] sheep_net: read
[   64.556269] sheep_net: poll
[   65.287936] sheep_net: packet received
[   65.335631] sheep_net: packet received
[   65.335660] sheep_net: drop incoming IP packet 85.199.214.99 for filter 192.168.1.75
[   65.612017] sheep_net: write
[   65.612044] sheep_net: packet received
[   65.627620] sheep_net: packet received
[   65.627651] sheep_net: retain incoming unicast IP packet 192.168.1.1
[   65.627709] sheep_net: poll
[   65.627756] sheep_net: read
[   65.627831] sheep_net: read
[   65.627860] sheep_net: poll
[   66.642702] sheep_net: write
[   66.642728] sheep_net: packet received
[   66.655542] sheep_net: packet received
[   66.655567] sheep_net: retain incoming unicast IP packet 192.168.1.1
[   66.655613] sheep_net: poll
[   66.655690] sheep_net: read
[   66.655770] sheep_net: read
[   66.655799] sheep_net: poll
[   67.673406] sheep_net: write
[   67.673435] sheep_net: packet received
[   67.686245] sheep_net: packet received
[   67.686271] sheep_net: retain incoming unicast IP packet 192.168.1.1
[   67.686319] sheep_net: poll
[   67.686397] sheep_net: read
[   67.686475] sheep_net: read
[   67.686503] sheep_net: poll
[   68.704245] sheep_net: write
[   68.704275] sheep_net: packet received
[   68.717552] sheep_net: packet received
[   68.717580] sheep_net: retain incoming unicast IP packet 192.168.1.1
[   68.717640] sheep_net: poll
[   68.717721] sheep_net: read
[   68.717798] sheep_net: read
[   68.717827] sheep_net: poll
[   80.386886] sheep_net: ioctl 8932
[   80.425938] sheep_net: ioctl 8932
[   80.757946] sheep_net: poll
[   80.758044] sheep_net: close


ether wlan0 (failed)

Code:
[  929.568415] sheep_net: loading out-of-tree module taints kernel.
[  929.569707] sheep net: driver installed
[  947.434205] sheep_net: open
[  947.434226] sheep_net: ioctl 8911
[  947.434242] sheep_net: ioctl 8915
[  947.434417] sheep_net: poll
[  967.321019] sheep_net: packet received
[  967.338483] sheep_net: packet received
[  967.338502] sheep_net: drop incoming IP packet 188.213.165.209 for filter 0.0.0.0
[  968.207744] sheep_net: ioctl 8931
[  968.214410] sheep_net: write
[  968.214437] sheep_net: packet received
[  968.214453] sheep_net: packet received
[  968.420027] sheep_net: write
[  968.420054] sheep_net: packet received
[  968.420072] sheep_net: packet received
[  968.636097] sheep_net: write
[  968.636122] sheep_net: packet received
[  968.636138] sheep_net: packet received
[  968.852202] sheep_net: write
[  968.852227] sheep_net: packet received
[  968.852243] sheep_net: packet received
[  969.068354] sheep_net: write
[  969.068378] sheep_net: packet received
[  969.068396] sheep_net: packet received
[  969.284475] sheep_net: write
[  969.284500] sheep_net: packet received
[  969.284515] sheep_net: packet received
[  969.500607] sheep_net: write
[  969.500631] sheep_net: packet received
[  969.500649] sheep_net: packet received
[  969.716730] sheep_net: write
[  969.716755] sheep_net: packet received
[  969.716773] sheep_net: packet received
[  969.932858] sheep_net: write
[  969.932881] sheep_net: packet received
[  969.932898] sheep_net: packet received
[  970.148951] sheep_net: write
[  970.148974] sheep_net: packet received
[  970.148991] sheep_net: packet received
[  970.365421] sheep_net: write
[  970.365446] sheep_net: packet received
[  970.365463] sheep_net: packet received
[  970.880541] sheep_net: write
[  970.880566] sheep_net: packet received
[  970.880584] sheep_net: packet received
[  971.395910] sheep_net: write
[  971.395934] sheep_net: packet received
[  971.395951] sheep_net: packet received
[  971.911298] sheep_net: write
[  971.911322] sheep_net: packet received
[  971.911340] sheep_net: packet received
[  972.426681] sheep_net: write
[  972.426708] sheep_net: packet received
[  972.426725] sheep_net: packet received
[  972.942088] sheep_net: write
[  972.942114] sheep_net: packet received
[  972.942132] sheep_net: packet received
[  973.573667] sheep_net: write
[  973.573682] sheep_net: ipfilter set to 192.168.1.75
[  973.573694] sheep_net: packet received
[  973.574013] sheep_net: ioctl 8931
[  977.257804] sheep_net: write
[  977.257824] sheep_net: packet received
[  977.263138] sheep_net: packet received
[  977.263149] sheep_net: retain incoming unicast IP packet 37.92.192.168
[  977.263174] sheep_net: poll
[  977.264325] sheep_net: read
[  977.264394] sheep_net: read
[  977.264417] sheep_net: poll
[  977.265113] sheep_net: write
[  977.265126] sheep_net: packet received
[  978.225520] sheep_net: packet received
[  978.225563] sheep_net: poll
[  978.225621] sheep_net: read
[  978.225700] sheep_net: read
[  978.225726] sheep_net: poll
[  978.226373] sheep_net: packet received
[  978.226403] sheep_net: poll
[  978.226435] sheep_net: read
[  978.226492] sheep_net: read
[  978.226514] sheep_net: poll
[  979.244264] sheep_net: write
[  979.244293] sheep_net: packet received
[  981.239276] sheep_net: write
[  981.239304] sheep_net: packet received
[  983.234293] sheep_net: write
[  983.234322] sheep_net: packet received
[  985.229292] sheep_net: write
[  985.229321] sheep_net: packet received
[  987.440769] sheep_net: packet received
[  987.440812] sheep_net: poll
[  987.440868] sheep_net: read
[  987.440946] sheep_net: read
[  987.440971] sheep_net: poll
[  992.409800] sheep_net: packet received
[  992.410340] sheep_net: poll
[  992.410377] sheep_net: read
[  992.410464] sheep_net: read
[  992.410495] sheep_net: poll
[  993.892647] sheep_net: packet received
[  993.892694] sheep_net: poll
[  993.892747] sheep_net: read
[  993.892826] sheep_net: read
[  993.892854] sheep_net: poll
[  998.321106] sheep_net: packet received
[  998.349910] sheep_net: packet received
[  998.349925] sheep_net: drop incoming IP packet 193.234.225.237 for filter 192.168.1.75
[  999.321124] sheep_net: packet received
[  999.349171] sheep_net: packet received
[  999.349185] sheep_net: drop incoming IP packet 193.183.98.38 for filter 192.168.1.75
[ 1005.977946] sheep_net: ioctl 8932
[ 1006.007500] sheep_net: ioctl 8932
[ 1006.357840] sheep_net: poll
[ 1006.357919] sheep_net: close


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Apr 18, 2018 2:09 am 
Offline
Mac Mechanic
User avatar

Joined: Mon Sep 15, 2014 7:59 pm
Posts: 156
Read the doc I wrote:
https://github.com/rickyzhang82/macemu/ ... how-to-use

It is possible that point 1 and 2 happens. I'd recommend you install wireshark in your pi and sniff the incoming DNS UDP packet. That's how I fix the sheep_net bug before.

I got my raspberry pi 3 b+ today. I will give a try and let your know how it goes.

_________________
There is an App for that!
https://github.com/rickyzhang82


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Apr 18, 2018 3:51 am 
Offline
Mac Mechanic
User avatar

Joined: Mon Sep 15, 2014 7:59 pm
Posts: 156
I tested it on my new rpi 3b+. I don't need to make any code change out of the box to make sheep_net works in built-in wlan0.

Image

I ping from guest Mac running in raspberry pi 3 b+ host OS to router

Image

I ping from my laptop to guest Mac
Code:
[Ricky@xps ~]$ ping 192.168.2.111
PING 192.168.2.111 (192.168.2.111) 56(84) bytes of data.
64 bytes from 192.168.2.111: icmp_seq=1 ttl=255 time=38.7 ms
64 bytes from 192.168.2.111: icmp_seq=2 ttl=255 time=4.77 ms
64 bytes from 192.168.2.111: icmp_seq=3 ttl=255 time=7.62 ms
64 bytes from 192.168.2.111: icmp_seq=4 ttl=255 time=7.80 ms
64 bytes from 192.168.2.111: icmp_seq=5 ttl=255 time=7.46 ms


I made the following udev rules and load sheep_net at runt time:

Code:
pi@raspberrypi:~$ sudo cat /etc/udev/rules.d/sheep_net-permission.rules
ACTION=="add", KERNEL=="sheep_net", MODE="0666", OWNER="pi", GROUP="pi"


Code:
pi@raspberrypi:~$ sudo cat /etc/modules-load.d/modules.conf
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

i2c-dev
sheep_net


I also tested with wireshark on rpi. It does show my host OS IP 192.168.2.26 and guest OS IP 192.168.2.111 sent from the same host OS MAC address.

I believe whenever your start your test, you must ping from your guest Mac OS to outside so that ipfilter get initialize with your guest Mac OS IP. Then you can ping from another physical machine and test on any web server without https in your local network with iCab web browser.

Note that any modern https may not work in iCab. If I remember it correctly, they ditched the old SSL encryption protocol.

Good luck!

_________________
There is an App for that!
https://github.com/rickyzhang82


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Apr 18, 2018 4:14 pm 
Offline
Student Driver

Joined: Tue Apr 10, 2018 7:24 pm
Posts: 14
Thanks for the udev entry, that's useful. sheep_net still doesn't work for me on wlan0 though.

Could you please let me know the configure parameters you used when compiling Basilisk? I'd like to try and replicate your build on a new install to see if that works.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Apr 18, 2018 4:50 pm 
Offline
Mac Mechanic
User avatar

Joined: Mon Sep 15, 2014 7:59 pm
Posts: 156
You clone my repo: https://github.com/rickyzhang82/macemu

checkout branch build-script and rebase to master branch. You should see the build.sh script in https://github.com/rickyzhang82/macemu/ ... x/build.sh

My kernel and headers is up-to-date from raspbian. It is 4.14 something, which is different from stock image. So run apt-get update and upgrade first. But I don't experience any hardware issue. Wifi, bluetooth and 7 inch touch screen works out of the box.

_________________
There is an App for that!
https://github.com/rickyzhang82


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu Apr 19, 2018 1:51 pm 
Offline
Student Driver

Joined: Tue Apr 10, 2018 7:24 pm
Posts: 14
Done, and it's the same as before :( See photo.

This is what I did
- Flashed the latest Raspbian image, 2018-03-13-raspbian-stretch.img
- Connected wifi, apt-get update, upgrade
- No packages or configuration other than the build requirements and dependencies
- Pulled your git archive and rebased the build-script branch, built Basilisk and sheep_net
- Used your udev config and checked that the permissions were applied
- Used the System 7.5.5 image I'd used previously (tested working on Windows and on the Pi over ethernet)

Result - I can't ping 192.168.1.1 (but I can ping host to Mac OS and back).

The only thing I can think of is my router might be blocking the guest IP as it would only see
the host's MAC. If you can think of anything else please let me know.

Image


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu Apr 19, 2018 5:43 pm 
Offline
Mac Mechanic
User avatar

Joined: Mon Sep 15, 2014 7:59 pm
Posts: 156
When I wrote https://github.com/cebix/macemu/tree/ma ... how-to-use, I did find that host OS sent out a ICMP packet and notified the router that guest OS IP is not reachable due to firewall in host. That caused intermittent connection problem in guest OS.

I'd recommend you first run
Code:
sudo iptables -L


see if any suspicious rule that blocks wlan0.

If there is nothing fishy, try wireshark in host OS. You can see what went wrong by sniffing the packet in the host OS side.

If you still can't find anything there, enable debug print out message in Basilisk II (https://github.com/cebix/macemu/blob/ma ... ix.cpp#L84). You can also add more debug print out.

Please let me know what you find.

_________________
There is an App for that!
https://github.com/rickyzhang82


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu Apr 19, 2018 6:57 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 2275
Location: Emaculation.com
Instead of WireShark, you may also want to try https://portswigger.net/burp/ -- this will give you much more control over what you're seeing, and you can inject packets as well as monitor them.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Fri Apr 20, 2018 7:00 am 
Offline
Student Driver

Joined: Tue Apr 10, 2018 7:24 pm
Posts: 14
I'm using a fresh, updated Raspbian install now so the iptables rules are the defaults (ACCEPT).

I bought a cheap wireless AP and I'm able to ping it from the MacOS guest - one time. After 8 pings it stops responding
and won't respond again. Restarting Basilisk (not restarting the host) allows me to ping it again (up to 8 pings) then it fails
again and so on. Now that I have some functionality it should be possible to get a proper comparison of success and failure
modes. I'll try the debug option in Basilisk first. Thanks.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Fri Apr 20, 2018 1:42 pm 
Offline
Mac Mechanic
User avatar

Joined: Mon Sep 15, 2014 7:59 pm
Posts: 156
wireshark should be a better default tools. Because it is free and comes with built version from stock rapsbian in ARM binary.

I suspect that your host OS sent out ICMP that notified guest OS is not reachable, which disrupts you connection intermittently.

In wireshark, you can also check its ARP packet which request to resolve your guest OS IP with your host OS MAC address. Because you have two IP address (one for host OS and another for guest OS) share the same hardware MAC address.

Use wireshark and learn its filter. You should get more information before spending your time to read BasiliskII code to figure out where to put printf.

_________________
There is an App for that!
https://github.com/rickyzhang82


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sun Apr 22, 2018 9:28 pm 
Offline
Student Driver

Joined: Tue Apr 10, 2018 7:24 pm
Posts: 14
So I installed wireshark on the fresh Raspbian card from a few days ago and set the filter to
"host 192.168.1.35 or 192.168.1.80" (1.35 =host OS, 1.80 = guest Mac OS), started Basilisk
then started the capture...

and Mac OS networking works perfectly! Ping both ways and web access.

When I stop the capture, Mac OS networking stops working. This is getting stranger by the day.
Do you have any ideas? Because it's impossible to capture the failure mode with wireshark!


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Mon Apr 23, 2018 3:36 am 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 2275
Location: Emaculation.com
Does it has something to do with enabling and disabling promiscuous mode?


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Mon Apr 23, 2018 8:34 am 
Offline
Student Driver

Joined: Tue Apr 10, 2018 7:24 pm
Posts: 14
@ade Promiscuous mode in wireshark refers to the libpcap driver. It means libpcap processes all packets that come from
the hardware driver regardless of destination IP address. The Raspberry Pi (Broadcom) wifi driver itself doesn't allow a
hardware device promiscuous mode. The sheep_net driver accesses the wlan0 device directly so shouldn't be affected by
what libpcap is doing. However there is something strange going on (that I don't understand) that results in sheep_net
working when libpcap is capturing and vice versa. If I am wrong in any of the above please let me know.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Mon Apr 23, 2018 7:37 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 2275
Location: Emaculation.com
It's been a while since I've looked at the sheep_net code, but doesn't it set the flag for hardware promiscuous mode? If the Pi chipset doesn't support that, this may be the problem.

[edit] Hmm. It looks like the Ether code had an update 3 years ago to support raw mode,which should allow for direct communication via sheep_net if it supports it. Still worth a try.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue Apr 24, 2018 2:42 pm 
Offline
Student Driver

Joined: Tue Apr 10, 2018 7:24 pm
Posts: 14
It gets even better. When I compile and run the program from this page:

https://opensourceforu.com/2011/02/capt ... m-libpcap/

Which is a simple demo of the libpcap library in C, and at the same time open Basilisk,
Mac OS networking works! I'm still no closer to finding what libpcap is doing to help
the flow of packets to the sheep_net driver though. Any ideas let me know.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue Apr 24, 2018 7:28 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 2275
Location: Emaculation.com
Is libpcap setting the hardware flag? If so, then that's likely what's at the root of all this.

In the meantime, sounds like the trick is to load libpcap to get things working ;)


Top
 Profile  
Reply with quote Post a reply  
Display posts from previous:  Sort by  
Post new topic  Reply to topic Page 1 of 2 [ 30 posts ]    Go to page 1, 2  Next


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
 

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group