Hello! Yes, it's hardcoded, typically as a macro / constant definition. I don't see any good reason to have it outside BIRD.
Maria On 12 May 2023 14:23:37 CEST, Douglas Fischer <[email protected]> wrote: >This conversation piqued my curiosity... > >P.S.: It's almost a fork on the topic, but maybe it could be a productive >conversation. I apologize in advance if I mess up. > >Just for context: >I'm not a programmer! >I have some references of the concepts, but almost no practice in it. > >How does Bird load these possible attribute variations? >In the specific case, where is it defined that 0 -> Provider, 1-> RS, 2 -> >RS-Client, 3 -> Customer, 4 -> Peer, and etc...? >Is this hardcoded in the source code? >Is there any lib apart from where this is described that is loaded at >binary initialization? > >The same question applies to other questions like BGP Message types, >address families... > >Em sex., 12 de mai. de 2023 às 06:04, Mikhail Grishin <[email protected]> >escreveu: > >> Hi, >> >> Thanks. >> >> I'll also remind you the idea to show in Bird CLI >> not >> Last error: BGP Error: Role mismatch >> but >> Last error: BGP Error: Role mismatch (provider) >> >> In some of previous conversations you accepted it. >> >> Ondrej Zajicek пишет 11.05.2023 18:27: >> > >> > In the logs printed Error: Role mismatch (provider) >> > Hi >> > >> > Yes, it is a bug in BIRD. When BGP capability option is parsed, the >> > capability structure is initialized with the proper default value, but >> > when there is no BGP capability option altogether (like in these case), >> > the capability structure is just zeroed. Unfortunately, RFC 9234 is the >> > only supported capability that has non-zero default value (0xff), zero >> > is 'provider'. Will fix that. >> > >> > I am surprised that in 2023 there are still BGP routers not supporting / >> > sending capabilities :-) . >> > >> >> > >-- >Douglas Fernando Fischer >Engº de Controle e Automação
