summaryrefslogtreecommitdiffstats
path: root/proto/bgp/bgp.c
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-03-21 16:53:50 +0100
committerMartin Mares <mj@ucw.cz>2000-03-21 16:53:50 +0100
commit72a6ef11fe6589d0f4d5158c207ff8a0669becc3 (patch)
treea628b72e43d9d8bab7a3a4cf19d54d8374bb345c /proto/bgp/bgp.c
parenta8f944cb6e6c75c1aac2500ccf1f3905c4c3fd7a (diff)
downloadbird-72a6ef11fe6589d0f4d5158c207ff8a0669becc3.tar
bird-72a6ef11fe6589d0f4d5158c207ff8a0669becc3.zip
Construction of BGP packets.
Diffstat (limited to 'proto/bgp/bgp.c')
-rw-r--r--proto/bgp/bgp.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c
index 40915a4..c52e8bd 100644
--- a/proto/bgp/bgp.c
+++ b/proto/bgp/bgp.c
@@ -78,21 +78,13 @@ bgp_start_timer(timer *t, int value)
tm_start(t, value);
}
-static int
-bgp_rx(sock *sk, int size)
-{
- DBG("BGP: Got %d bytes\n", size);
-
- return 1; /* Start from the beginning */
-}
-
static void
bgp_send_open(struct bgp_conn *conn)
{
DBG("BGP: Sending open\n");
conn->sk->rx_hook = bgp_rx;
tm_stop(conn->connect_retry_timer);
- /* FIXME */
+ bgp_schedule_packet(conn, PKT_OPEN);
conn->state = BS_OPENSENT;
}
@@ -174,14 +166,14 @@ bgp_setup_sk(struct bgp_proto *p, struct bgp_conn *conn, sock *s)
s->data = conn;
s->ttl = p->cf->multihop ? : 1;
s->rbsize = BGP_RX_BUFFER_SIZE;
-#if 0
+ s->tbsize = BGP_TX_BUFFER_SIZE;
s->tx_hook = bgp_tx;
-#endif
s->err_hook = bgp_err;
s->tos = IP_PREC_INTERNET_CONTROL;
conn->bgp = p;
conn->sk = s;
+ conn->packets_to_send = 0;
t = conn->connect_retry_timer = tm_new(p->p.pool);
t->hook = bgp_connect_timeout;