Always log that pimd is starting ...

- Announce in syslog that pimd is starting
- Spell check rp_address log message

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Update IGMP code to support FreeBSD >= 8.x

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Refactor to use IGMP_V3_REPORT_MINLEN and IGMP_GRPREC_HDRLEN.

The optional .ir_groups[] struct member in struct igmp_report does
not exist on FreeBSD, it's been commented out.  Replace that, and
sizeof(struct igmp_grouprec) with IGMP_V3_REPORT_MINLEN and
IGMP_GRPREC_HDRLEN, respectively for compatibility.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
routesock.c:k_req_incoming() - Retry read() of routing socket on EAGAIN

Reading the routing table sometimes takes a while on FreeBSD.  This
commit allows for retrying three times before giving up.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Cleanup and improve debug output

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
accept_pim(): Allow detailed PIM debugging when receiving frames

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Followup to 6ebd70c, actually retry routing socket read() on EAGAIN, also EINTR

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
routesock.c: Whitespace cleanup

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Fix regression introduced in 0606aee

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
routesock.c: Retry routing socket on EAGAIN after one second sleep.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Join/Leave multicast group 224.0.0.13 (All PIM Routers) on correct socket

This commit changes on which socket pimd joins the multicast group
224.0.0.13, the all PIM routers group.  On a Linux kernel it does not
seem to matter which socket is used, but on FreeBSD, and possibly other
UNIX kernels, this does not work.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
config.mk: Note that pimd has been verified on FreeBSD 9.x

- Minor cleanup
- Move Linux definition first, is after all the primary platform
- Remove FreeBSD 2.x definition
- Replace FreeBSD 3.x/4.x with verified on FreeBSD 9.x

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Fix FTBFS on NetBSD: Don't use reserved keyword 'bool' as variable name.

Legacy code, from before 'bool' became a reserved keyword in the C standard.

Signed-off-by: Joachim Nilsson <joachim.nilsson@westermo.se>
config.mk: Update with details FreeBSD 9.2, NetBSD 6.1.2, and OpenBSD 5.4

Now pimd has been tested successfully on the following BSD variants, as
well as Linux:

* FreeBSD 9.2,
* NetBSD 6.1.2, and
* OpenBSD 5.4

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>