summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpctl
AgeCommit message (Collapse)Author
2023-03-09Add role output to bgpctl, also adjust the capability output.Claudio Jeker
Note, this changes the JSON output of neighbors a bit. Part of the large RFC9234 rework in bgpd. OK tb@
2023-03-02improve the Nd lines such that the format is consistent for theJason McIntyre
various *d, *conf, *ctl files (where relevant) and simple; also makes "man -k routing" more useful; help from claudio and florian ok claudio florian millert
2023-02-02Fix typoJob Snijders
2023-01-31Improve whitespace alignment of RTR error reportsJob Snijders
OK claudio@
2023-01-30Same parseextvalue() change as in parse.y rev 1.441Claudio Jeker
Use 2-byte ASnum encoding as a default when local-as/neighbor-as is used.
2023-01-24Fix typoJob Snijders
2023-01-24Implmement `bgpctl show rib avs invalid` and firends.Claudio Jeker
This will show all invalid ASPA paths. OK tb@
2023-01-24Print the ASPA validation state (avs) in various show rib outputs.Claudio Jeker
OK tb@
2023-01-17Teach bgpctl about ASPA tables.Claudio Jeker
OK tb@
2023-01-06sync with rpki-client 'more dastardly white spaces' commitTheo Buehler
2022-12-28spelling fixes; from paul tagliamonteJason McIntyre
any parts of his diff not taken are noted on tech
2022-12-22Denote multiple arguments with 'arg ...' not 'args'Klemens Nanni
A few programs used the plural in their synopsis which doesn't read as clear as the obvious triple-dot notation. mdoc(7) .Ar defaults to "file ..." if no arguments are given and consistent use of 'arg ...' matches that behaviour. Cleanup a few markups of the same argument so the text keeps reading naturally; omit unhelpful parts like 'if optional arguments are given, they are passed along' for tools like time(1) and timeout(1) that obviously execute commands with whatever arguments where given -- just like doas(1) which doesn't mention arguments in its DESCRIPTION in the first place. For expr(1) the difference between 'expressions' and 'expression ...' is crucial, as arguments must be passed as individual words. Feedback millert jmc schwarze deraadt OK jmc
2022-12-14Add missing type for OMT_INFO.Claudio Jeker
Changes output like this: # HELP bgpd bgpd information -# TYPE bgpd unknown +# TYPE bgpd info bgpd_info{nodename="xxx",domainname="xxx",release="7.7"} 1
2022-12-12Since bgpctl uses clock_gettime() and struct timespec switch ometric codeClaudio Jeker
over to handle struct timespec instead of struct timeval. This way no extra conversion is needed. OK tb@
2022-12-08bgpctl(8): ometric: measure elapsed time with monotonic clockScott Soule Cheloha
Prefer CLOCK_MONOTONIC to gettimeofday(2) when measuring elapsed time, as the UTC clock can jump around. ok claudio@
2022-12-06OpenMetrics is rather strict about naming metricsets.Claudio Jeker
Add a function that a) verifies that none of the special suffixes is used and b) that the name itself is not yet used already. Also when printing a counter _total has to be added to the metric name and for info metrics _info is added. With and OK tb@
2022-12-06Implement ometric_set_timeval() and ometric_set_timeval_with_labels()Claudio Jeker
Timestamps are special since they can require more significant bits than a double provides. Instead print them as pseudo float as suggested by the OpenMetrics draft. OK cheloha@
2022-12-05Revert and adjust the changes in ometric_set_state() from last commit.Claudio Jeker
Calling ometric_set_int_with_labels() for a state metric fails because there is a check in ometric_set_int comparing the type. Use olabels_add_extras() and ometric_set_int_value() instead.
2022-12-01Fix typo in variable peer_message_receiveClaudio Jeker
Noticed by tb@
2022-12-01Extend and rename ometric_set_int_with_label to ometric_set_int_with_labelsClaudio Jeker
Instead of passing a single key value pair allow for multiple keys and values. This is needed for rpki-client where 2 extra key value pairs are needed for some values. To simplify passing simple values introduce a OKV() macro which creates a compound literal array with the NULL terminal. OK tb@
2022-11-30Pass a FILE pointer to ometric_output_all() and use fprintf() instead ofClaudio Jeker
printing to stdout by default. Additionally check if fprintf() fails and return -1 in that case. With this ometric code can be used in rpki-client. OK tb@
2022-11-10A theoretical path exists where ext.data1 is not initialized byMoritz Buhl
parseextcommunity but used afterwards. Found by codechecker. OK claudio
2022-11-09Show the MPLS label of a L3VPN route in show fib output.Claudio Jeker
OK tb@
2022-11-07Fix some spelling errors.Moritz Buhl
OK claudio@
2022-11-01Use unsigned long long to store integer value. At least that can alwaysClaudio Jeker
be printed with %llu unlike uint64_t.
2022-10-18Switch from up/down time to time of last change.Claudio Jeker
Having metrics depend on session state makes reporting more complex. This now reports the number of seconds a session was up or down. OK tb@
2022-10-18Fix some spelling errorsJob Snijders
Thanks Marco D'Itri for spotting them OK claudio@
2022-10-17SHOW_METRICS for the actions enum. Just to match the rest.Claudio Jeker
2022-10-17Use metrics as the command name and document show metrics.Claudio Jeker
OK tb@
2022-10-17Implement openmetric output via bgpctl show metric commandClaudio Jeker
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@
2022-10-07Kill extra space in ext community ovs output.Claudio Jeker
Noticed by job@, OK tb@
2022-09-01Zap IRR RFC reference for the 'bgpctl irrfilter' command which was ↵Job Snijders
deprecated in 6.6
2022-08-31Remove the hash statistics print code. The RDE no longer sends theseClaudio Jeker
imsgs. OK tb@
2022-08-31Add missing OpenBSD id commentClaudio Jeker
2022-08-29aspath_refs is gone, adjust codeClaudio Jeker
2022-08-29report pending update and withdraw routes in the show neighbor output.Claudio Jeker
OK tb@
2022-08-17Use memset() instead of bzero().Claudio Jeker
OK tb@ deraadt@
2022-08-10fixup header for bgpctl show network so it lines up again.Claudio Jeker
OK tb@
2022-07-28Adjust bgpctl show fib output.Claudio Jeker
Remove F_DOWN from flags since kroutes can no longer be marked down. Also clean up the flag printing code and printf() and increase the size of destionation and gateway so that more IPv6 addrs fit. OK tb@
2022-07-08Use AID_MIN instead of 0 == AID_UNSPEC as foo loop start value where apropriateClaudio Jeker
OK tb@
2022-07-07Print dmetric for prefixes, this may still change in the future.Claudio Jeker
OK tb@
2022-06-27bgpctl bits for RFC 9234 support.Claudio Jeker
OK tb@
2022-06-23fmt_timeframe() cleanup. Remove the ring buffer, it is not required.Claudio Jeker
Ensure that the time_t is positive and print increadibly long timeframes of over 19 years just as weeks. OK tb@
2022-06-22Adjust code after changing struct ctl_show_nexthop to embed a struct kroute_fullClaudio Jeker
OK tb@
2022-06-22Fix last commit. addr is already a pointer.Claudio Jeker
Noticed by anton@
2022-06-21Use applymask() instead of inetXapplymask() since this code operates onClaudio Jeker
struct bgpd_addr. OK tb@
2022-06-16Remove prefixlen2mask() uasge outside of util.c. Instead use inet4applymask().Claudio Jeker
Neccessary after similar change in bgpd. OK tb@
2022-06-15Adjust after chaning F_BGPD_INSERTED to F_BGPD and removal of F_DYNAMICClaudio Jeker
2022-03-21Adjust to renaming of F_CTL_ACTIVE/F_PREF_ACTIVE to F_CTL_ACTIVE/F_PREF_BESTClaudio Jeker
OK tb@
2022-02-06Switch from u_intX_t types to stdint.h uintX_t like it was done in bgpd.Claudio Jeker
OK florian@ tb@