diff options
Diffstat (limited to 'pimd/pim_tlv.h')
| -rw-r--r-- | pimd/pim_tlv.h | 62 |
1 files changed, 23 insertions, 39 deletions
diff --git a/pimd/pim_tlv.h b/pimd/pim_tlv.h index 9c4ebc9f0f..84b65ec4e1 100644 --- a/pimd/pim_tlv.h +++ b/pimd/pim_tlv.h @@ -11,7 +11,7 @@ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; see the file COPYING; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, @@ -65,62 +65,46 @@ typedef uint32_t pim_hello_options; #define PIM_TLV_MIN_SIZE (PIM_TLV_TYPE_SIZE + PIM_TLV_LENGTH_SIZE) #define PIM_TLV_OPTION_SIZE(option_len) (PIM_TLV_MIN_SIZE + (option_len)) -uint8_t *pim_tlv_append_uint16(uint8_t *buf, - const uint8_t *buf_pastend, - uint16_t option_type, - uint16_t option_value); -uint8_t *pim_tlv_append_2uint16(uint8_t *buf, - const uint8_t *buf_pastend, - uint16_t option_type, - uint16_t option_value1, +uint8_t *pim_tlv_append_uint16(uint8_t *buf, const uint8_t *buf_pastend, + uint16_t option_type, uint16_t option_value); +uint8_t *pim_tlv_append_2uint16(uint8_t *buf, const uint8_t *buf_pastend, + uint16_t option_type, uint16_t option_value1, uint16_t option_value2); -uint8_t *pim_tlv_append_uint32(uint8_t *buf, - const uint8_t *buf_pastend, - uint16_t option_type, - uint32_t option_value); -uint8_t *pim_tlv_append_addrlist_ucast(uint8_t *buf, - const uint8_t *buf_pastend, +uint8_t *pim_tlv_append_uint32(uint8_t *buf, const uint8_t *buf_pastend, + uint16_t option_type, uint32_t option_value); +uint8_t *pim_tlv_append_addrlist_ucast(uint8_t *buf, const uint8_t *buf_pastend, struct list *ifconnected); int pim_tlv_parse_holdtime(const char *ifname, struct in_addr src_addr, pim_hello_options *hello_options, - uint16_t *hello_option_holdtime, - uint16_t option_len, + uint16_t *hello_option_holdtime, uint16_t option_len, const uint8_t *tlv_curr); int pim_tlv_parse_lan_prune_delay(const char *ifname, struct in_addr src_addr, pim_hello_options *hello_options, uint16_t *hello_option_propagation_delay, uint16_t *hello_option_override_interval, - uint16_t option_len, - const uint8_t *tlv_curr); + uint16_t option_len, const uint8_t *tlv_curr); int pim_tlv_parse_dr_priority(const char *ifname, struct in_addr src_addr, pim_hello_options *hello_options, uint32_t *hello_option_dr_priority, - uint16_t option_len, - const uint8_t *tlv_curr); + uint16_t option_len, const uint8_t *tlv_curr); int pim_tlv_parse_generation_id(const char *ifname, struct in_addr src_addr, pim_hello_options *hello_options, uint32_t *hello_option_generation_id, - uint16_t option_len, - const uint8_t *tlv_curr); + uint16_t option_len, const uint8_t *tlv_curr); int pim_tlv_parse_addr_list(const char *ifname, struct in_addr src_addr, pim_hello_options *hello_options, struct list **hello_option_addr_list, - uint16_t option_len, - const uint8_t *tlv_curr); - -int pim_encode_addr_ucast (uint8_t *buf, struct prefix *p); -int pim_encode_addr_group (uint8_t *buf, afi_t afi, int bidir, int scope, struct in_addr group); - -int pim_parse_addr_ucast (struct prefix *p, - const uint8_t *buf, - int buf_size); -int pim_parse_addr_group (struct prefix_sg *sg, - const uint8_t *buf, - int buf_size); -int pim_parse_addr_source(struct prefix_sg *sg, - uint8_t *flags, - const uint8_t *buf, - int buf_size); + uint16_t option_len, const uint8_t *tlv_curr); + +int pim_encode_addr_ucast(uint8_t *buf, struct prefix *p); +int pim_encode_addr_group(uint8_t *buf, afi_t afi, int bidir, int scope, + struct in_addr group); + +int pim_parse_addr_ucast(struct prefix *p, const uint8_t *buf, int buf_size); +int pim_parse_addr_group(struct prefix_sg *sg, const uint8_t *buf, + int buf_size); +int pim_parse_addr_source(struct prefix_sg *sg, uint8_t *flags, + const uint8_t *buf, int buf_size); #endif /* PIM_TLV_H */ |
