summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bgpctl/parser.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add `bgpctl show rtr` to display basic information about RTR sessions.claudio2021-02-161-1/+2
| | | | OK job@
* Add 'bgpctl show sets' to display information about the roa-set, as-sets,claudio2020-12-301-1/+2
| | | | | and prefix-sets loaded into bgpd. OK benno@
* Remove unused token BULK and for PREFIX and ADDRESS the table value is alwaysclaudio2020-05-121-14/+2
| | | | | | NULL so there is no need to change action in those cases. This was used some time ago by the show rib code. OK kn@, sthen@, benno@, deraadt@
* Add support for VPNv6 in the family keyword of show ribclaudio2020-05-111-2/+8
| | | | OK benno@ phessler@
* In bgpctl argument parser, re-arrange 'reason' parsing ('nei action [reason]')deraadt2020-05-101-13/+14
| | | | | | to be more generic, then change 'reload' to take take a '[reason]' also, which will be logged by bgpd. ok kn claudio
* delete wasteful ;;deraadt2020-01-221-4/+4
| | | | ok tedu
* when parsing ASN, don't \0-split the original string, as it may be neededderaadt2020-01-161-5/+7
| | | | | for error reporting. ok benno
* Implement 'bgpctl show rib 8.8.8.8 or-shorter' to show all routes coveringclaudio2019-09-271-1/+3
| | | | | 8.8.8.8. Additionally add 'or-longer' as an alias for 'all'. OK job@ sthen@
* The bgpctl parser can not handle neighbor and neighbors at the same time.claudio2019-06-281-2/+2
| | | | | It will always complain that neighbor is ambiguous. Switch neighbors to peers to resolve the issue.
* Remove irrfilter from bgpctl. The current code is not very useful.claudio2019-06-251-72/+1
| | | | | | | 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@
* Cleanup some spaces here as well. Again no binary change.claudio2019-06-171-3/+3
|
* Adjust and sync the code with the new struct community code from bgpd.claudio2019-06-171-57/+97
| | | | OK benno@
* Implement bgpctl show mrt neighbors, a command to print the neighbor tableclaudio2019-05-231-2/+3
| | | | | | | of MRT TABLE_DUMP_V2 dumps. It only works with TABLE_DUMP_V2 dumps on other table dumps the neighbor of the first entry is printed since those table dumps don't have a neighbor table. OK sthen@ benno@
* Include endian.h since htobe* or be*toh is used. Helps with protable.claudio2019-04-101-1/+2
| | | | OK deraadt@
* Adjust to the last bgpd change. sa2addr gets an extra agrument andclaudio2019-02-271-2/+2
| | | | | local and remote address in struct peer changed to bgpd_addrs. OK benno@
* Bring in fixes in the community parsing code done in parse.y and fixclaudio2019-02-181-5/+4
| | | | | a bug that sneaked in some time ago which broke large community parsing. Bug found by gcc on a linux box
* Adjust to last bgpd commit changing the MPLS VPN configuration.claudio2019-02-111-238/+260
| | | | | | | 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@
* Allow 'neighbor descripton' to be used like neighbor group descriptionclaudio2019-01-201-8/+31
| | | | | | | | | 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@
* Adjust bgpctl now that filter_extcommunity is no more.claudio2018-12-191-30/+25
| | | | OK benno@
* Adjust bgpctl to handle the community changes done in bgpd.claudio2018-11-281-64/+39
| | | | OK job@, phessler@
* add filter option based on origin validation statedenis2018-10-031-1/+9
| | | | OK claudio@
* When parsing AS numbers set both as_min and as_max to the parsed value.claudio2018-09-071-1/+2
| | | | Not strictly needed but better to have both initialized.
* Adjust after change of struct filter_as.claudio2018-09-051-2/+2
| | | | OK phessler@
* Introduce 'bgpctl show rib error' to show all prefixes that got flaggedclaudio2018-08-291-1/+2
| | | | | | | | invalid because of a soft parsing error. These prefixes are never eligible or valid but the listing may help to understand what is going on. 'bgpctl show rib error' run automatically on Adj-RIB-In since that is the only RIB that has such prefixes. OK sthen@ denis@
* Initialize the rtable in the requests send to bgpd to the currentbenno2018-07-101-1/+2
| | | | | | rtables process. With this you dont need to add "table N" to commands when talking to a bgpd not in rdomain 0. ok claudio@ phessler@
* Add "ssv" variant which turns a rib route output into a singlederaadt2017-10-151-1/+3
| | | | | | | semicolon-seperated line, so that grep and such can operate easier; then use tr ';' '\n' to convert it to normal form later. This helps with scanning vast swathes of routes.. ok benno claudio job
* handle extended communities in bgpctl.benno2017-08-101-2/+260
| | | | | From Dennis Fondras, thanks! ok phessler@
* let admins set an unknown well-known communityphessler2017-06-261-5/+1
| | | | | from Job Snijders ok phessler@ benno@
* add support for the "graceful shutdown" well-known community as describedphessler2017-06-261-2/+7
| | | | | | | in draft-ietf-grow-bgp-gshut from Job Snijders ok phessler@ benno@
* fix a crash when parsing large community given on the command linebenno2017-02-141-8/+13
| | | | | | found by jsg@, fixed by phessler@ and strsep() by me. fix memory leak jsg@ ok jsg@ phessler@
* draft-ietf-idr-shutdown extends to support a message on either ofphessler2017-02-131-2/+2
| | | | | | "Administrative Shutdown" or "Administrative Reset" patch submitted by Job Snijders, thanks!
* Add support for draft-ietf-idr-shutdownphessler2017-01-131-2/+22
| | | | | | | | | | 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 <peter.van.dijk@powerdns.com> and Job Snijders <job@ntt.net>, thank you! OK benno@
* Add support for draft-ietf-idr-large-communityphessler2016-10-141-1/+84
| | | | | Joint work with Job Snijders, many thanks! OK benno@ deraadt@
* Handle the blackhole well-known community in bgpctl as well (print itsthen2015-10-111-1/+6
| | | | | symbolically, and don't deny its use in 'bgpctl sh rib comm 65535:6666'). ok phessler@
* add "best" as an alias for "selected"phessler2015-10-111-1/+2
| | | | | | Helps finger memory for people used to Junipers OK benno@, claudio@
* these 3 files do not need sys/socket.hderaadt2015-10-051-2/+1
|
* parse_prefix in parse.c got changed but the declaration in bgpctl.cphessler2015-04-171-3/+1
| | | | | | | | | | | | 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@
* reduce redundant strlen calls by calling it once and saving the valuetedu2014-11-191-22/+25
|
* missing newline on error messagederaadt2014-01-051-2/+2
|
* Allow us to bulk add / delete routes with the same attributes. Reallyphessler2013-10-091-2/+11
| | | | | | useful for distributing IP lists. OK beck@, claudio@, henning@
* Implement a bgpctl nei foo destroy that will remove the specified clonedclaudio2013-03-071-1/+2
| | | | | neighbor. The neighbor must be set down before calling this function. OK phessler
* Make it possible to load mrt table dumps into bgpd. This is a debug tool butclaudio2012-05-271-1/+2
| | | | | | | 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@
* Introduce "selected" as show rib attribute to only show selected routes.claudio2012-03-271-1/+2
| | | | | | Can be combined like: bgpctl show rib nei peer1 selected to only show the routes that are used from neighbor peer1. Requested by and OK deraadt@, OK henning@
* Make it possible to parse MRT table dumps (all 3 formats) and displayclaudio2011-09-211-9/+67
| | | | | | | 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@
* Adjustments for multiple kroute table support. This adds a few new commandclaudio2010-05-031-10/+35
| | | | | arguments (show tables and show fib table 1, etc). Tested by sthen@, OK to move on by henning@
* res.flags is not only used by the irrfilter so initializing them withclaudio2010-03-081-2/+1
| | | | | | irrfilter flags is causing strange behaviour on other commands (like show fib). Set the IPV4 and IPV6 flags at the end unless one of them got already set. OK henning, sthen, deraadt
* Add VPNv4 to the understood address families in bgpctl.claudio2010-01-131-4/+11
| | | | OK henning@, reyk@
* ribreq uses now a AID, use AID also on the parsing side and convert toclaudio2010-01-101-3/+3
| | | | AF when necessary. OK henning@
* Update code to use the new AID address ids so that this works again withclaudio2009-12-011-12/+6
| | | | bgpd. Reads OK henning@
* Implement "log verbose" and "log brief" to enable or disable verbose debugclaudio2009-11-021-1/+9
| | | | logging. henning, sthen, michele like the idea