summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bgpctl/parser.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Add -4 and -6 flags to irrfilter mode, allowing you to only fetch (yousthen2009-09-081-2/+9
| | | | | | guessed it) v4 or v6 from the IRR. Reduces size of the filter file (and thus router resource use) when you only speak IPv4 but you want to filter peers who announce lots of v6 space. ok claudio@
* Just use UINT_MAX as the maximum 4-byte AS number. It is good enough here.claudio2009-08-311-2/+2
|
* Kill copies of prefixlen2mask and inet6applymask their now in util.cclaudio2009-06-121-28/+1
|
* bgpctl part of allowing alternate RIBs to be shown. Had to use theclaudio2009-06-061-1/+21
| | | | keyword table because show rib rib foo is strange.
* allow bgpctl and bgpd.conf to contain 32-bit ASN written in ASPLAINsthen2009-04-231-2/+2
| | | | format (RFC5396). ok claudio@ henning@
* Fix AS check in parse_community() -- well-known communities have the ASclaudio2008-08-311-3/+3
| | | | | part set to COMMUNITY_WELLKNOWN which is the same as USHRT_MAX. Figured out by Greg Skinner
* Fix minor mem leak in case parse_addr() fails.claudio2008-06-151-2/+4
|
* getcwd can return NULL on error, so handle that case properly.tobias2008-06-111-2/+5
| | | | ok henning
* teach the command lineparser about getopt style options after commandshenning2008-06-071-7/+57
| | | | | use that for irrfilter mode. hints from theo a year ago, code by me a year ago, ok claudio a year ago
* do not fallthroughderaadt2007-10-141-1/+2
|
* Use COMMUNITY_UNSET in bgpctl as well. This makes it possible to filterclaudio2007-05-311-1/+3
| | | | on communities with 0 in them.
* parse_asnum must return 0 (no match) if word is not an as number insteadhenning2007-05-281-1/+4
| | | | | | of bitching and erroring out. worked so far because at the position it kicked in, only asnumor nothing were allowed
* bgpctl needs to know about 4-byte AS numbers as well.claudio2007-04-231-8/+19
|
* Implement "bgpctl show neighbor <peer> terse" this will print all statisticsclaudio2007-04-061-2/+3
| | | | | in an easily parseable form. This output can be used to implement SNMP MIBs or rrdtool/mrtg update scripts. OK henning@
* some KNF, partially pt out by rivo nurges <rix@estpak.ee>henning2007-03-311-4/+4
|
* add support for bgpctl show rib community <community>henning2007-03-281-1/+11
| | | | mostly from rivo nurges <rix@estpak.ee>, ok claudio
* support "bgpctl show rib peer-as NN", From: Armin Wolfermann <aw@osn.de>henning2007-03-071-1/+2
| | | | ok theo
* add irrfilter mode.henning2007-03-031-1/+15
| | | | | | | | | | | 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
* minor KNF bits here toohenning2007-02-221-4/+3
|
* Correct function name in err() message.claudio2007-02-011-2/+2
|
* Switch from strtoul() to strtonum() making the code easier to read.claudio2007-01-311-53/+29
| | | | OK henning@
* Correctly detect missing arguments. Same diff as in ospfctl. OK henning@claudio2007-01-251-4/+6
|
* Extend show rib command. Following new options are added:claudio2006-08-231-8/+28
| | | | | | | | | | | 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.
* Move the PREFIX token to the end of the list. The other tokens are moreclaudio2006-06-151-2/+2
| | | | specific in what they match.
* Use inet_net_pton() instead of inet_pton() so that it is possible to useclaudio2006-06-141-2/+2
| | | | 10/8 as prefix. OK henning@
* change keyword for route refresh request to just refresh, discussed withhenning2006-05-261-2/+2
| | | | claudio
* support requesting route refresh from a neighborhenning2006-05-231-5/+6
|
* Detailed RIB output including communities. Detailed output is enabled viaclaudio2006-03-221-1/+2
| | | | | the "detailed" keyword. Currently only works for IP or prefix lookups like "bgpctl show rib detail 199.185.137.3". Requested by many, looks good henning@
* inet_pton() may return 1, 0 or -1. Only 1 is success so check explicitlyclaudio2006-02-091-2/+2
| | | | for it. OK henning@
* introduce "bgpctl show summary terse", shows summary in an easy to parsehenning2006-01-241-2/+9
| | | | format, intended for monitoring puposes. claudio ok
* Show RIB statistics via "bgpctl show rib mem".claudio2006-01-031-1/+2
|
* Don't use fatal() and friend in bgpctl. The log system does not work here.claudio2006-01-031-2/+2
|
* Fix parse_prefix() for IPv4 addresses. Looks like fallout after IPv6 addition.claudio2005-12-301-4/+2
| | | | Now bgpctl show rib 129.128.5.191 works again.
* tabs on empty linesclaudio2005-11-291-3/+3
|
* Add IPv6 support for the address and prefix parser. OK henning@claudio2005-11-021-14/+77
|
* allow "show rib" to be limited to an address family toohenning2005-09-201-1/+2
|
* for consistency, make "show network" and alias for "network show"henning2005-09-201-1/+2
|
* allow the "show network" output to be limited to a given address familyhenning2005-09-201-2/+9
|
* fix breakage; if this proves to be wrong, will be fixed later. at leastfgsch2005-07-011-6/+6
| | | | make build will work now.
* use prefixlen2mask() instead of doing the bitshifting by hand; fixes thehenning2005-06-161-2/+12
| | | | | zero prefixlen case (32 bit shift on 32 bit val -> undefined result) spotted by Moritz Grimm and otto
* In case strlcpy() indicates that a string was truncated fail with errx().claudio2005-06-071-8/+5
| | | | No need for other strange constructs. OK henning@
* add support for a "family" token, allows to select address familieshenning2005-06-061-2/+20
|
* grr, more whitespace KNF, more carrot for claudiohenning2005-06-051-3/+3
|
* Make it possible to dynamicaly add networks with attributes like communitiesclaudio2005-05-231-6/+322
| | | | or metrics. Requested by beck@ OK henning@
* allo the "bgpctl show neighbor " commands to take the neighbor descrhenning2004-12-231-1/+2
| | | | too, claudio ok
* must only try to match PEERDESC of nothing else matched, it's just a stringhenning2004-12-231-2/+2
| | | | and will match almost everything...
* allow "bgpctl neighbor" to take the peer's descr as argument as wellhenning2004-12-231-3/+17
| | | | | | | as its address so "bgpctl neighbor upstream1 clear" now works and you don't have to remember IPs claudio ok
* ease the parser a bit.henning2004-10-261-19/+8
| | | | | | | | | parse() now wants the first argv member to be the first argument it parses, i. e. it does not skip over argv[0] any more, caller has to account for that. the caller does the usual getopt followed by argv += optind; argc -= optind; dance so this is accounted for. in parse() don't use a seperate curarg counter, just in/decrease argv/argc claudio ok
* add support for "bgpctl neighbor 1.2.3.4 clear", takes session down & up againhenning2004-08-201-1/+2
| | | | claudio ok
* print '<cr>' instead of '(nothing)' when we hit the end token in thehenning2004-06-171-2/+2
| | | | context-dependent usage help