Lines Matching refs:net
173 struct sctp_nets *net, in sctp_notify() argument
195 if (net->dest_state & SCTP_ADDR_REACHABLE) { in sctp_notify()
197 net->dest_state &= ~SCTP_ADDR_REACHABLE; in sctp_notify()
198 net->dest_state &= ~SCTP_ADDR_PF; in sctp_notify()
201 (void *)net, SCTP_SO_NOT_LOCKED); in sctp_notify()
212 if (net->dest_state & SCTP_ADDR_NO_PMTUD) { in sctp_notify()
226 if (SCTP_OS_TIMER_PENDING(&net->pmtu_timer.timer)) { in sctp_notify()
228 sctp_timer_stop(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, net, in sctp_notify()
234 if (net->port) { in sctp_notify()
237 if (net->mtu > next_mtu) { in sctp_notify()
238 net->mtu = next_mtu; in sctp_notify()
239 if (net->port) { in sctp_notify()
240 sctp_hc_set_mtu(&net->ro._l_addr, inp->fibnum, next_mtu + sizeof(struct udphdr)); in sctp_notify()
242 sctp_hc_set_mtu(&net->ro._l_addr, inp->fibnum, next_mtu); in sctp_notify()
251 sctp_timer_start(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, net); in sctp_notify()
266 struct sctp_nets *net; in sctp_ctlinput() local
292 net = NULL; in sctp_ctlinput()
295 &inp, &net, 1, in sctp_ctlinput()
298 (net != NULL) && in sctp_ctlinput()
331 sctp_notify(inp, stcb, net, in sctp_ctlinput()
356 struct sctp_nets *net; in sctp_getcred() local
375 &inp, &net, 1, vrf_id); in sctp_getcred()
2143 struct sctp_nets *net; local
2153 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
2154 switch (net->ro._l_addr.sa.sa_family) {
2199 struct sctp_nets *net; local
2210 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
2211 switch (net->ro._l_addr.sa.sa_family) {
2243 (net->ro._l_addr.sa.sa_family == AF_INET)) {
2245 in6_sin_2_v4mapsin6(&net->ro._l_addr.sin,
2248 memcpy(addr, &net->ro._l_addr, cpsz);
2251 memcpy(addr, &net->ro._l_addr, cpsz);
2296 struct sctp_nets *net; local
2323 net = sctp_findnet(stcb, addr);
2332 net = NULL;
2334 stcb = sctp_findassociation_ep_addr(&inp, addr, &net, NULL, NULL);
2339 if ((stcb != NULL) && (net == NULL)) {
2377 if (net != NULL) {
2378 paddrp->spp_hbinterval = net->heart_beat_delay;
2379 paddrp->spp_pathmaxrxt = net->failure_threshold;
2380 paddrp->spp_pathmtu = net->mtu;
2381 switch (net->ro._l_addr.sa.sa_family) {
2396 if (net->dest_state & SCTP_ADDR_NOHB) {
2402 if (net->dest_state & SCTP_ADDR_NO_PMTUD) {
2407 if (net->dscp & 0x01) {
2408 paddrp->spp_dscp = net->dscp & 0xfc;
2412 if ((net->ro._l_addr.sa.sa_family == AF_INET6) &&
2413 (net->flowlabel & 0x80000000)) {
2414 paddrp->spp_ipv6_flowlabel = net->flowlabel & 0x000fffff;
2498 struct sctp_nets *net; local
2525 net = sctp_findnet(stcb, addr);
2534 net = NULL;
2536 stcb = sctp_findassociation_ep_addr(&inp, addr, &net, NULL, NULL);
2542 if ((stcb != NULL) && (net != NULL)) {
2543 if (net->dest_state & SCTP_ADDR_UNCONFIRMED) {
2546 } else if (net->dest_state & SCTP_ADDR_REACHABLE) {
2553 paddri->spinfo_cwnd = net->cwnd;
2554 paddri->spinfo_srtt = net->lastsa >> SCTP_RTT_SHIFT;
2555 paddri->spinfo_rto = net->RTO;
2557 paddri->spinfo_mtu = net->mtu;
2594 struct sctp_nets *net; local
2618 net = stcb->asoc.primary_destination;
2619 if (net != NULL) {
2621 &net->ro._l_addr,
2622 ((struct sockaddr *)(&net->ro._l_addr))->sa_len);
2629 if (net->dest_state & SCTP_ADDR_UNCONFIRMED) {
2632 } else if (net->dest_state & SCTP_ADDR_REACHABLE) {
2639 sstat->sstat_primary.spinfo_cwnd = net->cwnd;
2640 sstat->sstat_primary.spinfo_srtt = net->lastsa >> SCTP_RTT_SHIFT;
2641 sstat->sstat_primary.spinfo_rto = net->RTO;
2642 sstat->sstat_primary.spinfo_mtu = net->mtu;
3162 struct sctp_nets *net; local
3189 net = sctp_findnet(stcb, addr);
3198 net = NULL;
3200 stcb = sctp_findassociation_ep_addr(&inp, addr, &net, NULL, NULL);
3205 if ((stcb != NULL) && (net == NULL)) {
3241 if (net != NULL) {
3242 thlds->spt_pathmaxrxt = net->failure_threshold;
3243 thlds->spt_pathpfthld = net->pf_threshold;
3276 struct sctp_nets *net; local
3303 net = sctp_findnet(stcb, addr);
3312 net = NULL;
3314 stcb = sctp_findassociation_ep_addr(&inp, addr, &net, NULL, NULL);
3319 if ((stcb != NULL) && (net == NULL)) {
3355 if (net) {
3356 encaps->sue_port = net->port;
3953 struct sctp_nets *net; local
3969 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
3970 stcb->asoc.cc_functions.sctp_set_initial_cc_param(stcb, net);
3993 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
3994 stcb->asoc.cc_functions.sctp_set_initial_cc_param(stcb, net);
5205 struct sctp_nets *net; local
5232 net = sctp_findnet(stcb, addr);
5241 net = NULL;
5244 &net, NULL, NULL);
5249 if ((stcb != NULL) && (net == NULL)) {
5309 if (net != NULL) {
5312 if (((net->dest_state & SCTP_ADDR_UNCONFIRMED) == 0) &&
5313 ((net->dest_state & SCTP_ADDR_NOHB) == 0)) {
5314 sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net,
5317 net->dest_state |= SCTP_ADDR_NOHB;
5321 net->heart_beat_delay = paddrp->spp_hbinterval;
5323 net->heart_beat_delay = 0;
5325 sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net,
5327 sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net);
5328 net->dest_state &= ~SCTP_ADDR_NOHB;
5332 sctp_send_hb(stcb, net, SCTP_SO_LOCKED);
5334 sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net);
5338 if (SCTP_OS_TIMER_PENDING(&net->pmtu_timer.timer)) {
5339 sctp_timer_stop(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, net,
5342 net->dest_state |= SCTP_ADDR_NO_PMTUD;
5344 net->mtu = paddrp->spp_pathmtu;
5345 switch (net->ro._l_addr.sa.sa_family) {
5348 net->mtu += SCTP_MIN_V4_OVERHEAD;
5353 net->mtu += SCTP_MIN_OVERHEAD;
5359 if (net->mtu < stcb->asoc.smallest_mtu) {
5360 sctp_pathmtu_adjustment(stcb, net->mtu, true);
5365 if (!SCTP_OS_TIMER_PENDING(&net->pmtu_timer.timer)) {
5366 sctp_timer_start(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, net);
5368 net->dest_state &= ~SCTP_ADDR_NO_PMTUD;
5371 if (net->dest_state & SCTP_ADDR_PF) {
5372 if (net->error_count > paddrp->spp_pathmaxrxt) {
5373 net->dest_state &= ~SCTP_ADDR_PF;
5376 if ((net->error_count <= paddrp->spp_pathmaxrxt) &&
5377 (net->error_count > net->pf_threshold)) {
5378 net->dest_state |= SCTP_ADDR_PF;
5379 sctp_send_hb(stcb, net, SCTP_SO_LOCKED);
5381 stcb->sctp_ep, stcb, net,
5383 sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net);
5386 if (net->dest_state & SCTP_ADDR_REACHABLE) {
5387 if (net->error_count > paddrp->spp_pathmaxrxt) {
5388 net->dest_state &= ~SCTP_ADDR_REACHABLE;
5389 sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, stcb, 0, net, SCTP_SO_LOCKED);
5392 if (net->error_count <= paddrp->spp_pathmaxrxt) {
5393 net->dest_state |= SCTP_ADDR_REACHABLE;
5394 sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, 0, net, SCTP_SO_LOCKED);
5397 net->failure_threshold = paddrp->spp_pathmaxrxt;
5400 net->dscp = paddrp->spp_dscp & 0xfc;
5401 net->dscp |= 0x01;
5405 if (net->ro._l_addr.sa.sa_family == AF_INET6) {
5406 net->flowlabel = paddrp->spp_ipv6_flowlabel & 0x000fffff;
5407 net->flowlabel |= 0x80000000;
5415 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
5416 if (net->dest_state & SCTP_ADDR_PF) {
5417 if (net->error_count > paddrp->spp_pathmaxrxt) {
5418 net->dest_state &= ~SCTP_ADDR_PF;
5421 if ((net->error_count <= paddrp->spp_pathmaxrxt) &&
5422 (net->error_count > net->pf_threshold)) {
5423 net->dest_state |= SCTP_ADDR_PF;
5424 sctp_send_hb(stcb, net, SCTP_SO_LOCKED);
5426 stcb->sctp_ep, stcb, net,
5428 sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net);
5431 if (net->dest_state & SCTP_ADDR_REACHABLE) {
5432 if (net->error_count > paddrp->spp_pathmaxrxt) {
5433 net->dest_state &= ~SCTP_ADDR_REACHABLE;
5434 sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, stcb, 0, net, SCTP_SO_LOCKED);
5437 if (net->error_count <= paddrp->spp_pathmaxrxt) {
5438 net->dest_state |= SCTP_ADDR_REACHABLE;
5439 sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, 0, net, SCTP_SO_LOCKED);
5442 net->failure_threshold = paddrp->spp_pathmaxrxt;
5452 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
5454 net->heart_beat_delay = paddrp->spp_hbinterval;
5456 net->heart_beat_delay = 0;
5458 if (net->dest_state & SCTP_ADDR_NOHB) {
5459 net->dest_state &= ~SCTP_ADDR_NOHB;
5461 sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net,
5463 sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net);
5468 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
5469 if ((net->dest_state & SCTP_ADDR_NOHB) == 0) {
5470 net->dest_state |= SCTP_ADDR_NOHB;
5471 if ((net->dest_state & SCTP_ADDR_UNCONFIRMED) == 0) {
5473 inp, stcb, net,
5481 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
5482 if (SCTP_OS_TIMER_PENDING(&net->pmtu_timer.timer)) {
5483 sctp_timer_stop(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, net,
5486 net->dest_state |= SCTP_ADDR_NO_PMTUD;
5488 net->mtu = paddrp->spp_pathmtu;
5489 switch (net->ro._l_addr.sa.sa_family) {
5492 net->mtu += SCTP_MIN_V4_OVERHEAD;
5497 net->mtu += SCTP_MIN_OVERHEAD;
5503 if (net->mtu < stcb->asoc.smallest_mtu) {
5504 sctp_pathmtu_adjustment(stcb, net->mtu, true);
5514 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
5515 if (!SCTP_OS_TIMER_PENDING(&net->pmtu_timer.timer)) {
5516 sctp_timer_start(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, net);
5518 net->dest_state &= ~SCTP_ADDR_NO_PMTUD;
5524 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
5525 net->dscp = paddrp->spp_dscp & 0xfc;
5526 net->dscp |= 0x01;
5533 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
5534 if (net->ro._l_addr.sa.sa_family == AF_INET6) {
5535 net->flowlabel = paddrp->spp_ipv6_flowlabel & 0x000fffff;
5536 net->flowlabel |= 0x80000000;
5738 struct sctp_nets *net; local
5765 net = sctp_findnet(stcb, addr);
5774 net = NULL;
5777 &net, NULL, NULL);
5783 if ((stcb != NULL) && (net != NULL)) {
5784 if (net != stcb->asoc.primary_destination) {
5785 if ((net->dest_state & SCTP_ADDR_UNCONFIRMED) == 0) {
5787 if (sctp_set_primary_addr(stcb, (struct sockaddr *)NULL, net) == 0) {
5789 ((net->dest_state & SCTP_ADDR_PF) == 0) &&
5790 (net->dest_state & SCTP_ADDR_REACHABLE)) {
6290 struct sctp_nets *net; local
6317 net = sctp_findnet(stcb, addr);
6326 net = NULL;
6329 &net, NULL, NULL);
6334 if ((stcb != NULL) && (net == NULL)) {
6377 if (net != NULL) {
6378 net->failure_threshold = thlds->spt_pathmaxrxt;
6379 net->pf_threshold = thlds->spt_pathpfthld;
6380 if (net->dest_state & SCTP_ADDR_PF) {
6381 if ((net->error_count > net->failure_threshold) ||
6382 (net->error_count <= net->pf_threshold)) {
6383 net->dest_state &= ~SCTP_ADDR_PF;
6386 if ((net->error_count > net->pf_threshold) &&
6387 (net->error_count <= net->failure_threshold)) {
6388 net->dest_state |= SCTP_ADDR_PF;
6389 sctp_send_hb(stcb, net, SCTP_SO_LOCKED);
6391 stcb->sctp_ep, stcb, net,
6393 sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net);
6396 if (net->dest_state & SCTP_ADDR_REACHABLE) {
6397 if (net->error_count > net->failure_threshold) {
6398 net->dest_state &= ~SCTP_ADDR_REACHABLE;
6399 sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, stcb, 0, net, SCTP_SO_LOCKED);
6402 if (net->error_count <= net->failure_threshold) {
6403 net->dest_state |= SCTP_ADDR_REACHABLE;
6404 sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, 0, net, SCTP_SO_LOCKED);
6408 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
6409 net->failure_threshold = thlds->spt_pathmaxrxt;
6410 net->pf_threshold = thlds->spt_pathpfthld;
6411 if (net->dest_state & SCTP_ADDR_PF) {
6412 if ((net->error_count > net->failure_threshold) ||
6413 (net->error_count <= net->pf_threshold)) {
6414 net->dest_state &= ~SCTP_ADDR_PF;
6417 if ((net->error_count > net->pf_threshold) &&
6418 (net->error_count <= net->failure_threshold)) {
6419 net->dest_state |= SCTP_ADDR_PF;
6420 sctp_send_hb(stcb, net, SCTP_SO_LOCKED);
6422 stcb->sctp_ep, stcb, net,
6424 sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net);
6427 if (net->dest_state & SCTP_ADDR_REACHABLE) {
6428 if (net->error_count > net->failure_threshold) {
6429 net->dest_state &= ~SCTP_ADDR_REACHABLE;
6430 sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, stcb, 0, net, SCTP_SO_LOCKED);
6433 if (net->error_count <= net->failure_threshold) {
6434 net->dest_state |= SCTP_ADDR_REACHABLE;
6435 sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, 0, net, SCTP_SO_LOCKED);
6462 struct sctp_nets *net; local
6489 net = sctp_findnet(stcb, addr);
6498 net = NULL;
6500 stcb = sctp_findassociation_ep_addr(&inp, addr, &net, NULL, NULL);
6505 if ((stcb != NULL) && (net == NULL)) {
6541 if (net != NULL) {
6542 net->port = encaps->sue_port;
6803 struct sctp_nets *net; local
6811 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
6812 if ((net->cwnd > stcb->asoc.max_cwnd) &&
6813 (net->cwnd > (net->mtu - sizeof(struct sctphdr)))) {
6814 net->cwnd = stcb->asoc.max_cwnd;
6815 if (net->cwnd < (net->mtu - sizeof(struct sctphdr))) {
6816 net->cwnd = net->mtu - sizeof(struct sctphdr);
7387 struct sctp_nets *net; local
7397 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
7398 sin_a = (struct sockaddr_in *)&net->ro._l_addr;
7417 (sctp_route_t *)&net->ro,
7418 net, 0, vrf_id);
7464 struct sctp_nets *net; local
7489 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
7490 sin_a = (struct sockaddr_in *)&net->ro._l_addr;