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()
2149 struct sctp_nets *net; local
2159 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
2160 switch (net->ro._l_addr.sa.sa_family) {
2205 struct sctp_nets *net; local
2216 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
2217 switch (net->ro._l_addr.sa.sa_family) {
2249 (net->ro._l_addr.sa.sa_family == AF_INET)) {
2251 in6_sin_2_v4mapsin6(&net->ro._l_addr.sin,
2254 memcpy(addr, &net->ro._l_addr, cpsz);
2257 memcpy(addr, &net->ro._l_addr, cpsz);
2302 struct sctp_nets *net; local
2329 net = sctp_findnet(stcb, addr);
2338 net = NULL;
2340 stcb = sctp_findassociation_ep_addr(&inp, addr, &net, NULL, NULL);
2345 if ((stcb != NULL) && (net == NULL)) {
2383 if (net != NULL) {
2384 paddrp->spp_hbinterval = net->heart_beat_delay;
2385 paddrp->spp_pathmaxrxt = net->failure_threshold;
2386 paddrp->spp_pathmtu = net->mtu;
2387 switch (net->ro._l_addr.sa.sa_family) {
2402 if (net->dest_state & SCTP_ADDR_NOHB) {
2408 if (net->dest_state & SCTP_ADDR_NO_PMTUD) {
2413 if (net->dscp & 0x01) {
2414 paddrp->spp_dscp = net->dscp & 0xfc;
2418 if ((net->ro._l_addr.sa.sa_family == AF_INET6) &&
2419 (net->flowlabel & 0x80000000)) {
2420 paddrp->spp_ipv6_flowlabel = net->flowlabel & 0x000fffff;
2504 struct sctp_nets *net; local
2531 net = sctp_findnet(stcb, addr);
2540 net = NULL;
2542 stcb = sctp_findassociation_ep_addr(&inp, addr, &net, NULL, NULL);
2548 if ((stcb != NULL) && (net != NULL)) {
2549 if (net->dest_state & SCTP_ADDR_UNCONFIRMED) {
2552 } else if (net->dest_state & SCTP_ADDR_REACHABLE) {
2559 paddri->spinfo_cwnd = net->cwnd;
2560 paddri->spinfo_srtt = net->lastsa >> SCTP_RTT_SHIFT;
2561 paddri->spinfo_rto = net->RTO;
2563 paddri->spinfo_mtu = net->mtu;
2600 struct sctp_nets *net; local
2624 net = stcb->asoc.primary_destination;
2625 if (net != NULL) {
2627 &net->ro._l_addr,
2628 ((struct sockaddr *)(&net->ro._l_addr))->sa_len);
2635 if (net->dest_state & SCTP_ADDR_UNCONFIRMED) {
2638 } else if (net->dest_state & SCTP_ADDR_REACHABLE) {
2645 sstat->sstat_primary.spinfo_cwnd = net->cwnd;
2646 sstat->sstat_primary.spinfo_srtt = net->lastsa >> SCTP_RTT_SHIFT;
2647 sstat->sstat_primary.spinfo_rto = net->RTO;
2648 sstat->sstat_primary.spinfo_mtu = net->mtu;
3168 struct sctp_nets *net; local
3195 net = sctp_findnet(stcb, addr);
3204 net = NULL;
3206 stcb = sctp_findassociation_ep_addr(&inp, addr, &net, NULL, NULL);
3211 if ((stcb != NULL) && (net == NULL)) {
3247 if (net != NULL) {
3248 thlds->spt_pathmaxrxt = net->failure_threshold;
3249 thlds->spt_pathpfthld = net->pf_threshold;
3282 struct sctp_nets *net; local
3309 net = sctp_findnet(stcb, addr);
3318 net = NULL;
3320 stcb = sctp_findassociation_ep_addr(&inp, addr, &net, NULL, NULL);
3325 if ((stcb != NULL) && (net == NULL)) {
3361 if (net) {
3362 encaps->sue_port = net->port;
3959 struct sctp_nets *net; local
3975 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
3976 stcb->asoc.cc_functions.sctp_set_initial_cc_param(stcb, net);
3999 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
4000 stcb->asoc.cc_functions.sctp_set_initial_cc_param(stcb, net);
5211 struct sctp_nets *net; local
5238 net = sctp_findnet(stcb, addr);
5247 net = NULL;
5250 &net, NULL, NULL);
5255 if ((stcb != NULL) && (net == NULL)) {
5315 if (net != NULL) {
5318 if (((net->dest_state & SCTP_ADDR_UNCONFIRMED) == 0) &&
5319 ((net->dest_state & SCTP_ADDR_NOHB) == 0)) {
5320 sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net,
5323 net->dest_state |= SCTP_ADDR_NOHB;
5327 net->heart_beat_delay = paddrp->spp_hbinterval;
5329 net->heart_beat_delay = 0;
5331 sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net,
5333 sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net);
5334 net->dest_state &= ~SCTP_ADDR_NOHB;
5338 sctp_send_hb(stcb, net, SCTP_SO_LOCKED);
5340 sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net);
5344 if (SCTP_OS_TIMER_PENDING(&net->pmtu_timer.timer)) {
5345 sctp_timer_stop(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, net,
5348 net->dest_state |= SCTP_ADDR_NO_PMTUD;
5350 net->mtu = paddrp->spp_pathmtu;
5351 switch (net->ro._l_addr.sa.sa_family) {
5354 net->mtu += SCTP_MIN_V4_OVERHEAD;
5359 net->mtu += SCTP_MIN_OVERHEAD;
5365 if (net->mtu < stcb->asoc.smallest_mtu) {
5366 sctp_pathmtu_adjustment(stcb, net->mtu, true);
5371 if (!SCTP_OS_TIMER_PENDING(&net->pmtu_timer.timer)) {
5372 sctp_timer_start(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, net);
5374 net->dest_state &= ~SCTP_ADDR_NO_PMTUD;
5377 if (net->dest_state & SCTP_ADDR_PF) {
5378 if (net->error_count > paddrp->spp_pathmaxrxt) {
5379 net->dest_state &= ~SCTP_ADDR_PF;
5382 if ((net->error_count <= paddrp->spp_pathmaxrxt) &&
5383 (net->error_count > net->pf_threshold)) {
5384 net->dest_state |= SCTP_ADDR_PF;
5385 sctp_send_hb(stcb, net, SCTP_SO_LOCKED);
5387 stcb->sctp_ep, stcb, net,
5389 sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net);
5392 if (net->dest_state & SCTP_ADDR_REACHABLE) {
5393 if (net->error_count > paddrp->spp_pathmaxrxt) {
5394 net->dest_state &= ~SCTP_ADDR_REACHABLE;
5395 sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, stcb, 0, net, SCTP_SO_LOCKED);
5398 if (net->error_count <= paddrp->spp_pathmaxrxt) {
5399 net->dest_state |= SCTP_ADDR_REACHABLE;
5400 sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, 0, net, SCTP_SO_LOCKED);
5403 net->failure_threshold = paddrp->spp_pathmaxrxt;
5406 net->dscp = paddrp->spp_dscp & 0xfc;
5407 net->dscp |= 0x01;
5411 if (net->ro._l_addr.sa.sa_family == AF_INET6) {
5412 net->flowlabel = paddrp->spp_ipv6_flowlabel & 0x000fffff;
5413 net->flowlabel |= 0x80000000;
5421 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
5422 if (net->dest_state & SCTP_ADDR_PF) {
5423 if (net->error_count > paddrp->spp_pathmaxrxt) {
5424 net->dest_state &= ~SCTP_ADDR_PF;
5427 if ((net->error_count <= paddrp->spp_pathmaxrxt) &&
5428 (net->error_count > net->pf_threshold)) {
5429 net->dest_state |= SCTP_ADDR_PF;
5430 sctp_send_hb(stcb, net, SCTP_SO_LOCKED);
5432 stcb->sctp_ep, stcb, net,
5434 sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net);
5437 if (net->dest_state & SCTP_ADDR_REACHABLE) {
5438 if (net->error_count > paddrp->spp_pathmaxrxt) {
5439 net->dest_state &= ~SCTP_ADDR_REACHABLE;
5440 sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, stcb, 0, net, SCTP_SO_LOCKED);
5443 if (net->error_count <= paddrp->spp_pathmaxrxt) {
5444 net->dest_state |= SCTP_ADDR_REACHABLE;
5445 sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, 0, net, SCTP_SO_LOCKED);
5448 net->failure_threshold = paddrp->spp_pathmaxrxt;
5458 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
5460 net->heart_beat_delay = paddrp->spp_hbinterval;
5462 net->heart_beat_delay = 0;
5464 if (net->dest_state & SCTP_ADDR_NOHB) {
5465 net->dest_state &= ~SCTP_ADDR_NOHB;
5467 sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net,
5469 sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net);
5474 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
5475 if ((net->dest_state & SCTP_ADDR_NOHB) == 0) {
5476 net->dest_state |= SCTP_ADDR_NOHB;
5477 if ((net->dest_state & SCTP_ADDR_UNCONFIRMED) == 0) {
5479 inp, stcb, net,
5487 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
5488 if (SCTP_OS_TIMER_PENDING(&net->pmtu_timer.timer)) {
5489 sctp_timer_stop(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, net,
5492 net->dest_state |= SCTP_ADDR_NO_PMTUD;
5494 net->mtu = paddrp->spp_pathmtu;
5495 switch (net->ro._l_addr.sa.sa_family) {
5498 net->mtu += SCTP_MIN_V4_OVERHEAD;
5503 net->mtu += SCTP_MIN_OVERHEAD;
5509 if (net->mtu < stcb->asoc.smallest_mtu) {
5510 sctp_pathmtu_adjustment(stcb, net->mtu, true);
5520 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
5521 if (!SCTP_OS_TIMER_PENDING(&net->pmtu_timer.timer)) {
5522 sctp_timer_start(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, net);
5524 net->dest_state &= ~SCTP_ADDR_NO_PMTUD;
5530 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
5531 net->dscp = paddrp->spp_dscp & 0xfc;
5532 net->dscp |= 0x01;
5539 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
5540 if (net->ro._l_addr.sa.sa_family == AF_INET6) {
5541 net->flowlabel = paddrp->spp_ipv6_flowlabel & 0x000fffff;
5542 net->flowlabel |= 0x80000000;
5744 struct sctp_nets *net; local
5771 net = sctp_findnet(stcb, addr);
5780 net = NULL;
5783 &net, NULL, NULL);
5789 if ((stcb != NULL) && (net != NULL)) {
5790 if (net != stcb->asoc.primary_destination) {
5791 if ((net->dest_state & SCTP_ADDR_UNCONFIRMED) == 0) {
5793 if (sctp_set_primary_addr(stcb, (struct sockaddr *)NULL, net) == 0) {
5795 ((net->dest_state & SCTP_ADDR_PF) == 0) &&
5796 (net->dest_state & SCTP_ADDR_REACHABLE)) {
6296 struct sctp_nets *net; local
6323 net = sctp_findnet(stcb, addr);
6332 net = NULL;
6335 &net, NULL, NULL);
6340 if ((stcb != NULL) && (net == NULL)) {
6383 if (net != NULL) {
6384 net->failure_threshold = thlds->spt_pathmaxrxt;
6385 net->pf_threshold = thlds->spt_pathpfthld;
6386 if (net->dest_state & SCTP_ADDR_PF) {
6387 if ((net->error_count > net->failure_threshold) ||
6388 (net->error_count <= net->pf_threshold)) {
6389 net->dest_state &= ~SCTP_ADDR_PF;
6392 if ((net->error_count > net->pf_threshold) &&
6393 (net->error_count <= net->failure_threshold)) {
6394 net->dest_state |= SCTP_ADDR_PF;
6395 sctp_send_hb(stcb, net, SCTP_SO_LOCKED);
6397 stcb->sctp_ep, stcb, net,
6399 sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net);
6402 if (net->dest_state & SCTP_ADDR_REACHABLE) {
6403 if (net->error_count > net->failure_threshold) {
6404 net->dest_state &= ~SCTP_ADDR_REACHABLE;
6405 sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, stcb, 0, net, SCTP_SO_LOCKED);
6408 if (net->error_count <= net->failure_threshold) {
6409 net->dest_state |= SCTP_ADDR_REACHABLE;
6410 sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, 0, net, SCTP_SO_LOCKED);
6414 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
6415 net->failure_threshold = thlds->spt_pathmaxrxt;
6416 net->pf_threshold = thlds->spt_pathpfthld;
6417 if (net->dest_state & SCTP_ADDR_PF) {
6418 if ((net->error_count > net->failure_threshold) ||
6419 (net->error_count <= net->pf_threshold)) {
6420 net->dest_state &= ~SCTP_ADDR_PF;
6423 if ((net->error_count > net->pf_threshold) &&
6424 (net->error_count <= net->failure_threshold)) {
6425 net->dest_state |= SCTP_ADDR_PF;
6426 sctp_send_hb(stcb, net, SCTP_SO_LOCKED);
6428 stcb->sctp_ep, stcb, net,
6430 sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net);
6433 if (net->dest_state & SCTP_ADDR_REACHABLE) {
6434 if (net->error_count > net->failure_threshold) {
6435 net->dest_state &= ~SCTP_ADDR_REACHABLE;
6436 sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, stcb, 0, net, SCTP_SO_LOCKED);
6439 if (net->error_count <= net->failure_threshold) {
6440 net->dest_state |= SCTP_ADDR_REACHABLE;
6441 sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, 0, net, SCTP_SO_LOCKED);
6468 struct sctp_nets *net; local
6495 net = sctp_findnet(stcb, addr);
6504 net = NULL;
6506 stcb = sctp_findassociation_ep_addr(&inp, addr, &net, NULL, NULL);
6511 if ((stcb != NULL) && (net == NULL)) {
6547 if (net != NULL) {
6548 net->port = encaps->sue_port;
6809 struct sctp_nets *net; local
6817 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
6818 if ((net->cwnd > stcb->asoc.max_cwnd) &&
6819 (net->cwnd > (net->mtu - sizeof(struct sctphdr)))) {
6820 net->cwnd = stcb->asoc.max_cwnd;
6821 if (net->cwnd < (net->mtu - sizeof(struct sctphdr))) {
6822 net->cwnd = net->mtu - sizeof(struct sctphdr);
7411 struct sctp_nets *net; local
7421 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
7422 sin_a = (struct sockaddr_in *)&net->ro._l_addr;
7441 (sctp_route_t *)&net->ro,
7442 net, 0, vrf_id);
7489 struct sctp_nets *net; local
7518 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
7519 sin_a = (struct sockaddr_in *)&net->ro._l_addr;