llc_conn.c (af426d327c38bcb8cbb87c60134d42d2e93b20cc) | llc_conn.c (590232a7150674b2036291eaefce085f3f9659c8) |
---|---|
1/* 2 * llc_conn.c - Driver routines for connection component. 3 * 4 * Copyright (c) 1997 by Procom Technology, Inc. 5 * 2001-2003 by Arnaldo Carvalho de Melo <acme@conectiva.com.br> 6 * 7 * This program can be redistributed or modified under the terms of the 8 * GNU General Public License as published by the Free Software Foundation. --- 26 unchanged lines hidden (view full) --- 35 struct llc_conn_state_trans *trans, 36 struct sk_buff *ev); 37static struct llc_conn_state_trans *llc_qualify_conn_ev(struct sock *sk, 38 struct sk_buff *skb); 39 40/* Offset table on connection states transition diagram */ 41static int llc_offset_table[NBR_CONN_STATES][NBR_CONN_EV]; 42 | 1/* 2 * llc_conn.c - Driver routines for connection component. 3 * 4 * Copyright (c) 1997 by Procom Technology, Inc. 5 * 2001-2003 by Arnaldo Carvalho de Melo <acme@conectiva.com.br> 6 * 7 * This program can be redistributed or modified under the terms of the 8 * GNU General Public License as published by the Free Software Foundation. --- 26 unchanged lines hidden (view full) --- 35 struct llc_conn_state_trans *trans, 36 struct sk_buff *ev); 37static struct llc_conn_state_trans *llc_qualify_conn_ev(struct sock *sk, 38 struct sk_buff *skb); 39 40/* Offset table on connection states transition diagram */ 41static int llc_offset_table[NBR_CONN_STATES][NBR_CONN_EV]; 42 |
43int sysctl_llc2_ack_timeout = LLC2_ACK_TIME * HZ; 44int sysctl_llc2_p_timeout = LLC2_P_TIME * HZ; 45int sysctl_llc2_rej_timeout = LLC2_REJ_TIME * HZ; 46int sysctl_llc2_busy_timeout = LLC2_BUSY_TIME * HZ; 47 |
|
43/** 44 * llc_conn_state_process - sends event to connection state machine 45 * @sk: connection 46 * @skb: occurred event 47 * 48 * Sends an event to connection state machine. After processing event 49 * (executing it's actions and changing state), upper layer will be 50 * indicated or confirmed, if needed. Returns 0 for success, 1 for --- 743 unchanged lines hidden (view full) --- 794{ 795 struct llc_sock *llc = llc_sk(sk); 796 797 llc->state = LLC_CONN_STATE_ADM; 798 llc->inc_cntr = llc->dec_cntr = 2; 799 llc->dec_step = llc->connect_step = 1; 800 801 init_timer(&llc->ack_timer.timer); | 48/** 49 * llc_conn_state_process - sends event to connection state machine 50 * @sk: connection 51 * @skb: occurred event 52 * 53 * Sends an event to connection state machine. After processing event 54 * (executing it's actions and changing state), upper layer will be 55 * indicated or confirmed, if needed. Returns 0 for success, 1 for --- 743 unchanged lines hidden (view full) --- 799{ 800 struct llc_sock *llc = llc_sk(sk); 801 802 llc->state = LLC_CONN_STATE_ADM; 803 llc->inc_cntr = llc->dec_cntr = 2; 804 llc->dec_step = llc->connect_step = 1; 805 806 init_timer(&llc->ack_timer.timer); |
802 llc->ack_timer.expire = LLC_ACK_TIME; | 807 llc->ack_timer.expire = sysctl_llc2_ack_timeout; |
803 llc->ack_timer.timer.data = (unsigned long)sk; 804 llc->ack_timer.timer.function = llc_conn_ack_tmr_cb; 805 806 init_timer(&llc->pf_cycle_timer.timer); | 808 llc->ack_timer.timer.data = (unsigned long)sk; 809 llc->ack_timer.timer.function = llc_conn_ack_tmr_cb; 810 811 init_timer(&llc->pf_cycle_timer.timer); |
807 llc->pf_cycle_timer.expire = LLC_P_TIME; | 812 llc->pf_cycle_timer.expire = sysctl_llc2_p_timeout; |
808 llc->pf_cycle_timer.timer.data = (unsigned long)sk; 809 llc->pf_cycle_timer.timer.function = llc_conn_pf_cycle_tmr_cb; 810 811 init_timer(&llc->rej_sent_timer.timer); | 813 llc->pf_cycle_timer.timer.data = (unsigned long)sk; 814 llc->pf_cycle_timer.timer.function = llc_conn_pf_cycle_tmr_cb; 815 816 init_timer(&llc->rej_sent_timer.timer); |
812 llc->rej_sent_timer.expire = LLC_REJ_TIME; | 817 llc->rej_sent_timer.expire = sysctl_llc2_rej_timeout; |
813 llc->rej_sent_timer.timer.data = (unsigned long)sk; 814 llc->rej_sent_timer.timer.function = llc_conn_rej_tmr_cb; 815 816 init_timer(&llc->busy_state_timer.timer); | 818 llc->rej_sent_timer.timer.data = (unsigned long)sk; 819 llc->rej_sent_timer.timer.function = llc_conn_rej_tmr_cb; 820 821 init_timer(&llc->busy_state_timer.timer); |
817 llc->busy_state_timer.expire = LLC_BUSY_TIME; | 822 llc->busy_state_timer.expire = sysctl_llc2_busy_timeout; |
818 llc->busy_state_timer.timer.data = (unsigned long)sk; 819 llc->busy_state_timer.timer.function = llc_conn_busy_tmr_cb; 820 821 llc->n2 = 2; /* max retransmit */ 822 llc->k = 2; /* tx win size, will adjust dynam */ 823 llc->rw = 128; /* rx win size (opt and equal to 824 * tx_win of remote LLC) */ 825 skb_queue_head_init(&llc->pdu_unack_q); --- 94 unchanged lines hidden --- | 823 llc->busy_state_timer.timer.data = (unsigned long)sk; 824 llc->busy_state_timer.timer.function = llc_conn_busy_tmr_cb; 825 826 llc->n2 = 2; /* max retransmit */ 827 llc->k = 2; /* tx win size, will adjust dynam */ 828 llc->rw = 128; /* rx win size (opt and equal to 829 * tx_win of remote LLC) */ 830 skb_queue_head_init(&llc->pdu_unack_q); --- 94 unchanged lines hidden --- |