> One difference in working with BSD is that I have to use
> ::1 in order to tell the middle tier that the back tier is running
> on the same machine.  On Linux I have to use 127.0.0.1.
> Are there any conditional compilation macros for BSD so I
> could write

::1 should also work on linux, so long as you have IPv6 enabled.
::1 is the IPv6 loopback address and should be on interface lo:

$ ip addr show lo
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever

> Is the ip command available on BSD?  I've heard it's
> better than ifconfig, but I've only found ifconfig on BSD.

I doubt it. ip uses netlink socket, not ioctls, so is a Linux
extension not found in POSIX, SVr4, or any other standard.

It is a good tool to learn, since it can configure just about
everything of the linux network stack.

	   Andrew