Most open wifi hotspots assign DHCP addresses
AFTER you
1) Bring the network up
2) Request the address with dhclient.
OpenBSD has a script that does all this at boot and reads the values in /etc/hostname.rum0
At the time of this post I believe that this link is succinct and accurate
openbsd-restart-network/