Lines Matching refs:sk

32 void x25_init_timers(struct sock *sk)  in x25_init_timers()  argument
34 struct x25_sock *x25 = x25_sk(sk); in x25_init_timers()
39 sk->sk_timer.function = x25_heartbeat_expiry; in x25_init_timers()
42 void x25_start_heartbeat(struct sock *sk) in x25_start_heartbeat() argument
44 mod_timer(&sk->sk_timer, jiffies + 5 * HZ); in x25_start_heartbeat()
47 void x25_stop_heartbeat(struct sock *sk) in x25_stop_heartbeat() argument
49 del_timer(&sk->sk_timer); in x25_stop_heartbeat()
52 void x25_start_t2timer(struct sock *sk) in x25_start_t2timer() argument
54 struct x25_sock *x25 = x25_sk(sk); in x25_start_t2timer()
59 void x25_start_t21timer(struct sock *sk) in x25_start_t21timer() argument
61 struct x25_sock *x25 = x25_sk(sk); in x25_start_t21timer()
66 void x25_start_t22timer(struct sock *sk) in x25_start_t22timer() argument
68 struct x25_sock *x25 = x25_sk(sk); in x25_start_t22timer()
73 void x25_start_t23timer(struct sock *sk) in x25_start_t23timer() argument
75 struct x25_sock *x25 = x25_sk(sk); in x25_start_t23timer()
80 void x25_stop_timer(struct sock *sk) in x25_stop_timer() argument
82 del_timer(&x25_sk(sk)->timer); in x25_stop_timer()
85 unsigned long x25_display_timer(struct sock *sk) in x25_display_timer() argument
87 struct x25_sock *x25 = x25_sk(sk); in x25_display_timer()
97 struct sock *sk = from_timer(sk, t, sk_timer); in x25_heartbeat_expiry() local
99 bh_lock_sock(sk); in x25_heartbeat_expiry()
100 if (sock_owned_by_user(sk)) /* can currently only occur in state 3 */ in x25_heartbeat_expiry()
103 switch (x25_sk(sk)->state) { in x25_heartbeat_expiry()
111 if (sock_flag(sk, SOCK_DESTROY) || in x25_heartbeat_expiry()
112 (sk->sk_state == TCP_LISTEN && in x25_heartbeat_expiry()
113 sock_flag(sk, SOCK_DEAD))) { in x25_heartbeat_expiry()
114 bh_unlock_sock(sk); in x25_heartbeat_expiry()
115 x25_destroy_socket_from_timer(sk); in x25_heartbeat_expiry()
124 x25_check_rbuf(sk); in x25_heartbeat_expiry()
128 x25_start_heartbeat(sk); in x25_heartbeat_expiry()
129 bh_unlock_sock(sk); in x25_heartbeat_expiry()
136 static inline void x25_do_timer_expiry(struct sock * sk) in x25_do_timer_expiry() argument
138 struct x25_sock *x25 = x25_sk(sk); in x25_do_timer_expiry()
145 x25_enquiry_response(sk); in x25_do_timer_expiry()
151 x25_write_internal(sk, X25_CLEAR_REQUEST); in x25_do_timer_expiry()
153 x25_start_t23timer(sk); in x25_do_timer_expiry()
157 x25_disconnect(sk, ETIMEDOUT, 0, 0); in x25_do_timer_expiry()
165 struct sock *sk = &x25->sk; in x25_timer_expiry() local
167 bh_lock_sock(sk); in x25_timer_expiry()
168 if (sock_owned_by_user(sk)) { /* can currently only occur in state 3 */ in x25_timer_expiry()
169 if (x25_sk(sk)->state == X25_STATE_3) in x25_timer_expiry()
170 x25_start_t2timer(sk); in x25_timer_expiry()
172 x25_do_timer_expiry(sk); in x25_timer_expiry()
173 bh_unlock_sock(sk); in x25_timer_expiry()