I recently tried to compile the FreeBSD ports of the OpenBGPd project (and his IGP child, OpenOSPFd) on a few servers at the lab. Unfortunately, the boxes were running a good ol' (Feb. 2004) fashioned FreeBSD 5.2.1 release, and the ports did not compile :
pseudolmedia# make
===> Building for openbgpd-3.9
cd /usr/ports/net/openbgpd/work/bgpd; make COPTS="-DRTA_LABEL=0"
Warning: Object directory not changed from original
/usr/ports/net/openbgpd/work/bgpd
cc -O -pipe -mcpu=pentiumpro -Wall -I/usr/ports/net/openbgpd/work/bgpd
-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wshadow
-Wpointer-arith -Wcast-qual -Wsign-compare -DRTA_LABEL=0 -c session.c
session.c: In function `setup_listeners':
session.c:134: error: `TCP_MD5SIG' undeclared (first use in this function)
session.c:134: error: (Each undeclared identifier is reported only once
session.c:134: error: for each function it appears in.)
session.c: In function `session_accept':
session.c:970: error: `TCP_MD5SIG' undeclared (first use in this function)
session.c: In function `session_connect':
session.c:1028: error: `TCP_MD5SIG' undeclared (first use in this function)
session.c: In function `session_dispatch_imsg':
session.c:2255: error: `LINK_STATE_UP' undeclared (first use in this
function)
session.c:2256: error: `LINK_STATE_UNKNOWN' undeclared (first use in
this function)
*** Error code 1
I asked flz about this, and it seems that those ports require more recent includes files than the ones provided in the 5.2.1 release. So, the most easy way to compile it without error will be to upgrade your operating system to RELENG_6 or more. RELENG_6 works fine in my case.
By the way, I did setup a few BGP sessions between Cisco's IOS and OpenBGPd and everything is running pretty well (my routers are only announcing a few prefixes to each others). The OpenBGPd and OpenOSPFd configurations files are really nice and the *ctl tools are well designed.
Many thanks to the OpenBSD developers and contributors !
All the OpenBGPd documentation that you could need is in the manpages (check man bgpd.conf and man ospfd.conf).