コード例 #1
0
ファイル: bgp.c プロジェクト: rogerhu/dd-wrt
void
bgp_conn_enter_idle_state(struct bgp_conn *conn)
{
    struct bgp_proto *p = conn->bgp;
    int os = conn->state;

    bgp_close_conn(conn);
    bgp_conn_set_state(conn, BS_IDLE);
    ev_schedule(p->event);

    if (os == BS_ESTABLISHED)
        bgp_conn_leave_established_state(p);
}
コード例 #2
0
ファイル: bgp.c プロジェクト: i3149/bird
void
bgp_conn_enter_close_state(struct bgp_conn *conn)
{
  struct bgp_proto *p = conn->bgp;
  int os = conn->state;

  bgp_conn_set_state(conn, BS_CLOSE);
  tm_stop(conn->hold_timer);
  tm_stop(conn->keepalive_timer);
  conn->sk->rx_hook = NULL;

  if (os == BS_ESTABLISHED)
    bgp_conn_leave_established_state(p);
}
コード例 #3
0
ファイル: bgp.c プロジェクト: rogerhu/dd-wrt
void
bgp_conn_enter_close_state(struct bgp_conn *conn)
{
    struct bgp_proto *p = conn->bgp;
    int os = conn->state;

    bgp_conn_set_state(conn, BS_CLOSE);
    tm_stop(conn->keepalive_timer);
    conn->sk->rx_hook = NULL;

    /* Timeout for CLOSE state, if we cannot send notification soon then we just hangup */
    bgp_start_timer(conn->hold_timer, 10);

    if (os == BS_ESTABLISHED)
        bgp_conn_leave_established_state(p);
}