• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/net/sctp/

Lines Matching refs:asoc

62 				struct sctp_association *asoc,
70 struct sctp_association *asoc,
81 static void sctp_do_ecn_ce_work(struct sctp_association *asoc,
86 asoc->last_ecne_tsn = lowest_tsn;
87 asoc->need_ecne = 1;
102 static struct sctp_chunk *sctp_do_ecn_ecne_work(struct sctp_association *asoc,
118 if (TSN_lt(asoc->last_cwr_tsn, lowest_tsn)) {
124 transport = sctp_assoc_lookup_tsn(asoc, lowest_tsn);
130 asoc->last_cwr_tsn = lowest_tsn;
136 repl = sctp_make_cwr(asoc, asoc->last_cwr_tsn, chunk);
145 static void sctp_do_ecn_cwr_work(struct sctp_association *asoc,
151 asoc->need_ecne = 0;
155 static int sctp_gen_sack(struct sctp_association *asoc, int force,
160 struct sctp_transport *trans = asoc->peer.last_data_from;
164 (!trans && (asoc->param_flags & SPP_SACKDELAY_DISABLE)) ||
166 asoc->peer.sack_needed = 1;
168 ctsn = sctp_tsnmap_get_ctsn(&asoc->peer.tsn_map);
169 max_tsn_seen = sctp_tsnmap_get_max_tsn_seen(&asoc->peer.tsn_map);
182 asoc->peer.sack_needed = 1;
192 if (!asoc->peer.sack_needed) {
194 asoc->peer.sack_needed = 1;
202 asoc->timeouts[SCTP_EVENT_TIMEOUT_SACK] =
205 asoc->timeouts[SCTP_EVENT_TIMEOUT_SACK] =
206 asoc->sackdelay;
212 if (asoc->a_rwnd > asoc->rwnd)
213 asoc->a_rwnd = asoc->rwnd;
214 sack = sctp_make_sack(asoc);
218 asoc->peer.sack_needed = 0;
240 struct sctp_association *asoc = transport->asoc;
244 sctp_bh_lock_sock(asoc->base.sk);
245 if (sock_owned_by_user(asoc->base.sk)) {
263 asoc->state,
264 asoc->ep, asoc,
268 asoc->base.sk->sk_err = -error;
271 sctp_bh_unlock_sock(asoc->base.sk);
278 static void sctp_generate_timeout_event(struct sctp_association *asoc,
283 sctp_bh_lock_sock(asoc->base.sk);
284 if (sock_owned_by_user(asoc->base.sk)) {
290 if (!mod_timer(&asoc->timers[timeout_type], jiffies + (HZ/20)))
291 sctp_association_hold(asoc);
298 if (asoc->base.dead)
304 asoc->state, asoc->ep, asoc,
308 asoc->base.sk->sk_err = -error;
311 sctp_bh_unlock_sock(asoc->base.sk);
312 sctp_association_put(asoc);
317 struct sctp_association *asoc = (struct sctp_association *) data;
318 sctp_generate_timeout_event(asoc, SCTP_EVENT_TIMEOUT_T1_COOKIE);
323 struct sctp_association *asoc = (struct sctp_association *) data;
324 sctp_generate_timeout_event(asoc, SCTP_EVENT_TIMEOUT_T1_INIT);
329 struct sctp_association *asoc = (struct sctp_association *) data;
330 sctp_generate_timeout_event(asoc, SCTP_EVENT_TIMEOUT_T2_SHUTDOWN);
335 struct sctp_association *asoc = (struct sctp_association *) data;
336 sctp_generate_timeout_event(asoc, SCTP_EVENT_TIMEOUT_T4_RTO);
341 struct sctp_association *asoc = (struct sctp_association *)data;
342 sctp_generate_timeout_event(asoc,
349 struct sctp_association *asoc = (struct sctp_association *) data;
350 sctp_generate_timeout_event(asoc, SCTP_EVENT_TIMEOUT_AUTOCLOSE);
360 struct sctp_association *asoc = transport->asoc;
362 sctp_bh_lock_sock(asoc->base.sk);
363 if (sock_owned_by_user(asoc->base.sk)) {
380 asoc->state, asoc->ep, asoc,
384 asoc->base.sk->sk_err = -error;
387 sctp_bh_unlock_sock(asoc->base.sk);
394 struct sctp_association *asoc = (struct sctp_association *) data;
395 sctp_generate_timeout_event(asoc, SCTP_EVENT_TIMEOUT_SACK);
427 static void sctp_do_8_2_transport_strike(struct sctp_association *asoc,
437 asoc->overall_error_count++;
443 asoc,
446 sctp_assoc_control_transport(asoc, transport,
456 transport->rto = min((transport->rto * 2), transport->asoc->rto_max);
461 struct sctp_association *asoc,
466 event = sctp_ulpevent_make_assoc_change(asoc,0, SCTP_CANT_STR_ASSOC,
478 asoc->outqueue.error = error;
484 struct sctp_association *asoc,
493 sctp_ulpq_abort_pd(&asoc->ulpq, GFP_ATOMIC);
496 event = sctp_ulpevent_make_assoc_change(asoc, 0, SCTP_COMM_LOST,
500 event = sctp_ulpevent_make_assoc_change(asoc, 0, SCTP_COMM_LOST,
511 asoc->outqueue.error = error;
521 struct sctp_association *asoc,
533 if (!sctp_process_init(asoc, chunk->chunk_hdr->type,
544 struct sctp_association *asoc)
553 list_for_each(pos, &asoc->peer.transport_addr_list) {
562 struct sctp_association *asoc)
569 list_for_each(pos, &asoc->peer.transport_addr_list) {
578 struct sctp_association *asoc)
583 list_for_each(pos, &asoc->peer.transport_addr_list) {
595 struct sctp_association *asoc,
605 struct sctp_association *asoc,
617 t->asoc->overall_error_count = 0;
623 sctp_assoc_control_transport(asoc, t, SCTP_TRANSPORT_UP,
648 struct sctp_association *asoc,
654 sctp_do_8_2_transport_strike(asoc, t);
659 struct sctp_association *asoc,
664 if (sctp_outq_sack(&asoc->outqueue, sackh)) {
668 asoc->state, asoc->ep, asoc, NULL,
674 err = sctp_outq_flush(&asoc->outqueue, 0);
684 struct sctp_association *asoc,
689 t = sctp_assoc_choose_shutdown_transport(asoc);
690 asoc->shutdown_last_sent_to = t;
691 asoc->timeouts[SCTP_EVENT_TIMEOUT_T2_SHUTDOWN] = t->rto;
697 struct sctp_association *asoc,
700 struct sock *sk = asoc->base.sk;
702 asoc->state = state;
704 SCTP_DEBUG_PRINTK("sctp_cmd_new_state: asoc %p[%s]\n",
705 asoc, sctp_state_tbl[state]);
711 if (sctp_state(asoc, ESTABLISHED) && sctp_sstate(sk, CLOSED))
715 if (sctp_state(asoc, SHUTDOWN_RECEIVED) &&
720 if (sctp_state(asoc, COOKIE_WAIT)) {
724 asoc->timeouts[SCTP_EVENT_TIMEOUT_T1_INIT] =
725 asoc->rto_initial;
726 asoc->timeouts[SCTP_EVENT_TIMEOUT_T1_COOKIE] =
727 asoc->rto_initial;
730 if (sctp_state(asoc, ESTABLISHED) ||
731 sctp_state(asoc, CLOSED) ||
732 sctp_state(asoc, SHUTDOWN_RECEIVED)) {
733 /* Wake up any processes waiting in the asoc's wait queue in
736 if (waitqueue_active(&asoc->wait))
737 wake_up_interruptible(&asoc->wait);
752 struct sctp_association *asoc)
754 struct sock *sk = asoc->base.sk;
761 (!asoc->temp) && (sk->sk_shutdown != SHUTDOWN_MASK))
764 sctp_unhash_established(asoc);
765 sctp_association_free(asoc);
775 struct sctp_association *asoc,
780 t = asoc->peer.active_path;
781 asoc->timeouts[SCTP_EVENT_TIMEOUT_T4_RTO] = t->rto;
787 struct sctp_association *asoc,
809 asoc->peer.asconf_capable = 0;
839 static void sctp_cmd_del_non_primary(struct sctp_association *asoc)
845 list_for_each_safe(pos, temp, &asoc->peer.transport_addr_list) {
848 &asoc->peer.primary_addr)) {
849 sctp_assoc_del_peer(asoc, &t->ipaddr);
857 static void sctp_cmd_set_sk_err(struct sctp_association *asoc, int error)
859 struct sock *sk = asoc->base.sk;
867 struct sctp_association *asoc,
872 ev = sctp_ulpevent_make_assoc_change(asoc, 0, state, 0,
873 asoc->c.sinit_num_ostreams,
874 asoc->c.sinit_max_instreams,
877 sctp_ulpq_tail_event(&asoc->ulpq, ev);
882 struct sctp_association *asoc)
886 ev = sctp_ulpevent_make_adaptation_indication(asoc, GFP_ATOMIC);
889 sctp_ulpq_tail_event(&asoc->ulpq, ev);
898 "ep %p, %s, %s, asoc %p[%s], %s\n", \
900 (*debug_fn)(subtype), asoc, \
905 "asoc %p, status: %s\n", \
906 asoc, sctp_status_tbl[status])
909 SCTP_DEBUG_PRINTK("sctp_do_sm post sfx: error %d, asoc %p[%s]\n", \
910 error, asoc, \
911 sctp_state_tbl[(asoc && sctp_id2assoc(ep->base.sk, \
912 sctp_assoc2id(asoc)))?asoc->state:SCTP_STATE_CLOSED])
923 struct sctp_association *asoc,
946 status = (*state_fn->fn)(ep, asoc, subtype, event_arg, &commands);
950 ep, asoc, event_arg, status,
966 struct sctp_association *asoc,
975 ep, asoc,
1048 struct sctp_association *asoc,
1086 sctp_outq_uncork(&asoc->outqueue);
1089 asoc = cmd->obj.ptr;
1091 sctp_endpoint_add_asoc(ep, asoc);
1092 sctp_hash_established(asoc);
1096 sctp_assoc_update(asoc, cmd->obj.ptr);
1100 sctp_outq_teardown(&asoc->outqueue);
1105 sctp_outq_uncork(&asoc->outqueue);
1109 sctp_cmd_delete_tcb(commands, asoc);
1110 asoc = NULL;
1115 sctp_cmd_new_state(commands, asoc, cmd->obj.state);
1120 sctp_tsnmap_mark(&asoc->peer.tsn_map, cmd->obj.u32);
1125 sctp_tsnmap_skip(&asoc->peer.tsn_map, cmd->obj.u32);
1128 sctp_ulpq_abort_pd(&asoc->ulpq, GFP_ATOMIC);
1132 sctp_cmd_process_fwdtsn(&asoc->ulpq, cmd->obj.ptr);
1142 error = sctp_gen_sack(asoc, force, commands);
1147 error = sctp_cmd_process_sack(commands, asoc,
1153 new_obj = sctp_make_init_ack(asoc, chunk, GFP_ATOMIC,
1168 error = sctp_cmd_process_init(commands, asoc, chunk,
1174 new_obj = sctp_make_cookie_echo(asoc, chunk);
1190 if ((asoc->peer.retran_path !=
1191 asoc->peer.primary_path) &&
1192 (asoc->init_err_counter > 0)) {
1204 asoc->overall_error_count = 0;
1207 new_obj = sctp_make_shutdown(asoc, chunk);
1218 "ulpq:", &asoc->ulpq);
1219 sctp_ulpq_tail_data(&asoc->ulpq, cmd->obj.ptr,
1227 "ulpq:",&asoc->ulpq);
1228 sctp_ulpq_tail_event(&asoc->ulpq, cmd->obj.ptr);
1233 if (!asoc->outqueue.cork) {
1234 sctp_outq_cork(&asoc->outqueue);
1238 error = sctp_outq_tail(&asoc->outqueue, cmd->obj.ptr);
1250 sctp_retransmit(&asoc->outqueue, cmd->obj.transport,
1256 error = sctp_outq_uncork(&asoc->outqueue);
1262 sctp_do_ecn_ce_work(asoc, cmd->obj.u32);
1267 new_obj = sctp_do_ecn_ecne_work(asoc, cmd->obj.u32,
1276 sctp_do_ecn_cwr_work(asoc, cmd->obj.u32);
1280 sctp_cmd_setup_t2(commands, asoc, cmd->obj.ptr);
1284 timer = &asoc->timers[cmd->obj.to];
1285 timeout = asoc->timeouts[cmd->obj.to];
1289 sctp_association_hold(asoc);
1294 timer = &asoc->timers[cmd->obj.to];
1295 timeout = asoc->timeouts[cmd->obj.to];
1297 sctp_association_hold(asoc);
1301 timer = &asoc->timers[cmd->obj.to];
1303 sctp_association_put(asoc);
1308 t = sctp_assoc_choose_init_transport(asoc);
1309 asoc->init_last_sent_to = t;
1321 t = asoc->init_last_sent_to;
1322 asoc->init_err_counter++;
1324 if (t->init_sent_count > (asoc->init_cycle + 1)) {
1325 asoc->timeouts[SCTP_EVENT_TIMEOUT_T1_INIT] *= 2;
1326 if (asoc->timeouts[SCTP_EVENT_TIMEOUT_T1_INIT] >
1327 asoc->max_init_timeo) {
1328 asoc->timeouts[SCTP_EVENT_TIMEOUT_T1_INIT] =
1329 asoc->max_init_timeo;
1331 asoc->init_cycle++;
1337 asoc->init_err_counter,
1338 asoc->init_cycle,
1339 asoc->timeouts[SCTP_EVENT_TIMEOUT_T1_INIT]);
1353 asoc->init_err_counter++;
1355 asoc->timeouts[SCTP_EVENT_TIMEOUT_T1_COOKIE] *= 2;
1356 if (asoc->timeouts[SCTP_EVENT_TIMEOUT_T1_COOKIE] >
1357 asoc->max_init_timeo) {
1358 asoc->timeouts[SCTP_EVENT_TIMEOUT_T1_COOKIE] =
1359 asoc->max_init_timeo;
1365 asoc->init_err_counter,
1366 asoc->timeouts[SCTP_EVENT_TIMEOUT_T1_COOKIE]);
1371 list_for_each(pos, &asoc->peer.transport_addr_list) {
1374 sctp_retransmit_mark(&asoc->outqueue, t, 0);
1383 sctp_cmd_init_failed(commands, asoc, cmd->obj.err);
1387 sctp_cmd_assoc_failed(commands, asoc, event_type,
1392 asoc->init_err_counter++;
1396 asoc->init_err_counter = 0;
1397 asoc->init_cycle = 0;
1401 sctp_tsnmap_mark_dup(&asoc->peer.tsn_map,
1411 sctp_do_8_2_transport_strike(asoc, cmd->obj.transport);
1416 sctp_cmd_transport_reset(commands, asoc, t);
1421 sctp_cmd_transport_on(commands, asoc, t, chunk);
1425 sctp_cmd_hb_timers_start(commands, asoc);
1430 sctp_cmd_hb_timer_update(commands, asoc, t);
1434 sctp_cmd_hb_timers_stop(commands, asoc);
1462 sctp_ulpq_partial_delivery(&asoc->ulpq, cmd->obj.ptr,
1467 sctp_ulpq_renege(&asoc->ulpq, cmd->obj.ptr,
1472 sctp_cmd_setup_t4(commands, asoc, cmd->obj.ptr);
1476 sctp_cmd_process_operr(commands, asoc, chunk);
1479 asoc->peer.i.init_tag = 0;
1482 sctp_cmd_del_non_primary(asoc);
1485 sctp_cmd_t3_rtx_timers_stop(commands, asoc);
1488 t = asoc->peer.retran_path;
1489 asoc->peer.retran_path = asoc->peer.primary_path;
1490 error = sctp_outq_uncork(&asoc->outqueue);
1492 asoc->peer.retran_path = t;
1495 sctp_cmd_set_sk_err(asoc, cmd->obj.error);
1498 sctp_cmd_assoc_change(commands, asoc,
1502 sctp_cmd_adaptation_ind(commands, asoc);
1517 sctp_outq_uncork(&asoc->outqueue);