I have a FreeBSD 8 machine which can use several wireless access points. I want it to use the first available network and automatically use DHCP or a static address as required (this should be configured separately for every network). Is it possible under FreeBSD?
Yes, you can do this by modifying /sbin/dhclient-script. That runs whenever the box goes to do a DHCP REQUEST on an interface after it comes up. In that script you could add some code that checks what SSID it is associated with and perhaps just configures the interface (and doesn't actually assign the DHCP IP). If you need help with the script part let me know.