Lines Matching refs:sk

27 void x25_init_timers(struct sock *sk)  in x25_init_timers()  argument
29 struct x25_sock *x25 = x25_sk(sk); in x25_init_timers()
34 sk->sk_timer.function = x25_heartbeat_expiry; in x25_init_timers()
37 void x25_start_heartbeat(struct sock *sk) in x25_start_heartbeat() argument
39 mod_timer(&sk->sk_timer, jiffies + 5 * HZ); in x25_start_heartbeat()
42 void x25_stop_heartbeat(struct sock *sk) in x25_stop_heartbeat() argument
44 del_timer(&sk->sk_timer); in x25_stop_heartbeat()
47 void x25_start_t2timer(struct sock *sk) in x25_start_t2timer() argument
49 struct x25_sock *x25 = x25_sk(sk); in x25_start_t2timer()
54 void x25_start_t21timer(struct sock *sk) in x25_start_t21timer() argument
56 struct x25_sock *x25 = x25_sk(sk); in x25_start_t21timer()
61 void x25_start_t22timer(struct sock *sk) in x25_start_t22timer() argument
63 struct x25_sock *x25 = x25_sk(sk); in x25_start_t22timer()
68 void x25_start_t23timer(struct sock *sk) in x25_start_t23timer() argument
70 struct x25_sock *x25 = x25_sk(sk); in x25_start_t23timer()
75 void x25_stop_timer(struct sock *sk) in x25_stop_timer() argument
77 del_timer(&x25_sk(sk)->timer); in x25_stop_timer()
80 unsigned long x25_display_timer(struct sock *sk) in x25_display_timer() argument
82 struct x25_sock *x25 = x25_sk(sk); in x25_display_timer()
92 struct sock *sk = from_timer(sk, t, sk_timer); in x25_heartbeat_expiry() local
94 bh_lock_sock(sk); in x25_heartbeat_expiry()
95 if (sock_owned_by_user(sk)) /* can currently only occur in state 3 */ in x25_heartbeat_expiry()
98 switch (x25_sk(sk)->state) { in x25_heartbeat_expiry()
106 if (sock_flag(sk, SOCK_DESTROY) || in x25_heartbeat_expiry()
107 (sk->sk_state == TCP_LISTEN && in x25_heartbeat_expiry()
108 sock_flag(sk, SOCK_DEAD))) { in x25_heartbeat_expiry()
109 bh_unlock_sock(sk); in x25_heartbeat_expiry()
110 x25_destroy_socket_from_timer(sk); in x25_heartbeat_expiry()
119 x25_check_rbuf(sk); in x25_heartbeat_expiry()
123 x25_start_heartbeat(sk); in x25_heartbeat_expiry()
124 bh_unlock_sock(sk); in x25_heartbeat_expiry()
131 static inline void x25_do_timer_expiry(struct sock * sk) in x25_do_timer_expiry() argument
133 struct x25_sock *x25 = x25_sk(sk); in x25_do_timer_expiry()
140 x25_enquiry_response(sk); in x25_do_timer_expiry()
146 x25_write_internal(sk, X25_CLEAR_REQUEST); in x25_do_timer_expiry()
148 x25_start_t23timer(sk); in x25_do_timer_expiry()
152 x25_disconnect(sk, ETIMEDOUT, 0, 0); in x25_do_timer_expiry()
160 struct sock *sk = &x25->sk; in x25_timer_expiry() local
162 bh_lock_sock(sk); in x25_timer_expiry()
163 if (sock_owned_by_user(sk)) { /* can currently only occur in state 3 */ in x25_timer_expiry()
164 if (x25_sk(sk)->state == X25_STATE_3) in x25_timer_expiry()
165 x25_start_t2timer(sk); in x25_timer_expiry()
167 x25_do_timer_expiry(sk); in x25_timer_expiry()
168 bh_unlock_sock(sk); in x25_timer_expiry()