diff options
author | Mark Stapp <mjs@voltanet.io> | 2019-11-08 20:13:33 +0100 |
---|---|---|
committer | Mark Stapp <mjs@voltanet.io> | 2020-03-27 14:37:02 +0100 |
commit | e4a1ec7454490af0ea45013cb279eb9b15edef51 (patch) | |
tree | eb93d94f2b0e726a70dea73eeb8deeb18bb2be57 /lib/mpls.h | |
parent | Merge pull request #5740 from sworleys/NHG-2Grp-Fixes (diff) | |
download | frr-e4a1ec7454490af0ea45013cb279eb9b15edef51.tar.xz frr-e4a1ec7454490af0ea45013cb279eb9b15edef51.zip |
zebra,lib: use const in more apis
Use const with some args to ipaddr, zebra vxlan, mpls
lsp, and nexthop apis; add some extra checks to some
nexthop-related apis.
Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'lib/mpls.h')
-rw-r--r-- | lib/mpls.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/mpls.h b/lib/mpls.h index 635ecc77a..05cf2935e 100644 --- a/lib/mpls.h +++ b/lib/mpls.h @@ -209,10 +209,13 @@ static inline char *label2str(mpls_label_t label, char *buf, size_t len) int mpls_str2label(const char *label_str, uint8_t *num_labels, mpls_label_t *labels); +/* Generic string buffer for label-stack-to-str */ +#define MPLS_LABEL_STRLEN 1024 + /* * Label to string conversion, labels in string separated by '/'. */ -char *mpls_label2str(uint8_t num_labels, mpls_label_t *labels, char *buf, +char *mpls_label2str(uint8_t num_labels, const mpls_label_t *labels, char *buf, int len, int pretty); #ifdef __cplusplus |