diff options
author | Donald Sharp <sharpd@cumulusnetwroks.com> | 2016-07-27 21:27:52 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-12-22 02:26:04 +0100 |
commit | 984c84f48600a9c6b7b0513e3ad8f234465dec1e (patch) | |
tree | e52711eb17d6362fedc4b64bc244f56a72fb5c43 /pimd/pim_tlv.c | |
parent | pimd: Fixup pim_oil interface to be a bit more consistent. (diff) | |
download | frr-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_tlv.c')
-rw-r--r-- | pimd/pim_tlv.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/pimd/pim_tlv.c b/pimd/pim_tlv.c index 5269bb5ef..93227d633 100644 --- a/pimd/pim_tlv.c +++ b/pimd/pim_tlv.c @@ -96,6 +96,33 @@ uint8_t *pim_tlv_append_uint32(uint8_t *buf, #define ucast_ipv4_encoding_len (2 + sizeof(struct in_addr)) +/* + * An Encoded-Unicast address takes the following format: + * + * 0 1 2 3 + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Addr Family | Encoding Type | Unicast Address + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+... + * + * Addr Family + * The PIM address family of the 'Unicast Address' field of this + * address. + * + * Values 0-127 are as assigned by the IANA for Internet Address * Families in [7]. Values 128-250 are reserved to be assigned by + * the IANA for PIM-specific Address Families. Values 251 though + * 255 are designated for private use. As there is no assignment + * authority for this space, collisions should be expected. + * + * Encoding Type + * The type of encoding used within a specific Address Family. The + * value '0' is reserved for this field and represents the native + * encoding of the Address Family. + * + * Unicast Address + * The unicast address as represented by the given Address Family + * and Encoding Type. + */ int pim_encode_addr_ucast (uint8_t *buf, struct prefix *p) { |