summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpctl
AgeCommit message (Collapse)Author
33 hoursConvert simple stuff in usr.sbin over to new imsgbuf_init behaviourClaudio Jeker
OK tb@
34 hoursUnify error reporting in various control programs.Claudio Jeker
Just use "read error" since the code also uses "write error" for the imsg_flush case. OK tb@
34 hoursRename imsg_init, imsg_clear, imsg_read, imsg_write and imsg_flush toClaudio Jeker
imsgbuf_init, imsgbuf_clear, imsgbuf_read, imsgbuf_write and imsgbuf_flush. This separates the imsgbuf API from the per-imsg API. OK tb@
34 hoursUse imsg_flush() instead of implementing the same by hand.Claudio Jeker
OK tb@
2024-10-01Use auth_conf.method instead of auth_state.method. The latter is always 0.Claudio Jeker
2024-10-01Adjust to the pfkey changes in bgpd.Claudio Jeker
OK tb@
2024-08-22inet_pton returns 0 and -1 for error.Florian Obser
Adjust the error check that is now wrong after the inet_aton -> inet_pton conversion. Noticed by & OK bluhm. OK tb
2024-08-21Use inet_pton to parse ext-communities with an IPv4 address.Florian Obser
No need for inet_aton's flexibility. OK claudio
2024-08-20Use stats.msg_queue_len instead of looking into the msgbuf struct.Claudio Jeker
OK tb@
2024-08-14Add 'bgpctl show rib filtered' support.Claudio Jeker
OK tb@
2024-08-12Print min-version of a RTR session.Claudio Jeker
OK tb@
2024-05-22Adjust code since remote_bgpid, bgpid and clusterid changed toClaudio Jeker
host byte order. OK tb@
2024-04-24announce_capa is no more.Claudio Jeker
OK tb@
2024-02-01Convert the mrtparser to use ibufs in many places.Claudio Jeker
More is possible but for now this covers most of the message parsers. OK tb@
2024-01-31Convert IMSG_CTL_SHOW_RIB_ATTR over to the new ibuf API.Claudio Jeker
This converts show_attr() and json_attr() and with that also the community specific functions. This removes some hacks inside of show_attr() that where added before. OK tb@
2024-01-30Adjust bgpctl to work with the modified aspath functions from util.cClaudio Jeker
While doing that convert IMSG_CTL_SHOW_RIB over to the new ibuf api. OK tb@
2024-01-25Siwtch IMSG_CTL_SHOW_RIB_COMMUNITIES over to the new ibuf api.Claudio Jeker
Adjust fmt_ext_community() to take a uint64_t as argument instead of passing a pointer. OK tb@
2024-01-23Adopt bgpctl code to the ibuf changes done in bgpd.Claudio Jeker
Adjust code that calls nlri_get_prefix() and friends to work with an ibuf. show_mrt_update() is mostly converted because of this. The output functions and the rest of the mrtparser are just minimally touched to keep the diff reasonable. OK tb@
2024-01-23Fixup more spacesClaudio Jeker
2024-01-23SpacesClaudio Jeker
2024-01-18Convert the simple imsgs to use imsg_get_data().Claudio Jeker
OK tb@
2024-01-11Move the 'Last received shutdown reason:' output a bit down where it makesClaudio Jeker
more sense.
2024-01-11Display the exported rtr session state and fix a missing indent.Claudio Jeker
OK tb@
2024-01-10Add missing newlines in printf.Claudio Jeker
2024-01-08Simplify the IMSG_CTL_KROUTE after the change in bgpd.Claudio Jeker
OK tb@
2023-12-19Show the RTR protocol version in the `bgpctl show rtr` output.Claudio Jeker
Knowing the version is essential to understand if ASPA PDUs are included or not. OK tb@
2023-11-20Rename struct imsgbuf *ibuf to *imsgbuf. Same was done in bgpd.Claudio Jeker
OK tb@
2023-11-20KNF, fix long line.Claudio Jeker
OK tb@
2023-11-20KNFClaudio Jeker
2023-09-06Add missing <sys/time.h> include for timespecsub()Claudio Jeker
2023-06-22KNFClaudio Jeker
2023-06-05Sync json.c with rpki-client rev 1.3:Claudio Jeker
Add an extra argument compact to json_do_object() to instruct the parser to dump this object on a single line. While one can select on an object to object basis for arrays the compact setting is inherited from the surrounding object. OK tb@
2023-05-09Rename 'invalid' to 'disqualified' in the 'show rib' table.Claudio Jeker
'invalid' conflicts with the 'in' keyword and the parser is not smart enough to handle this. As a secondary benefit the term 'invalid' is less overloaded. There are various reasons why prefixes are not eligible in the route decision process calling them all 'invalid' is a bit harsh. job@, tb@ and benno@ agree
2023-05-05Sync json.c with the one from rpki-client. This adds json_do_string().Claudio Jeker
Convert json_do_printf() calls using static strings or "%s" fmt over to json_do_string() in the json output. OK tb@
2023-04-28Same change as in bgpd:Claudio Jeker
Add explicit default labels in switch() statements with error handling. Right now these are not reachable. Should also clear some gcc warnings. OK tb@
2023-04-26Use < 0 for fprintf() error checking and not == -1.Claudio Jeker
2023-04-26Verify each fprintf call for success. On failure stop calling fprintfClaudio Jeker
and return -1 in json_do_finish(). tb@ thinks this is not to horrible
2023-04-26Use fprintf instead of printf and pass the FILE handle in json_do_start().Claudio Jeker
OK tb@
2023-04-26WhitespaceTheo Buehler
"please fix" json
2023-04-23Flowspec show support an address family argument. Copy the descriptionClaudio Jeker
from the very similar 'network show'.
2023-04-23For FLOWSPEC_SHOW conver the AID form regular inet/inet6 to flowspec versions.Claudio Jeker
OK tb@
2023-04-23Document flowspec commandsClaudio Jeker
OK tb@ jmc@
2023-04-21Adjust ext community handling to support the generic transitive communitiesClaudio Jeker
introduced with flowspec. OK tb@
2023-04-21Implement flowspec add and delete to add/remove flowspec rules dynamically.Claudio Jeker
OK tb@
2023-04-20Implement bgpctl show flowspec and bgpctl flowspec flush.Claudio Jeker
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@
2023-04-17Convert all users of parse_number() to also process the next elementClaudio Jeker
like it was done for communities. Again a fair amount of token tables disappear. OK tb@
2023-04-17In parse_prefix and parse_addr only touch the addr if the functions isClaudio Jeker
successful. Do not clear it all the time since that breaks the ANYTOKEN fallback since it resets the just set address on the next argument. OK tb@
2023-04-17Passing argv as tripple indirect pointer to match_token() is just strange.Claudio Jeker
Instead pass argc and argv as value and return the consumed number of arguments in argsused (normally 1). OK tb@
2023-04-17Rework how communities are parsed. Use tha fact that argv and argc areClaudio Jeker
available inside match_token() and peek and consume argv[1] and for ext-communities also argv[2]. OK tb@
2023-04-15Introduce an ANYTOKEN token which can be used instead of NOTOKEN to allowClaudio Jeker
to fall back to another table if no other element in the current table matched. ANYTOKEN needs to be the last element in a table. With this 'bgpctl show rib 192.0.2.1 detail' works. OK tb@