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()
36 setup_timer(&x25->timer, x25_timer_expiry, (unsigned long)sk); in x25_init_timers()
39 sk->sk_timer.data = (unsigned long)sk; in x25_init_timers()
40 sk->sk_timer.function = &x25_heartbeat_expiry; in x25_init_timers()
43 void x25_start_heartbeat(struct sock *sk) in x25_start_heartbeat() argument
45 mod_timer(&sk->sk_timer, jiffies + 5 * HZ); in x25_start_heartbeat()
48 void x25_stop_heartbeat(struct sock *sk) in x25_stop_heartbeat() argument
50 del_timer(&sk->sk_timer); in x25_stop_heartbeat()
53 void x25_start_t2timer(struct sock *sk) in x25_start_t2timer() argument
55 struct x25_sock *x25 = x25_sk(sk); in x25_start_t2timer()
60 void x25_start_t21timer(struct sock *sk) in x25_start_t21timer() argument
62 struct x25_sock *x25 = x25_sk(sk); in x25_start_t21timer()
67 void x25_start_t22timer(struct sock *sk) in x25_start_t22timer() argument
69 struct x25_sock *x25 = x25_sk(sk); in x25_start_t22timer()
74 void x25_start_t23timer(struct sock *sk) in x25_start_t23timer() argument
76 struct x25_sock *x25 = x25_sk(sk); in x25_start_t23timer()
81 void x25_stop_timer(struct sock *sk) in x25_stop_timer() argument
83 del_timer(&x25_sk(sk)->timer); in x25_stop_timer()
86 unsigned long x25_display_timer(struct sock *sk) in x25_display_timer() argument
88 struct x25_sock *x25 = x25_sk(sk); in x25_display_timer()
98 struct sock *sk = (struct sock *)param; in x25_heartbeat_expiry() local
100 bh_lock_sock(sk); in x25_heartbeat_expiry()
101 if (sock_owned_by_user(sk)) /* can currently only occur in state 3 */ in x25_heartbeat_expiry()
104 switch (x25_sk(sk)->state) { in x25_heartbeat_expiry()
112 if (sock_flag(sk, SOCK_DESTROY) || in x25_heartbeat_expiry()
113 (sk->sk_state == TCP_LISTEN && in x25_heartbeat_expiry()
114 sock_flag(sk, SOCK_DEAD))) { in x25_heartbeat_expiry()
115 bh_unlock_sock(sk); in x25_heartbeat_expiry()
116 x25_destroy_socket_from_timer(sk); in x25_heartbeat_expiry()
125 x25_check_rbuf(sk); in x25_heartbeat_expiry()
129 x25_start_heartbeat(sk); in x25_heartbeat_expiry()
130 bh_unlock_sock(sk); in x25_heartbeat_expiry()
137 static inline void x25_do_timer_expiry(struct sock * sk) in x25_do_timer_expiry() argument
139 struct x25_sock *x25 = x25_sk(sk); in x25_do_timer_expiry()
146 x25_enquiry_response(sk); in x25_do_timer_expiry()
152 x25_write_internal(sk, X25_CLEAR_REQUEST); in x25_do_timer_expiry()
154 x25_start_t23timer(sk); in x25_do_timer_expiry()
158 x25_disconnect(sk, ETIMEDOUT, 0, 0); in x25_do_timer_expiry()
165 struct sock *sk = (struct sock *)param; 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()