Assorted Mac Stuff

Scratching an itch here and there.

This page lists several projects that I used to work on in an earlier life. Please note that I am no longer able to actively maintain them. Use at your own risk.

Please note that these are personal projects of mine; as such, none of them are in any way endorsed by my current or past employers.

iScroll2

A modified trackpad driver that adds two-finger scrolling capabilities to supported pre-2005 PowerBooks and iBooks on OS X 10.3 and up. Supported models include aluminum PowerBooks introduced from 2003 to 2004 as well as all G4 iBooks.

Go to iScroll2 Page

K750iGrabber

If you experience frequent crashes when disconnecting a SonyEricsson K750i, D750i, W800i or Z800i mobile phone connected to the Mac via the included USB cable, install this small, code-less kernel extension to prevent those crashes. Works for me.

Go to K750iGrabber Page

ifconfig with support for enabling promiscuous mode

While playing around with a Realtek 8111 Gigabit Ethernet adapter under Leopard, I noticed that it fails to receive multicast traffic, which in turn of course prevents Bonjour from working.

After some more investigation, it turns out that the card can be made to receive multicast traffic by placing it in promiscuous mode; however, the ifconfig command that comes with Leopard, unlike the ones shipped with FreeBSD and Linux, does not recognize the promisc option.

While there are other ways of forcing a network adapter into promiscuous mode (e.g. running tcpdump in the background, or running VMware with bridged networking enabled), these are clearly far from optimal from an efficiency point of view.

Thankfully, adding support for the promisc option to Darwin's ifconfig implementation (which is part of the network_cmds package available at Apple's Darwin 9.6.0 source code repository, corresponding to Mac OS X 10.5.6) was trivial (once I managed to get darwinbuild and a proper build environment set up, that is — sadly, there appear to be quite a few issues with undeclared dependencies).

Anyway, here is a build of ifconfig that can be used to manually force a network interface into or out of promiscuous mode (using ifconfig en0 promisc or ifconfig en0 -promisc, respectively; substitute en0 as appropriate), and is otherwise identical to the one found in network_cmds-307.0.1. The archive also contains a LaunchDaemon that automatically puts en0 into promiscuous mode at startup and every 60 seconds thereafter (in case another application — such as VMware — disables promiscuous mode at any point).

ifconfig.tgz (21k, universal binary, GZip compressed tar archive)

network_cmds-307.0.1-promisc.tgz (469k, source code, GZip compressed tar archive)

Note: With version 2.0.3 of the Realtek RTL8111/RTL8168 driver, multicast appears to work even when the card is not in promiscuous mode, so it looks like this workaround is no longer required; however, when using that driver, I have experienced some issues where the network interface stops working after exiting from promiscuous mode (e.g., after quitting VMware Fusion), which I have only been able to resolve by taking it down and back up again.

Return to Top

Contact

You can reach me at dub@doemail.org.