WiFiRoamd is a program that monitors your wireless device to keep it
connected to a good access point. It will scan looking for a known AP, or
will try the AP with the strongest un-encrypted signal. If a script is
found for the specific AP ESSID or MAC address is found, that script is
run. Otherwise, a "default" script is run.
After that script is run, scripts in the "up.d" directory are run. These
implement extra functionality such as DHCP, ESSID "pinning" (where it
explicitly does "iwconfig $DEVICE essid $ESSID", so that you don't
accidentally wander to another AP) and other local things such as
restarting OpenVPN, etc.