Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bgp link state 20221228 #3

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
387 changes: 385 additions & 2 deletions bgpd/bgp_attr.c

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions bgpd/bgp_attr.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ struct bgp_attr_srv6_l3vpn {
uint8_t transposition_offset;
};


/* BGP core attribute structure. */
struct attr {
/* AS Path structure */
Expand All @@ -174,6 +175,10 @@ struct attr {
/* Path origin attribute */
uint8_t origin;

/* BGP Link-State attributes*/
struct mp_bgpls_nlri *mp_bgpls_nlri; /* BGP LS extension NLRI */
struct ls_bgpls *link_state_attr; /* BGP Link State attribute */

/* PMSI tunnel type (RFC 6514). */
enum pta_type pmsi_tnl_type;

Expand Down Expand Up @@ -390,6 +395,7 @@ extern void bgp_attr_finish(void);
extern enum bgp_attr_parse_ret
bgp_attr_parse(struct peer *peer, struct attr *attr, bgp_size_t size,
struct bgp_nlri *mp_update, struct bgp_nlri *mp_withdraw);
extern void bgp_attr_undup(struct attr *new, struct attr *old);
extern struct attr *bgp_attr_intern(struct attr *attr);
extern void bgp_attr_unintern_sub(struct attr *attr);
extern void bgp_attr_unintern(struct attr **pattr);
Expand Down Expand Up @@ -436,6 +442,11 @@ extern int bgp_mp_unreach_parse(struct bgp_attr_parser_args *args,
extern enum bgp_attr_parse_ret
bgp_attr_prefix_sid(struct bgp_attr_parser_args *args);

/* BGP-LS */
extern void bgp_put_link_state(struct stream *s, struct attr *attr);
extern int link_state_value(struct stream *s, struct peer *peer,
uint16_t l_type, uint16_t l_length);

extern struct bgp_attr_encap_subtlv *
encap_tlv_dup(struct bgp_attr_encap_subtlv *orig);

Expand Down
Loading