Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
BIRD Internet Routing Daemon
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
labs
BIRD Internet Routing Daemon
Commits
0edf0c8c
Commit
0edf0c8c
authored
Nov 03, 2019
by
Ondřej Zajíček
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support for address family constants
We already had them defined on BGP level, but they are more general.
parent
08c4c9a3
Pipeline
#55034
passed with stages
in 7 minutes and 15 seconds
Changes
6
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
2 deletions
+15
-2
bird-gdb.py
bird-gdb.py
+1
-0
conf/gen_keywords.m4
conf/gen_keywords.m4
+4
-2
conf/gen_parser.m4
conf/gen_parser.m4
+1
-0
filter/data.h
filter/data.h
+1
-0
lib/ip.h
lib/ip.h
+7
-0
nest/config.Y
nest/config.Y
+1
-0
No files found.
bird-gdb.py
View file @
0edf0c8c
...
...
@@ -30,6 +30,7 @@ class BIRDFValPrinter(BIRDPrinter):
"T_ENUM_ROA"
:
"i"
,
"T_ENUM_NETTYPE"
:
"i"
,
"T_ENUM_RA_PREFERENCE"
:
"i"
,
"T_ENUM_AF"
:
"i"
,
"T_IP"
:
"ip"
,
"T_NET"
:
"net"
,
"T_STRING"
:
"s"
,
...
...
conf/gen_keywords.m4
View file @
0edf0c8c
...
...
@@ -34,9 +34,11 @@ m4_define(CF_CLI, `CF_KEYWORDS(m4_translit($1, [[ ]], [[,]]))
')
# Enums are translated to C initializers: use CF_ENUM(typename, prefix, values)
m4_define(CF_enum, `m4_divert(1){ "CF_enum_prefix[[]]$1", -((CF_enum_type<<16) | CF_enum_prefix[[]]$1), NULL },
# For different prefix: CF_ENUM_PX(typename, external prefix, C prefix, values)
m4_define(CF_enum, `m4_divert(1){ "CF_enum_prefix_ext[[]]$1", -((CF_enum_type<<16) | CF_enum_prefix_int[[]]$1), NULL },
m4_divert(-1)')
m4_define(CF_ENUM, `m4_define([[CF_enum_type]],$1)m4_define([[CF_enum_prefix]],$2)CF_iterate([[CF_enum]], [[m4_shift(m4_shift($@))]])DNL')
m4_define(CF_ENUM, `m4_define([[CF_enum_type]],$1)m4_define([[CF_enum_prefix_ext]],$2)m4_define([[CF_enum_prefix_int]],$2)CF_iterate([[CF_enum]], [[m4_shift(m4_shift($@))]])DNL')
m4_define(CF_ENUM_PX, `m4_define([[CF_enum_type]],$1)m4_define([[CF_enum_prefix_ext]],$2)m4_define([[CF_enum_prefix_int]],$3)CF_iterate([[CF_enum]], [[m4_shift(m4_shift(m4_shift($@)))]])DNL')
# After all configuration templates end, we generate the
m4_m4wrap(`
...
...
conf/gen_parser.m4
View file @
0edf0c8c
...
...
@@ -44,6 +44,7 @@ m4_define(CF_CLI_HELP, `')
# ENUM declarations are ignored
m4_define(CF_ENUM, `')
m4_define(CF_ENUM_PX, `')
# After all configuration templates end, we finally generate the grammar file.
m4_m4wrap(`
...
...
filter/data.h
View file @
0edf0c8c
...
...
@@ -38,6 +38,7 @@ enum f_type {
T_ENUM_ROA
=
0x35
,
T_ENUM_NETTYPE
=
0x36
,
T_ENUM_RA_PREFERENCE
=
0x37
,
T_ENUM_AF
=
0x38
,
/* new enums go here */
T_ENUM_EMPTY
=
0x3f
,
/* Special hack for atomic_aggr */
...
...
lib/ip.h
View file @
0edf0c8c
...
...
@@ -48,6 +48,13 @@
#define UDP_HEADER_LENGTH 8
/* IANA Address Family Numbers */
/* https://www.iana.org/assignments/address-family-numbers/address-family-numbers.xhtml */
/* Would use AF_ prefix, but that collides with POSIX address family numbers */
#define AFI_IPV4 1
#define AFI_IPV6 2
#ifdef DEBUGGING
typedef
struct
ip4_addr
{
...
...
nest/config.Y
View file @
0edf0c8c
...
...
@@ -85,6 +85,7 @@ CF_ENUM(T_ENUM_RTS, RTS_, DUMMY, STATIC, INHERIT, DEVICE, STATIC_DEVICE, REDIREC
CF_ENUM(T_ENUM_SCOPE, SCOPE_, HOST, LINK, SITE, ORGANIZATION, UNIVERSE, UNDEFINED)
CF_ENUM(T_ENUM_RTD, RTD_, UNICAST, BLACKHOLE, UNREACHABLE, PROHIBIT)
CF_ENUM(T_ENUM_ROA, ROA_, UNKNOWN, VALID, INVALID)
CF_ENUM_PX(T_ENUM_AF, AF_, AFI_, IPV4, IPV6)
%type <i32> idval
%type <f> imexport
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment