• Home
  • Raw
  • Download

Lines Matching refs:sk

36 static int rose_state1_machine(struct sock *sk, struct sk_buff *skb, int frametype)  in rose_state1_machine()  argument
38 struct rose_sock *rose = rose_sk(sk); in rose_state1_machine()
42 rose_stop_timer(sk); in rose_state1_machine()
43 rose_start_idletimer(sk); in rose_state1_machine()
50 sk->sk_state = TCP_ESTABLISHED; in rose_state1_machine()
51 if (!sock_flag(sk, SOCK_DEAD)) in rose_state1_machine()
52 sk->sk_state_change(sk); in rose_state1_machine()
56 rose_write_internal(sk, ROSE_CLEAR_CONFIRMATION); in rose_state1_machine()
57 rose_disconnect(sk, ECONNREFUSED, skb->data[3], skb->data[4]); in rose_state1_machine()
73 static int rose_state2_machine(struct sock *sk, struct sk_buff *skb, int frametype) in rose_state2_machine() argument
75 struct rose_sock *rose = rose_sk(sk); in rose_state2_machine()
79 rose_write_internal(sk, ROSE_CLEAR_CONFIRMATION); in rose_state2_machine()
80 rose_disconnect(sk, 0, skb->data[3], skb->data[4]); in rose_state2_machine()
85 rose_disconnect(sk, 0, -1, -1); in rose_state2_machine()
101 static int rose_state3_machine(struct sock *sk, struct sk_buff *skb, int frametype, int ns, int nr,… in rose_state3_machine() argument
103 struct rose_sock *rose = rose_sk(sk); in rose_state3_machine()
108 rose_stop_timer(sk); in rose_state3_machine()
109 rose_start_idletimer(sk); in rose_state3_machine()
110 rose_write_internal(sk, ROSE_RESET_CONFIRMATION); in rose_state3_machine()
116 rose_requeue_frames(sk); in rose_state3_machine()
120 rose_write_internal(sk, ROSE_CLEAR_CONFIRMATION); in rose_state3_machine()
121 rose_disconnect(sk, 0, skb->data[3], skb->data[4]); in rose_state3_machine()
127 if (!rose_validate_nr(sk, nr)) { in rose_state3_machine()
128 rose_write_internal(sk, ROSE_RESET_REQUEST); in rose_state3_machine()
135 rose_start_t2timer(sk); in rose_state3_machine()
136 rose_stop_idletimer(sk); in rose_state3_machine()
138 rose_frames_acked(sk, nr); in rose_state3_machine()
149 if (!rose_validate_nr(sk, nr)) { in rose_state3_machine()
150 rose_write_internal(sk, ROSE_RESET_REQUEST); in rose_state3_machine()
157 rose_start_t2timer(sk); in rose_state3_machine()
158 rose_stop_idletimer(sk); in rose_state3_machine()
161 rose_frames_acked(sk, nr); in rose_state3_machine()
163 rose_start_idletimer(sk); in rose_state3_machine()
164 if (sk_filter_trim_cap(sk, skb, ROSE_MIN_LEN) == 0 && in rose_state3_machine()
165 __sock_queue_rcv_skb(sk, skb) == 0) { in rose_state3_machine()
170 rose_write_internal(sk, ROSE_RESET_REQUEST); in rose_state3_machine()
177 rose_start_t2timer(sk); in rose_state3_machine()
178 rose_stop_idletimer(sk); in rose_state3_machine()
181 if (atomic_read(&sk->sk_rmem_alloc) > in rose_state3_machine()
182 (sk->sk_rcvbuf >> 1)) in rose_state3_machine()
191 rose_stop_timer(sk); in rose_state3_machine()
192 rose_enquiry_response(sk); in rose_state3_machine()
195 rose_start_hbtimer(sk); in rose_state3_machine()
212 static int rose_state4_machine(struct sock *sk, struct sk_buff *skb, int frametype) in rose_state4_machine() argument
214 struct rose_sock *rose = rose_sk(sk); in rose_state4_machine()
218 rose_write_internal(sk, ROSE_RESET_CONFIRMATION); in rose_state4_machine()
221 rose_stop_timer(sk); in rose_state4_machine()
222 rose_start_idletimer(sk); in rose_state4_machine()
229 rose_requeue_frames(sk); in rose_state4_machine()
233 rose_write_internal(sk, ROSE_CLEAR_CONFIRMATION); in rose_state4_machine()
234 rose_disconnect(sk, 0, skb->data[3], skb->data[4]); in rose_state4_machine()
250 static int rose_state5_machine(struct sock *sk, struct sk_buff *skb, int frametype) in rose_state5_machine() argument
253 rose_write_internal(sk, ROSE_CLEAR_CONFIRMATION); in rose_state5_machine()
254 rose_disconnect(sk, 0, skb->data[3], skb->data[4]); in rose_state5_machine()
255 rose_sk(sk)->neighbour->use--; in rose_state5_machine()
262 int rose_process_rx_frame(struct sock *sk, struct sk_buff *skb) in rose_process_rx_frame() argument
264 struct rose_sock *rose = rose_sk(sk); in rose_process_rx_frame()
274 queued = rose_state1_machine(sk, skb, frametype); in rose_process_rx_frame()
277 queued = rose_state2_machine(sk, skb, frametype); in rose_process_rx_frame()
280 queued = rose_state3_machine(sk, skb, frametype, ns, nr, q, d, m); in rose_process_rx_frame()
283 queued = rose_state4_machine(sk, skb, frametype); in rose_process_rx_frame()
286 queued = rose_state5_machine(sk, skb, frametype); in rose_process_rx_frame()
290 rose_kick(sk); in rose_process_rx_frame()