summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/bgpd.h
AgeCommit message (Collapse)Author
2004-01-06allow holdtime and holdtime min to be configuered per peerHenning Brauer
ok claudio@
2004-01-062004Henning Brauer
2004-01-05Big overhaul of the mrt code.Claudio Jeker
Dumping of incomming bgp messages is now possible and dumping the (not yet) filtered updates works too. Per neighbor dumps are still missing. OK henning@
2004-01-05allow fib couple/decouple based on an imsg received on the control socketHenning Brauer
by the SE and passed on to the main process
2004-01-04-new imsg CTL_RELOADHenning Brauer
-upong receival in the SE forward to parent -make sending messages from SE to parent work for that (was not required before) -parent reacts to that just like a SIGHUP, reread config file
2004-01-04allow "show neighbor" to be limited to one specific neighborHenning Brauer
2004-01-03move some session specific stuff to session.h and make the few filesHenning Brauer
that need it include that
2004-01-03decouple the peer list from bgpd_config.Henning Brauer
so many parts of bgpd are not at all interested in the session specific peer structs... allows for some further cleaning
2004-01-03send an imsg as list end indicatorHenning Brauer
2004-01-02move the socket name #define to bgpd.h and get rid of bgpdctl*Henning Brauer
2004-01-01listen on a AF_LOCAL socket for imsgs too.Henning Brauer
only implemented type yet is IMSG_CTL_SHOW_NEIGHBOR which sends back the struct peer for all neighbors. will be used by bgpdctl
2004-01-01now that imsg_get uses bigger buffers, one read call can put more than oneHenning Brauer
imsg into the buffer. since imsg_get by definition only returns one imsg we missed the next imsg(s) until the next poll event on the socket in question, building up a queue on that socket. didn't show up as a problem yet... factor out imsg_read, which reads into the buffer. imsg_get now entirely operates on the buffers and does not read(2) itself. make all callers cope by calling imsg_read on poll events and calling imsg_get in a loop until all imsgs are processed.
2003-12-28redo the imsg readers to use bigger buffers and less read(2)s. should increaseHenning Brauer
performance even further. gets rif od struct imsg_readbuf; rename peer_read_buf to read_buf as that is more appropriate now.
2003-12-27keep a copy of the fd locally instead of passing it around all timeHenning Brauer
2003-12-27provide kroute_fib_couple and _decouple, pumping all bgp routes from theHenning Brauer
internal view to the kernel routing table respectively removing them all from the kernel routing table kroute_shutdown is now a simple wrapper to kroute_fib_decouple
2003-12-27implement "no fib-update" much coolerHenning Brauer
2003-12-26add option 'log updates' to log updates. ok henning@Jakob Schlyter
2003-12-26constify; ok henning@Jakob Schlyter
2003-12-26when this project started and i added the fatal() function, I made it takeHenning Brauer
the error number as parameter instead of accessing errno, because in one place the error number was not in errno but fetched from a socket. now, of course it makes much more sense to just set errno to the error number just fecthed in this one place instead of having hundreds of fatal() calls all transfer the errno round and round and round... fix this, and also provide a fatalx, which does not care for errno and doesn't invoke strerror. oh, btw, in the place where we fetch the err # from the socket, we don't call fatal anymore anyway...
2003-12-26by making kroute_dispatch_msg() and kroute_nexthop_add() return int insteadHenning Brauer
of void they can now report errors upstream and do not need to panic any more. so do that and handle the errors in bgpd.c in the vein that we at least can clean up before exit. there are no direct fatal() call in kroute.c now any more, nor any in bgpd.c after forking.
2003-12-26provide a real log_errHenning Brauer
2003-12-26log_err -> log_peer_errHenning Brauer
log_errx -> log_peer_errx because that is what they really are, peer specific.
2003-12-26log nexthop status changesHenning Brauer
2003-12-26+ log_ntoa, a simple helper funtion that doesn't require a struct in_addr...Henning Brauer
2003-12-26remove he pathetic log_kroute()Henning Brauer
not used anywhere anyway
2003-12-26handle IMSG_NEXTHOP_DELETE as wellHenning Brauer
2003-12-26kroute_nexthop_check -> kroute_nexthop_addHenning Brauer
kroute_validate_nexthop -> kroute_nexthop_insert
2003-12-26kroute_validate_nexthop is a private functionHenning Brauer
2003-12-26finally marry rde and kroute parts of the nexthop verification:Henning Brauer
handle IMSG_NEXTHOP_ADD and send IMSG_NEXTHOP_UPDATE when appropriate
2003-12-25RDE part of the nexthop verification puzzle.Claudio Jeker
The RDE just tracks the nexthop IPs and reacts on nexthop messages from the parent. ok henning@
2003-12-25bring us closer to a complete nexthop verification that does NOT needHenning Brauer
periodic scans: -keep a tree of nexthops with valid/invalid flags -provide kroute_match, which takes an IP address and gives the kernel route for that -find the kernel route for a given nexthop with that -keep a marker on the kernel route that a nexthop depends on it -on removal of the kernel route, re-evaluate the affected nexthops for validity. ok claudio@
2003-12-25track routing table changes that are _not_ caused by bgpd itselfHenning Brauer
ok claudio@
2003-12-25implement "passive": do not attempt to open a tcp connection to theHenning Brauer
neighbor system
2003-12-25kill IMSG_KROUTE_ADD as well. just send KROUTE_CHANGE requests.Henning Brauer
2003-12-25it actually makes more sense to call the merged function kroute_changeHenning Brauer
2003-12-25kroute_change is obsolete, long live kroute_addHenning Brauer
2003-12-24following up on a discussion with theo, read(2) as much as possible at onceHenning Brauer
and process the bgp messages after each other out of that big buffer. gives a nice speedup, easier code and earlier connection close detection.
2003-12-24now that the main process can cleanup without RDE's help, we do not need theHenning Brauer
somewhat fragile IMSG_SHUTDOWN_* stuff any more. speeds shutdown up enourmously. ok claudio@
2003-12-24now that we keep track of the routes we added to the kernel we can removeHenning Brauer
them easily on shutdown without the RDE's help
2003-12-24add log_kroute()Henning Brauer
2003-12-24add option to not touch the kernel routing tableHenning Brauer
2003-12-23send shutdown requests to the child processes and wait for a ackmessage fromHenning Brauer
them when shutting down. the rde needs the main process to clean up the routing table on exit so the parent process needs to be in service until the RDE is done. ok claudio@
2003-12-23allow the listening address to be specified, default to INADDR_ANYHenning Brauer
should make jose@ happy
2003-12-22o add low-level functions for adding/chaining/removing kernel routesHenning Brauer
o define new imsg types for this o process these imsgs in the parent process now "only" debugging and the rde sending these messages is missing. ok claudio@
2003-12-22add a configtest modeHenning Brauer
2003-12-21rename get_imsg() to imsg_get(); that's more consistentHenning Brauer
2003-12-21wrap read & write buffers for imsgs into a struct.Henning Brauer
finally gives us read buffers per pipe instead of per process, eleminating a possible race. also gets us a real imsg_init() that does all the boring init work
2003-12-21overhaul the write buffering code.Henning Brauer
introduce msgbuf API and bundle all info needed for the write buffers in a struct msgbuf. also switch to a write queue per handled connection (each bgp session, each pipe) instead of one big one. fixes some subtle problems and is overall nicer. ok claudio@
2003-12-21queued_reads in struct peer was not ever used exept for an initialization to 0Henning Brauer
2003-12-21yet more from the castathon; most aspath functions where accessing non-Claudio Jeker
aligned memory (u_int16_t) therefor crashed the RDE on my sparc64. All buffer specific functions use now void * instead of u_char * so most cast are now history. Tested on sparc64 and i386. OK henning@