Statistics
| Branch: | Revision:

iof-bird-daemon / proto / bgp / bgp.c @ 11cb6202

History | View | Annotate | Download (18.2 KB)

1
/*
2
 *        BIRD -- The Border Gateway Protocol
3
 *
4
 *        (c) 2000 Martin Mares <mj@ucw.cz>
5
 *
6
 *        Can be freely distributed and used under the terms of the GNU GPL.
7
 */
8

    
9
/**
10
 * DOC: Border Gateway Protocol
11
 *
12
 * The BGP protocol is implemented in three parts: |bgp.c| which takes care of the
13
 * connection and most of the interface with BIRD core, |packets.c| handling
14
 * both incoming and outgoing BGP packets and |attrs.c| containing functions for
15
 * manipulation with BGP attribute lists.
16
 *
17
 * As opposed to the other existing routing daemons, BIRD has a sophisticated core
18
 * architecture which is able to keep all the information needed by BGP in the
19
 * primary routing table, therefore no complex data structures like a central
20
 * BGP table are needed. This increases memory footprint of a BGP router with
21
 * many connections, but not too much and, which is more important, it makes
22
 * BGP much easier to implement.
23
 *
24
 * Each instance of BGP (corresponding to a single BGP peer) is described by a &bgp_proto
25
 * structure to which are attached individual connections represented by &bgp_connection
26
 * (usually, there exists only one connection, but during BGP session setup, there
27
 * can be more of them). The connections are handled according to the BGP state machine
28
 * defined in the RFC with all the timers and all the parameters configurable.
29
 *
30
 * In incoming direction, we listen on the connection's socket and each time we receive
31
 * some input, we pass it to bgp_rx(). It decodes packet headers and the markers and
32
 * passes complete packets to bgp_rx_packet() which distributes the packet according
33
 * to its type.
34
 *
35
 * In outgoing direction, we gather all the routing updates and sort them to buckets
36
 * (&bgp_bucket) according to their attributes (we keep a hash table for fast comparison
37
 * of &rta's and a &fib which helps us to find if we already have another route for
38
 * the same destination queued for sending, so that we can replace it with the new one
39
 * immediately instead of sending both updates). There also exists a special bucket holding
40
 * all the route withdrawals which cannot be queued anywhere else as they don't have any
41
 * attributes. If we have any packet to send (due to either new routes or the connection
42
 * tracking code wanting to send a Open, Keepalive or Notification message), we call
43
 * bgp_schedule_packet() which sets the corresponding bit in a @packet_to_send
44
 * bit field in &bgp_conn and as soon as the transmit socket buffer becomes empty,
45
 * we call bgp_fire_tx(). It inspects state of all the packet type bits and calls
46
 * the corresponding bgp_create_xx() functions, eventually rescheduling the same packet
47
 * type if we have more data of the same type to send.
48
 *
49
 * The processing of attributes consists of two functions: bgp_decode_attrs() for checking
50
 * of the attribute blocks and translating them to the language of BIRD's extended attributes
51
 * and bgp_encode_attrs() which does the converse. Both functions are built around a
52
 * @bgp_attr_table array describing all important characteristics of all known attributes.
53
 * Unknown transitive attributes are attached to the route as %EAF_TYPE_OPAQUE byte streams.
54
 */
55

    
56
#undef LOCAL_DEBUG
57

    
58
#include "nest/bird.h"
59
#include "nest/iface.h"
60
#include "nest/protocol.h"
61
#include "nest/route.h"
62
#include "nest/locks.h"
63
#include "conf/conf.h"
64
#include "lib/socket.h"
65
#include "lib/resource.h"
66
#include "lib/string.h"
67

    
68
#include "bgp.h"
69

    
70
struct linpool *bgp_linpool;                /* Global temporary pool */
71
static sock *bgp_listen_sk;                /* Global listening socket */
72
static int bgp_counter;                        /* Number of protocol instances using the listening socket */
73
static char *bgp_state_names[] = { "Idle", "Connect", "Active", "OpenSent", "OpenConfirm", "Established" };
74

    
75
static void bgp_connect(struct bgp_proto *p);
76
static void bgp_initiate(struct bgp_proto *p);
77
static void bgp_setup_listen_sk(void);
78

    
79

    
80
static void
81
bgp_close(struct bgp_proto *p UNUSED)
82
{
83
  ASSERT(bgp_counter);
84
  bgp_counter--;
85
  if (!bgp_counter)
86
    {
87
      rfree(bgp_listen_sk);
88
      bgp_listen_sk = NULL;
89
      rfree(bgp_linpool);
90
      bgp_linpool = NULL;
91
    }
92
}
93

    
94
/**
95
 * bgp_start_timer - start a BGP timer
96
 * @t: timer
97
 * @value: time to fire (0 to disable the timer)
98
 *
99
 * This functions calls tm_start() on @t with time @value and the
100
 * amount of randomization suggested by the BGP standard. Please use
101
 * it for all BGP timers.
102
 */
103
void
104
bgp_start_timer(timer *t, int value)
105
{
106
  if (value)
107
    {
108
      /* The randomization procedure is specified in RFC 1771: 9.2.3.3 */
109
      t->randomize = value / 4;
110
      tm_start(t, value - t->randomize);
111
    }
112
  else
113
    tm_stop(t);
114
}
115

    
116
/**
117
 * bgp_close_conn - close a BGP connection
118
 * @conn: connection to close
119
 *
120
 * This function takes a connection described by the &bgp_conn structure,
121
 * closes its socket and frees all resources associated with it.
122
 *
123
 * If the connection is being closed due to a protocol error, adjust
124
 * the connection restart timer as well according to the error recovery
125
 * policy set in the configuration.
126
 *
127
 * If the connection was marked as primary, it shuts down the protocol as well.
128
 */
129
void
130
bgp_close_conn(struct bgp_conn *conn)
131
{
132
  struct bgp_proto *p = conn->bgp;
133
  struct bgp_config *cf = p->cf;
134

    
135
  DBG("BGP: Closing connection\n");
136
  conn->packets_to_send = 0;
137
  rfree(conn->connect_retry_timer);
138
  conn->connect_retry_timer = NULL;
139
  rfree(conn->keepalive_timer);
140
  conn->keepalive_timer = NULL;
141
  rfree(conn->hold_timer);
142
  conn->hold_timer = NULL;
143
  rfree(conn->sk);
144
  conn->sk = NULL;
145
  conn->state = BS_IDLE;
146
  if (conn->error_flag > 1)
147
    {
148
      if (cf->disable_after_error)
149
        p->p.disabled = 1;
150
      if (p->last_connect && (bird_clock_t)(p->last_connect + cf->error_amnesia_time) < now)
151
        p->startup_delay = 0;
152
      if (!p->startup_delay)
153
        p->startup_delay = cf->error_delay_time_min;
154
      else
155
        {
156
          p->startup_delay *= 2;
157
          if (p->startup_delay > cf->error_delay_time_max)
158
            p->startup_delay = cf->error_delay_time_max;
159
        }
160
    }
161
  if (conn->primary)
162
    {
163
      bgp_close(p);
164
      p->conn = NULL;
165
      proto_notify_state(&p->p, PS_DOWN);
166
    }
167
  else if (conn->error_flag > 1)
168
    bgp_initiate(p);
169
}
170

    
171
static int
172
bgp_graceful_close_conn(struct bgp_conn *c)
173
{
174
  switch (c->state)
175
    {
176
    case BS_IDLE:
177
      return 0;
178
    case BS_CONNECT:
179
    case BS_ACTIVE:
180
      bgp_close_conn(c);
181
      return 1;
182
    case BS_OPENSENT:
183
    case BS_OPENCONFIRM:
184
    case BS_ESTABLISHED:
185
      bgp_error(c, 6, 0, NULL, 0);
186
      return 1;
187
    default:
188
      bug("bgp_graceful_close_conn: Unknown state %d", c->state);
189
    }
190
}
191

    
192
static void
193
bgp_send_open(struct bgp_conn *conn)
194
{
195
  DBG("BGP: Sending open\n");
196
  conn->sk->rx_hook = bgp_rx;
197
  conn->sk->tx_hook = bgp_tx;
198
  tm_stop(conn->connect_retry_timer);
199
  bgp_schedule_packet(conn, PKT_OPEN);
200
  conn->state = BS_OPENSENT;
201
  bgp_start_timer(conn->hold_timer, conn->bgp->cf->initial_hold_time);
202
}
203

    
204
static void
205
bgp_connected(sock *sk)
206
{
207
  struct bgp_conn *conn = sk->data;
208
  struct bgp_proto *p = conn->bgp;
209

    
210
  BGP_TRACE(D_EVENTS, "Connected");
211
  bgp_send_open(conn);
212
}
213

    
214
static void
215
bgp_connect_timeout(timer *t)
216
{
217
  struct bgp_conn *conn = t->data;
218
  struct bgp_proto *p = conn->bgp;
219

    
220
  DBG("BGP: connect_timeout\n");
221
  bgp_close_conn(conn);
222
  bgp_connect(p);
223
}
224

    
225
static void
226
bgp_sock_err(sock *sk, int err)
227
{
228
  struct bgp_conn *conn = sk->data;
229
  struct bgp_proto *p = conn->bgp;
230

    
231
  if (err)
232
    BGP_TRACE(D_EVENTS, "Connection lost (%M)", err);
233
  else
234
    BGP_TRACE(D_EVENTS, "Connection closed");
235
  switch (conn->state)
236
    {
237
    case BS_CONNECT:
238
    case BS_OPENSENT:
239
      rfree(conn->sk);
240
      conn->sk = NULL;
241
      conn->state = BS_ACTIVE;
242
      bgp_start_timer(conn->connect_retry_timer, p->cf->connect_retry_time);
243
      break;
244
    case BS_OPENCONFIRM:
245
    case BS_ESTABLISHED:
246
      bgp_close_conn(conn);
247
      break;
248
    default:
249
      bug("bgp_sock_err called in invalid state %d", conn->state);
250
    }
251
}
252

    
253
static void
254
bgp_hold_timeout(timer *t)
255
{
256
  struct bgp_conn *conn = t->data;
257

    
258
  DBG("BGP: Hold timeout, closing connection\n");
259
  bgp_error(conn, 4, 0, NULL, 0);
260
}
261

    
262
static void
263
bgp_keepalive_timeout(timer *t)
264
{
265
  struct bgp_conn *conn = t->data;
266

    
267
  DBG("BGP: Keepalive timer\n");
268
  bgp_schedule_packet(conn, PKT_KEEPALIVE);
269
}
270

    
271
static void
272
bgp_setup_conn(struct bgp_proto *p, struct bgp_conn *conn)
273
{
274
  timer *t;
275

    
276
  conn->sk = NULL;
277
  conn->bgp = p;
278
  conn->packets_to_send = 0;
279
  conn->error_flag = 0;
280
  conn->primary = 0;
281

    
282
  t = conn->connect_retry_timer = tm_new(p->p.pool);
283
  t->hook = bgp_connect_timeout;
284
  t->data = conn;
285
  t = conn->hold_timer = tm_new(p->p.pool);
286
  t->hook = bgp_hold_timeout;
287
  t->data = conn;
288
  t = conn->keepalive_timer = tm_new(p->p.pool);
289
  t->hook = bgp_keepalive_timeout;
290
  t->data = conn;
291
}
292

    
293
static void
294
bgp_setup_sk(struct bgp_proto *p, struct bgp_conn *conn, sock *s)
295
{
296
  s->data = conn;
297
  s->ttl = p->cf->multihop ? : 1;
298
  s->rbsize = BGP_RX_BUFFER_SIZE;
299
  s->tbsize = BGP_TX_BUFFER_SIZE;
300
  s->err_hook = bgp_sock_err;
301
  s->tos = IP_PREC_INTERNET_CONTROL;
302
  conn->sk = s;
303
}
304

    
305
/**
306
 * bgp_connect - initiate an outgoing connection
307
 * @p: BGP instance
308
 *
309
 * The bgp_connect() function creates a new &bgp_conn and initiates
310
 * a TCP connection to the peer. The rest of connection setup is governed
311
 * by the BGP state machine as described in the standard.
312
 */
313
static void
314
bgp_connect(struct bgp_proto *p)        /* Enter Connect state and start establishing connection */
315
{
316
  sock *s;
317
  struct bgp_conn *conn = &p->outgoing_conn;
318

    
319
  DBG("BGP: Connecting\n");
320
  p->last_connect = now;
321
  s = sk_new(p->p.pool);
322
  s->type = SK_TCP_ACTIVE;
323
  if (ipa_nonzero(p->cf->source_addr))
324
    s->saddr = p->cf->source_addr;
325
  else
326
    s->saddr = p->local_addr;
327
  s->daddr = p->cf->remote_ip;
328
  s->dport = BGP_PORT;
329
  BGP_TRACE(D_EVENTS, "Connecting to %I from local address %I", s->daddr, s->saddr);
330
  bgp_setup_conn(p, conn);
331
  bgp_setup_sk(p, conn, s);
332
  s->tx_hook = bgp_connected;
333
  conn->state = BS_CONNECT;
334
  if (sk_open(s))
335
    {
336
      bgp_sock_err(s, 0);
337
      return;
338
    }
339
  DBG("BGP: Waiting for connect success\n");
340
  bgp_start_timer(conn->connect_retry_timer, p->cf->connect_retry_time);
341
}
342

    
343
static void
344
bgp_initiate(struct bgp_proto *p)
345
{
346
  unsigned delay;
347

    
348
  delay = p->cf->start_delay_time;
349
  if (p->startup_delay > delay)
350
    delay = p->startup_delay;
351
  if (delay)
352
    {
353
      BGP_TRACE(D_EVENTS, "Connect delayed by %d seconds", delay);
354
      bgp_setup_conn(p, &p->outgoing_conn);
355
      bgp_start_timer(p->outgoing_conn.connect_retry_timer, delay);
356
    }
357
  else
358
    bgp_connect(p);
359
}
360

    
361
/**
362
 * bgp_incoming_connection - handle an incoming connection
363
 * @sk: TCP socket
364
 * @dummy: unused
365
 *
366
 * This function serves as a socket hook for accepting of new BGP
367
 * connections. It searches a BGP instance corresponding to the peer
368
 * which has connected and if such an instance exists, it creates a
369
 * &bgp_conn structure, attaches it to the instance and either sends
370
 * an Open message or (if there already is an active connection) it
371
 * closes the new connection by sending a Notification message.
372
 */
373
static int
374
bgp_incoming_connection(sock *sk, int dummy UNUSED)
375
{
376
  struct proto_config *pc;
377
  int match = 0;
378

    
379
  DBG("BGP: Incoming connection from %I port %d\n", sk->daddr, sk->dport);
380
  WALK_LIST(pc, config->protos)
381
    if (pc->protocol == &proto_bgp && pc->proto)
382
      {
383
        struct bgp_proto *p = (struct bgp_proto *) pc->proto;
384
        if (ipa_equal(p->cf->remote_ip, sk->daddr))
385
          {
386
            match = 1;
387
            if ((p->p.proto_state == PS_START || p->p.proto_state == PS_UP) && p->neigh && p->neigh->iface)
388
              {
389
                BGP_TRACE(D_EVENTS, "Incoming connection from %I port %d", sk->daddr, sk->dport);
390
                if (p->incoming_conn.sk)
391
                  {
392
                    DBG("BGP: But one incoming connection already exists, how is that possible?\n");
393
                    break;
394
                  }
395
                bgp_setup_conn(p, &p->incoming_conn);
396
                bgp_setup_sk(p, &p->incoming_conn, sk);
397
                bgp_send_open(&p->incoming_conn);
398
                return 0;
399
              }
400
          }
401
      }
402
  if (!match)
403
    log(L_AUTH "BGP: Unauthorized connect from %I port %d", sk->daddr, sk->dport);
404
  rfree(sk);
405
  return 0;
406
}
407

    
408
static void
409
bgp_setup_listen_sk(void)
410
{
411
  if (!bgp_listen_sk)
412
    {
413
      sock *s = sk_new(&root_pool);
414
      DBG("BGP: Creating incoming socket\n");
415
      s->type = SK_TCP_PASSIVE;
416
      s->sport = BGP_PORT;
417
      s->tos = IP_PREC_INTERNET_CONTROL;
418
      s->ttl = 1;
419
      s->rbsize = BGP_RX_BUFFER_SIZE;
420
      s->tbsize = BGP_TX_BUFFER_SIZE;
421
      s->rx_hook = bgp_incoming_connection;
422
      if (sk_open(s))
423
        {
424
          log(L_ERR "Unable to open incoming BGP socket");
425
          rfree(s);
426
        }
427
      else
428
        bgp_listen_sk = s;
429
    }
430
}
431

    
432
static void
433
bgp_start_neighbor(struct bgp_proto *p)
434
{
435
  p->local_addr = p->neigh->iface->addr->ip;
436
  DBG("BGP: local=%I remote=%I\n", p->local_addr, p->next_hop);
437
#ifdef IPV6
438
  {
439
    struct ifa *a;
440
    p->local_link = ipa_or(ipa_build(0xfe80,0,0,0), ipa_and(p->local_addr, ipa_build(0,0,~0,~0)));
441
    WALK_LIST(a, p->neigh->iface->addrs)
442
      if (a->scope == SCOPE_LINK)
443
        {
444
          p->local_link = a->ip;
445
          break;
446
        }
447
    DBG("BGP: Selected link-level address %I\n", p->local_link);
448
  }
449
#endif
450
  bgp_initiate(p);
451
}
452

    
453
static void
454
bgp_neigh_notify(neighbor *n)
455
{
456
  struct bgp_proto *p = (struct bgp_proto *) n->proto;
457

    
458
  if (n->iface)
459
    {
460
      BGP_TRACE(D_EVENTS, "Neighbor found");
461
      bgp_start_neighbor(p);
462
    }
463
  else
464
    {
465
      BGP_TRACE(D_EVENTS, "Neighbor lost");
466
      /* Send cease packets, but don't wait for them to be delivered */
467
      bgp_graceful_close_conn(&p->outgoing_conn);
468
      bgp_graceful_close_conn(&p->incoming_conn);
469
      proto_notify_state(&p->p, PS_DOWN);
470
    }
471
}
472

    
473
static void
474
bgp_start_locked(struct object_lock *lock)
475
{
476
  struct bgp_proto *p = lock->data;
477
  struct bgp_config *cf = p->cf;
478

    
479
  DBG("BGP: Got lock\n");
480
  p->local_id = cf->c.global->router_id;
481
  p->next_hop = cf->multihop ? cf->multihop_via : cf->remote_ip;
482
  p->neigh = neigh_find(&p->p, &p->next_hop, NEF_STICKY);
483
  if (!p->neigh)
484
    {
485
      log(L_ERR "%s: Invalid next hop %I", p->p.name, p->next_hop);
486
      p->p.disabled = 1;
487
      proto_notify_state(&p->p, PS_DOWN);
488
    }
489
  else if (p->neigh->iface)
490
    bgp_start_neighbor(p);
491
  else
492
    BGP_TRACE(D_EVENTS, "Waiting for %I to become my neighbor", p->next_hop);
493
}
494

    
495
static int
496
bgp_start(struct proto *P)
497
{
498
  struct bgp_proto *p = (struct bgp_proto *) P;
499
  struct object_lock *lock;
500

    
501
  DBG("BGP: Startup.\n");
502
  p->outgoing_conn.state = BS_IDLE;
503
  p->incoming_conn.state = BS_IDLE;
504
  p->startup_delay = 0;
505
  p->neigh = NULL;
506

    
507
  bgp_counter++;
508
  bgp_setup_listen_sk();
509
  if (!bgp_linpool)
510
    bgp_linpool = lp_new(&root_pool, 4080);
511

    
512
  /*
513
   *  Before attempting to create the connection, we need to lock the
514
   *  port, so that are sure we're the only instance attempting to talk
515
   *  with that neighbor.
516
   */
517

    
518
  lock = p->lock = olock_new(P->pool);
519
  lock->addr = p->cf->remote_ip;
520
  lock->type = OBJLOCK_TCP;
521
  lock->port = BGP_PORT;
522
  lock->iface = NULL;
523
  lock->hook = bgp_start_locked;
524
  lock->data = p;
525
  olock_acquire(lock);
526
  return PS_START;
527
}
528

    
529
static int
530
bgp_shutdown(struct proto *P)
531
{
532
  struct bgp_proto *p = (struct bgp_proto *) P;
533

    
534
  BGP_TRACE(D_EVENTS, "Shutdown requested");
535

    
536
  /*
537
   *  We want to send the Cease notification message to all connections
538
   *  we have open, but we don't want to wait for all of them to complete.
539
   *  We are willing to handle the primary connection carefully, but for
540
   *  the others we just try to send the packet and if there is no buffer
541
   *  space free, we'll gracefully finish.
542
   */
543

    
544
  proto_notify_state(&p->p, PS_STOP);
545
  if (!p->conn)
546
    {
547
      if (p->outgoing_conn.state != BS_IDLE)
548
        p->outgoing_conn.primary = 1;        /* Shuts protocol down after connection close */
549
      else if (p->incoming_conn.state != BS_IDLE)
550
        p->incoming_conn.primary = 1;
551
    }
552
  if (bgp_graceful_close_conn(&p->outgoing_conn) || bgp_graceful_close_conn(&p->incoming_conn))
553
    return p->p.proto_state;
554
  else
555
    {
556
      /* No connections open, shutdown automatically */
557
      bgp_close(p);
558
      return PS_DOWN;
559
    }
560
}
561

    
562
static struct proto *
563
bgp_init(struct proto_config *C)
564
{
565
  struct bgp_config *c = (struct bgp_config *) C;
566
  struct proto *P = proto_new(C, sizeof(struct bgp_proto));
567
  struct bgp_proto *p = (struct bgp_proto *) P;
568

    
569
  P->rt_notify = bgp_rt_notify;
570
  P->rte_better = bgp_rte_better;
571
  P->import_control = bgp_import_control;
572
  P->neigh_notify = bgp_neigh_notify;
573
  p->cf = c;
574
  p->local_as = c->local_as;
575
  p->remote_as = c->remote_as;
576
  p->is_internal = (c->local_as == c->remote_as);
577
  return P;
578
}
579

    
580
/**
581
 * bgp_error - report a protocol error
582
 * @c: connection
583
 * @code: error code (according to the RFC)
584
 * @subcode: error sub-code
585
 * @data: data to be passed in the Notification message
586
 * @len: length of the data
587
 *
588
 * bgp_error() sends a notification packet to tell the other side that a protocol
589
 * error has occurred (including the data considered erroneous if possible) and
590
 * closes the connection.
591
 */
592
void
593
bgp_error(struct bgp_conn *c, unsigned code, unsigned subcode, byte *data, int len)
594
{
595
  if (c->error_flag)
596
    return;
597
  bgp_log_error(c->bgp, "Error", code, subcode, data, (len > 0) ? len : -len);
598
  c->error_flag = 1 + (code != 6);
599
  c->notify_code = code;
600
  c->notify_subcode = subcode;
601
  c->notify_data = data;
602
  c->notify_size = (len > 0) ? len : 0;
603
  if (c->primary)
604
    proto_notify_state(&c->bgp->p, PS_STOP);
605
  bgp_schedule_packet(c, PKT_NOTIFICATION);
606
}
607

    
608
void
609
bgp_check(struct bgp_config *c)
610
{
611
  if (!c->local_as)
612
    cf_error("Local AS number must be set");
613
  if (!c->remote_as)
614
    cf_error("Neighbor must be configured");
615
  if (!bgp_as4_support && (c->local_as > 0xFFFF))
616
    cf_error("Local AS number out of range");
617
  if (!bgp_as4_support && (c->remote_as > 0xFFFF))
618
    cf_error("Neighbor AS number out of range");
619
}
620

    
621
static void
622
bgp_get_status(struct proto *P, byte *buf)
623
{
624
  struct bgp_proto *p = (struct bgp_proto *) P;
625

    
626
  if (P->proto_state == PS_DOWN)
627
    buf[0] = 0;
628
  else
629
    strcpy(buf, bgp_state_names[MAX(p->incoming_conn.state, p->outgoing_conn.state)]);
630
}
631

    
632
static int
633
bgp_reconfigure(struct proto *P, struct proto_config *C)
634
{
635
  struct bgp_config *new = (struct bgp_config *) C;
636
  struct bgp_proto *p = (struct bgp_proto *) P;
637
  struct bgp_config *old = p->cf;
638

    
639
  return !memcmp(((byte *) old) + sizeof(struct proto_config),
640
                 ((byte *) new) + sizeof(struct proto_config),
641
                 sizeof(struct bgp_config) - sizeof(struct proto_config));
642
}
643

    
644
struct protocol proto_bgp = {
645
  name:                        "BGP",
646
  template:                "bgp%d",
647
  attr_class:                EAP_BGP,
648
  init:                        bgp_init,
649
  start:                bgp_start,
650
  shutdown:                bgp_shutdown,
651
  get_status:                bgp_get_status,
652
  get_attr:                bgp_get_attr,
653
  reconfigure:                bgp_reconfigure,
654
  get_route_info:        bgp_get_route_info,
655
};