README: Move to Markdown format

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
README.md: Initial cleanup before rewrite.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Update candidate RP configuration support and documentation

- Add upper boundary check of cand_rp interval time, using Cisco MAX 16384
- Also check MAX prio boundary
- Add support for configuring a cand_rp using the interface name like phyint
- Update man-page about MAX/MIN of priority and interval, and new ifname opt

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Update RP address, remove priority field, should always be 1.

The rp_address priority field was unused since its introduction in
commit 0603f191a.  This commit reverts it since static RP's have
always been announced with priority 1, this is the same value as
Juniper uses and neither Juniper or Cisco have the priority of
static RP's configurable.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Update candidate BSR configuration support and documentation

- Add support for configuring a cand_bootstrap_router with interface name
- Update man-page and default pimd.conf

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

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

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

Shorten and/or simplify local variable names for readability and
cleanup messy formatting.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
timer.c:age_routes() -- Refactor and cleanup duplicated threshold detection

The threshold detection for when to switch to a shortest-path-tree
from the default RP shared-tree was duplicated in three places in
the same function.  This commit factors it out and simplifies the
code into a check_spt_threshold(mrt_entry_t *) function.

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

- Update on new spt-threshold changes and feature
- Update with latest changes
- Update on new configure script and document build process
- Clarify -d debugging and update Monitoring section

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Refactor .conf SPT threshold switchover syntax

This commit replaces the switch_register_threshold and switch_data_threshold
with a unified syntax inspired by Cisco and Xorp PIM-SM implementations.

    spt_threshold [rate <KBPS> | packets <NUM> | infinity] [interval <SEC>]

The packets and infinity arguments are new, and the rate value is no
longer in bps, but in kbps.  Also, the default switchover is now based
on packets and triggers a switch to the SPT after receiving the first
encapsulated multicast frame on either the RP or the last-hop router.
The default interval has been increased from 20 to 100 sec, also like
Xorp does.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Fix default source preference (unicast distance), should be 101.

The default unicast distance applied to all interfaces, due to pimd
currently not having access to unicast distance of routing protocols,
should be in the range 1-255.  I belive the previous default (1024)
was a copy-paste bug with default metric, or similar accident before
established practises was set.

Anyhow, we should really work on implementing an interface to Quagga's
zebra daemon, or similar routing suites like BIRD, to overall improve
the way pimd acquires the active unicast routing table.

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