maybe because no one knows...
anyway, on a mac with a wifi card (but not with a wifi router), heres what to do:
click on airport in the menu bar
click "create network..."
name it what you like
connect to the network on the iphone
get the ip address on the iphone
use this in whatever program you like