Newer
Older
log "github.com/sirupsen/logrus"
"github.com/bio-routing/bio-rd/net"
"github.com/bio-routing/bio-rd/protocols/bgp/packet"
"github.com/bio-routing/bio-rd/route"
"github.com/bio-routing/bio-rd/routingtable"
}
func newUpdateSender(fsm *FSM) *UpdateSender {
return &UpdateSender{
fsm: fsm,
iBGP: fsm.localASN == fsm.remoteASN,
// AddPath serializes a new path and sends out a BGP update message
func (u *UpdateSender) AddPath(pfx net.Prefix, p *route.Path) error {
log.Errorf("Unable to create BGP Update: %v", err)
return nil
Christoph Petrausch
committed
update := &packet.BGPUpdate{
Christoph Petrausch
committed
NLRI: &packet.NLRI{
IP: pfx.Addr(),
Pfxlen: pfx.Pfxlen(),
Christoph Petrausch
committed
return serializeAndSendUpdate(u.fsm.con, update)
func (u *UpdateSender) RemovePath(pfx net.Prefix, p *route.Path) bool {
err := withDrawPrefixes(u.fsm.con, pfx)
return err == nil
func (u *UpdateSender) UpdateNewClient(client routingtable.RouteTableClient) error {
log.Warningf("BGP Update Sender: UpdateNewClient() not supported")