Thanks to visit codestin.com
Credit goes to cvsweb.openbsd.org

OpenBSD CVS

CVS log for src/usr.sbin/bgpctl/parser.h


[BACK] Up to [local] / src / usr.sbin / bgpctl

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.46 / (download) - annotate - [select for diffs], Fri Apr 21 09:12:41 2023 UTC (2 years, 5 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_7_BASE, OPENBSD_7_7, OPENBSD_7_6_BASE, OPENBSD_7_6, OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, HEAD
Changes since 1.45: +10 -2 lines
Diff to previous 1.45 (colored)

Implement flowspec add and delete to add/remove flowspec rules dynamically.
OK tb@

Revision 1.45 / (download) - annotate - [select for diffs], Thu Apr 20 14:01:50 2023 UTC (2 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.44: +6 -2 lines
Diff to previous 1.44 (colored)

Implement bgpctl show flowspec and bgpctl flowspec flush.

This uses the flowspec.c file from bgpd and implements the output
for flowspec only for the text printer for now. That code uses a lot
of code from printconf.c
OK tb@

Revision 1.44 / (download) - annotate - [select for diffs], Mon Oct 17 16:51:36 2022 UTC (2 years, 11 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.43: +2 -2 lines
Diff to previous 1.43 (colored)

SHOW_METRICS for the actions enum. Just to match the rest.

Revision 1.43 / (download) - annotate - [select for diffs], Mon Oct 17 12:01:19 2022 UTC (2 years, 11 months ago) by claudio
Branch: MAIN
Changes since 1.42: +2 -1 lines
Diff to previous 1.42 (colored)

Implement openmetric output via bgpctl show metric command

This adds most of the generic code to output the metrics with labels
and implements some basic metrics. The code works but metrics may still
change.

OK tb@

Revision 1.42 / (download) - annotate - [select for diffs], Sun Feb 6 09:52:32 2022 UTC (3 years, 7 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.41: +7 -7 lines
Diff to previous 1.41 (colored)

Switch from u_intX_t types to stdint.h uintX_t like it was done in bgpd.
OK florian@ tb@

Revision 1.41 / (download) - annotate - [select for diffs], Mon Aug 9 08:24:36 2021 UTC (4 years, 1 month ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.40: +3 -2 lines
Diff to previous 1.40 (colored)

Make it possible to match on path-id in bgpctl show rib outputs.
To work properly also a neighbor needs to be selected. The assumption
here is that the peer will use the same path-id for the same peer
accross all its routes. The RFC does not require this and it is valid
to assign path-ids randomly. The path-id only matters for one specific
path but most BGP implementations seem to assign the same path-id to
multiple routes when originated from the same source.
OK benno@

Revision 1.40 / (download) - annotate - [select for diffs], Tue Feb 16 08:30:21 2021 UTC (4 years, 7 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.39: +2 -1 lines
Diff to previous 1.39 (colored)

Add `bgpctl show rtr` to display basic information about RTR sessions.
OK job@

Revision 1.39 / (download) - annotate - [select for diffs], Wed Dec 30 07:31:19 2020 UTC (4 years, 8 months ago) by claudio
Branch: MAIN
Changes since 1.38: +2 -1 lines
Diff to previous 1.38 (colored)

Add 'bgpctl show sets' to display information about the roa-set, as-sets,
and prefix-sets loaded into bgpd.
OK benno@

Revision 1.38 / (download) - annotate - [select for diffs], Sun May 10 13:38:46 2020 UTC (5 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.37: +2 -2 lines
Diff to previous 1.37 (colored)

In bgpctl argument parser, re-arrange 'reason' parsing ('nei action [reason]')
to be more generic,  then change 'reload' to take take a '[reason]' also,
which will be logged by bgpd.
ok kn claudio

Revision 1.37 / (download) - annotate - [select for diffs], Tue Jun 25 07:44:20 2019 UTC (6 years, 3 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.36: +1 -3 lines
Diff to previous 1.36 (colored)

Remove irrfilter from bgpctl. The current code is not very useful.
Trying to parse RPSL has shown to be impossible. For now tools like
bgpq3 (in ports) can be used to generate AS and prefix sets based on
IRR data.
OK job@ deraadt@ sthen@ benno@

Revision 1.36 / (download) - annotate - [select for diffs], Mon Jun 17 11:03:07 2019 UTC (6 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.35: +2 -2 lines
Diff to previous 1.35 (colored)

Adjust and sync the code with the new struct community code from bgpd.
OK benno@

Revision 1.35 / (download) - annotate - [select for diffs], Mon Feb 11 15:47:55 2019 UTC (6 years, 7 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.34: +3 -1 lines
Diff to previous 1.34 (colored)

Adjust to last bgpd commit changing the MPLS VPN configuration.
Sync the community handling code to be in sync with parsing code of bgpd.
To inject networks into MPLS VPN it is required to specify the route
distinguisher as part of the attributes.
With and OK dlg@, OK denis@

Revision 1.34 / (download) - annotate - [select for diffs], Sun Jan 20 23:30:15 2019 UTC (6 years, 8 months ago) by claudio
Branch: MAIN
Changes since 1.33: +2 -1 lines
Diff to previous 1.33 (colored)

Allow 'neighbor descripton' to be used like neighbor group description
which will match all neighbors in that group. Works for
    bgpctl neighbor group <name> [clear|destroy|down|refresh|up]
    bgpctl show neighbor group <name> [messages|terse|timers]
    bgpctl show rib neighbor group <name> ...
Manpage bits from sthen@
OK benno@ sthen@

Revision 1.33 / (download) - annotate - [select for diffs], Wed Dec 19 15:27:29 2018 UTC (6 years, 9 months ago) by claudio
Branch: MAIN
Changes since 1.32: +1 -2 lines
Diff to previous 1.32 (colored)

Adjust bgpctl now that filter_extcommunity is no more.
OK benno@

Revision 1.32 / (download) - annotate - [select for diffs], Wed Nov 28 08:33:59 2018 UTC (6 years, 9 months ago) by claudio
Branch: MAIN
Changes since 1.31: +1 -2 lines
Diff to previous 1.31 (colored)

Adjust bgpctl to handle the community changes done in bgpd.
OK job@, phessler@

Revision 1.31 / (download) - annotate - [select for diffs], Mon Oct 1 23:09:53 2018 UTC (6 years, 11 months ago) by job
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.30: +2 -1 lines
Diff to previous 1.30 (colored)

Expose BGP Origin Validation state in bgpctl show commands

OK denis@ claudio@

Revision 1.30 / (download) - annotate - [select for diffs], Thu Aug 10 14:12:34 2017 UTC (8 years, 1 month ago) by benno
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.29: +2 -1 lines
Diff to previous 1.29 (colored)

handle extended communities in bgpctl.
From Dennis Fondras, thanks!
ok phessler@

Revision 1.29 / (download) - annotate - [select for diffs], Fri Jan 13 18:59:12 2017 UTC (8 years, 8 months ago) by phessler
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.28: +2 -1 lines
Diff to previous 1.28 (colored)

Add support for draft-ietf-idr-shutdown

    BGP state = Idle, marked down with shutdown reason "goodbye, we are
    upgrading to openbsd 6.1", down for 00:00:17

developed by Peter van Dijk <[email protected]> and Job
Snijders <[email protected]>, thank you!

OK benno@

Revision 1.28 / (download) - annotate - [select for diffs], Fri Oct 14 16:05:35 2016 UTC (8 years, 11 months ago) by phessler
Branch: MAIN
Changes since 1.27: +2 -1 lines
Diff to previous 1.27 (colored)

Add support for draft-ietf-idr-large-community

Joint work with Job Snijders, many thanks!
OK benno@ deraadt@

Revision 1.27 / (download) - annotate - [select for diffs], Fri Apr 17 07:51:09 2015 UTC (10 years, 5 months ago) by phessler
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9, OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.26: +3 -1 lines
Diff to previous 1.26 (colored)

parse_prefix in parse.c got changed but the declaration in bgpctl.c
wasn't updated, so we would crash when doing `bgpctl net bulk` commands.

Fix by moving parse_prefix into a header, since we use it in more than
one file.

crash found by henning@
underlying problem found by blambert@

OK sthen@ deraadt@ claudio@ henning@

Revision 1.26 / (download) - annotate - [select for diffs], Wed Oct 9 08:56:38 2013 UTC (11 years, 11 months ago) by phessler
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7, OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.25: +4 -2 lines
Diff to previous 1.25 (colored)

Allow us to bulk add / delete routes with the same attributes.  Really
useful for distributing IP lists.

OK beck@, claudio@, henning@

Revision 1.25 / (download) - annotate - [select for diffs], Thu Mar 7 21:28:34 2013 UTC (12 years, 6 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.24: +2 -1 lines
Diff to previous 1.24 (colored)

Implement a bgpctl nei foo destroy that will remove the specified cloned
neighbor. The neighbor must be set down before calling this function.
OK phessler

Revision 1.24 / (download) - annotate - [select for diffs], Sun May 27 18:53:50 2012 UTC (13 years, 4 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.23: +2 -1 lines
Diff to previous 1.23 (colored)

Make it possible to load mrt table dumps into bgpd. This is a debug tool but
it  allows anyone to use MRT table dumps to load prefixes into a bgpd instance.
For example you can download the RIPE dumps and load full-feeds onto your
laptop until the poor thing dies.
OK henning@ sthen@

Revision 1.23 / (download) - annotate - [select for diffs], Wed Sep 21 10:37:51 2011 UTC (14 years ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.22: +3 -1 lines
Diff to previous 1.22 (colored)

Make it possible to parse MRT table dumps (all 3 formats) and display
them like the show rib / show rib detail output. It is also possible
to filter the output. e.g.
   bgpctl show mrt file ./bview.20110914.1600 as 22512 204.209.0.0/16 all
OK sthen@, put it in henning@

Revision 1.22 / (download) - annotate - [select for diffs], Mon May 3 13:11:41 2010 UTC (15 years, 4 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.21: +4 -2 lines
Diff to previous 1.21 (colored)

Adjustments for multiple kroute table support. This adds a few new command
arguments (show tables and show fib table 1, etc).
Tested by sthen@, OK to move on by henning@

Revision 1.21 / (download) - annotate - [select for diffs], Sun Jan 10 00:16:23 2010 UTC (15 years, 8 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.20: +2 -2 lines
Diff to previous 1.20 (colored)

ribreq uses now a AID, use AID also on the parsing side and convert to
AF when necessary. OK henning@

Revision 1.20 / (download) - annotate - [select for diffs], Mon Nov 2 20:38:45 2009 UTC (15 years, 10 months ago) by claudio
Branch: MAIN
Changes since 1.19: +3 -1 lines
Diff to previous 1.19 (colored)

Implement "log verbose" and "log brief" to enable or disable verbose debug
logging. henning, sthen, michele like the idea

Revision 1.19 / (download) - annotate - [select for diffs], Sat Jun 6 06:05:41 2009 UTC (16 years, 3 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.18: +2 -1 lines
Diff to previous 1.18 (colored)

bgpctl part of allowing alternate RIBs to be shown. Had to use the
keyword table because show rib rib foo is strange.

Revision 1.18 / (download) - annotate - [select for diffs], Sat Jun 7 18:14:41 2008 UTC (17 years, 3 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.17: +12 -10 lines
Diff to previous 1.17 (colored)

teach the command lineparser about getopt style options after commands
use that for irrfilter mode.
hints from theo a year ago, code by me a year ago, ok claudio a year ago

Revision 1.17 / (download) - annotate - [select for diffs], Fri Apr 6 18:36:32 2007 UTC (18 years, 5 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.16: +2 -1 lines
Diff to previous 1.16 (colored)

Implement "bgpctl show neighbor <peer> terse" this will print all statistics
in an easily parseable form. This output can be used to implement SNMP MIBs
or rrdtool/mrtg update scripts. OK henning@

Revision 1.16 / (download) - annotate - [select for diffs], Wed Mar 28 12:34:08 2007 UTC (18 years, 6 months ago) by henning
Branch: MAIN
Changes since 1.15: +2 -1 lines
Diff to previous 1.15 (colored)

add support for bgpctl show rib community <community>
mostly from rivo nurges <[email protected]>, ok claudio

Revision 1.15 / (download) - annotate - [select for diffs], Sat Mar 3 11:45:30 2007 UTC (18 years, 6 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.14: +3 -2 lines
Diff to previous 1.14 (colored)

add irrfilter mode.
generates bgpd filter rules from the Internet Routing Registry aka IRR aka
the aut-num, as-set and route objects in the RIPE, ARIN, APNIC ... databases
accessed via whois, using the Routing Policy Specificaion Language RPSL.
implement the whois query interface, an RPSL parser (of course only the
parts we need), recursive as-set resolver, prefixes per AS lookup,
and an ouput module to make up the rules.
work in progress, not ready for general consumption yet.
import agreed by theo & claudio

Revision 1.14 / (download) - annotate - [select for diffs], Wed Aug 23 08:21:11 2006 UTC (19 years, 1 month ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.13: +2 -1 lines
Diff to previous 1.13 (colored)

Extend show rib command. Following new options are added:
 in: show the unfiltered input of a neighbor aka adj-rib-in
 out: show only the prefixes that are sent to a specified neighbor (adj-rib-out)
 neighbor <IP>: limit the output of the command to prefixes sent by the
                specified neighbor

OK henning@ manpage with help by jmc@ but the show rib section needs some
rework because it starts to be confusing. Actually the parser needs to get
smarter.

Revision 1.13 / (download) - annotate - [select for diffs], Thu Jun 15 09:59:48 2006 UTC (19 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored)

Shuffle some vars to make the struct ordered by size.

Revision 1.12 / (download) - annotate - [select for diffs], Tue May 23 12:14:34 2006 UTC (19 years, 4 months ago) by henning
Branch: MAIN
Changes since 1.11: +2 -1 lines
Diff to previous 1.11 (colored)

support requesting route refresh from a neighbor

Revision 1.11 / (download) - annotate - [select for diffs], Tue Jan 24 15:28:03 2006 UTC (19 years, 8 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.10: +2 -1 lines
Diff to previous 1.10 (colored)

introduce "bgpctl show summary terse", shows summary in an easy to parse
format, intended for monitoring puposes. claudio ok

Revision 1.10 / (download) - annotate - [select for diffs], Tue Jan 3 22:51:14 2006 UTC (19 years, 8 months ago) by claudio
Branch: MAIN
Changes since 1.9: +2 -1 lines
Diff to previous 1.9 (colored)

Show RIB statistics via "bgpctl show rib mem".

Revision 1.9 / (download) - annotate - [select for diffs], Mon Jun 6 17:13:56 2005 UTC (20 years, 3 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.8: +2 -1 lines
Diff to previous 1.8 (colored)

add support for a "family" token, allows to select address families

Revision 1.8 / (download) - annotate - [select for diffs], Mon May 23 20:09:00 2005 UTC (20 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.7: +2 -1 lines
Diff to previous 1.7 (colored)

Make it possible to dynamicaly add networks with attributes like communities
or metrics. Requested by beck@ OK henning@

Revision 1.7 / (download) - annotate - [select for diffs], Thu Dec 23 17:26:51 2004 UTC (20 years, 9 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.6: +4 -3 lines
Diff to previous 1.6 (colored)

allow "bgpctl neighbor" to take the peer's descr as argument as well
as its address
so "bgpctl neighbor upstream1 clear" now works and you don't have to
remember IPs
claudio ok

Revision 1.6 / (download) - annotate - [select for diffs], Fri Nov 19 14:45:57 2004 UTC (20 years, 10 months ago) by claudio
Branch: MAIN
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

Rename struct as_filter to struct filter_as.

Revision 1.5 / (download) - annotate - [select for diffs], Fri Aug 20 15:49:35 2004 UTC (21 years, 1 month ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.4: +2 -1 lines
Diff to previous 1.4 (colored)

add support for "bgpctl neighbor 1.2.3.4 clear", takes session down & up again
claudio ok

Revision 1.4 / (download) - annotate - [select for diffs], Fri May 21 11:52:32 2004 UTC (21 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.3: +6 -2 lines
Diff to previous 1.3 (colored)

Make it possible to add, delete, flush and show network announcements.
OK henning@

Revision 1.3 / (download) - annotate - [select for diffs], Tue Mar 2 19:32:43 2004 UTC (21 years, 6 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.2: +2 -1 lines
Diff to previous 1.2 (colored)

show rib A.B.C.D and show rib A.B.C.D/N [all] support. Now the most important
show commands are available. OK henning@

Revision 1.2 / (download) - annotate - [select for diffs], Thu Feb 26 16:19:58 2004 UTC (21 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.1: +3 -1 lines
Diff to previous 1.1 (colored)

Implement "show rib" and "show rib <astype> <AS>" commands to dump the
RIB. OK henning@

Revision 1.1 / (download) - annotate - [select for diffs], Wed Jan 21 23:45:18 2004 UTC (21 years, 8 months ago) by henning
Branch: MAIN

new parser.
completely table driven and not wired into the action code like the
previous parser...
i wanted to do this for some time, and now it was just due.

ok claudio@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.