diff options
| author | Donald Sharp <sharpd@cumulusnetwroks.com> | 2016-07-27 15:27:52 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-12-21 20:26:04 -0500 |
| commit | 984c84f48600a9c6b7b0513e3ad8f234465dec1e (patch) | |
| tree | e52711eb17d6362fedc4b64bc244f56a72fb5c43 /pimd/pim_msg.c | |
| parent | 7293a05356086cc75cc0690f4b03110229771743 (diff) | |
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.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pimd/pim_msg.c b/pimd/pim_msg.c index 92382ccc4d..2027d42119 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)); |
