diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-11-17 08:17:25 -0500 | 
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-12-21 20:26:16 -0500 | 
| commit | 8bfb8b67ae63eb0ee81e9c928b11836dcd690d6c (patch) | |
| tree | 49baa69966e7ef2aff40e05fcf8c2c2a3d3230d5 /pimd/pim_str.h | |
| parent | 9d8b5695fe8229c86fc606f90a0078e599384c6d (diff) | |
pimd: Allow storing of sg in string format
Debugs are extremely expensive currently.  Let's
store 'struct prefix_sg sg' string format in
the ifchannel, upstream and msdp_sa structures.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_str.h')
| -rw-r--r-- | pimd/pim_str.h | 10 | 
1 files changed, 10 insertions, 0 deletions
diff --git a/pimd/pim_str.h b/pimd/pim_str.h index 15f5227de8..da72573570 100644 --- a/pimd/pim_str.h +++ b/pimd/pim_str.h @@ -28,8 +28,18 @@  #include <prefix.h> +/* + * Longest possible length of a (S,G) string is 36 bytes + * 123.123.123.123 = 16 * 2 + * (,) = 3 + * NULL Character at end = 1 + * (123.123.123.123,123,123,123,123) + */ +#define PIM_SG_LEN 36 +  void pim_addr_dump (const char *onfail, struct prefix *p, char *buf, int buf_size);  void pim_inet4_dump(const char *onfail, struct in_addr addr, char *buf, int buf_size);  char *pim_str_sg_dump (const struct prefix_sg *sg); +char *pim_str_sg_set (const struct prefix_sg *sg, char *sg_str);  #endif  | 
