summaryrefslogtreecommitdiffstats
path: root/pimd/pim_msg.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetwroks.com>2016-07-27 21:27:52 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-12-22 02:26:04 +0100
commit984c84f48600a9c6b7b0513e3ad8f234465dec1e (patch)
treee52711eb17d6362fedc4b64bc244f56a72fb5c43 /pimd/pim_msg.c
parentpimd: Fixup pim_oil interface to be a bit more consistent. (diff)
downloadfrr-984c84f48600a9c6b7b0513e3ad8f234465dec1e.tar.xz
frr-984c84f48600a9c6b7b0513e3ad8f234465dec1e.zip
pimd: Start abstraction for WC and RPT bits
Start the abstraction of the WC and RPT bits so we can send the data as appropriate. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_msg.c')
-rw-r--r--pimd/pim_msg.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/pimd/pim_msg.c b/pimd/pim_msg.c
index 92382ccc4..2027d4211 100644
--- a/pimd/pim_msg.c
+++ b/pimd/pim_msg.c
@@ -87,9 +87,9 @@ uint8_t *pim_msg_addr_encode_ipv4_group(uint8_t *buf,
return buf + ENCODED_IPV4_GROUP_SIZE;
}
-uint8_t *pim_msg_addr_encode_ipv4_source(uint8_t *buf,
- int buf_size,
- struct in_addr addr)
+uint8_t *
+pim_msg_addr_encode_ipv4_source(uint8_t *buf, int buf_size,
+ struct in_addr addr, uint8_t bits)
{
const int ENCODED_IPV4_SOURCE_SIZE = 8;
@@ -99,7 +99,7 @@ uint8_t *pim_msg_addr_encode_ipv4_source(uint8_t *buf,
buf[0] = PIM_MSG_ADDRESS_FAMILY_IPV4; /* addr family */
buf[1] = '\0'; /* native encoding */
- buf[2] = 4; /* reserved = 0 | S bit = 1 | W bit = 0 | R bit = 0 */
+ buf[2] = bits;
buf[3] = 32; /* mask len */
memcpy(buf+4, &addr, sizeof(struct in_addr));