Lines Matching refs:fp

130 	sctp_faddr_t	*fp = NULL;
179 fp = sctp_lookup_faddr(sctp, addr);
180 if (fp == NULL) {
265 SCTP_SET_CHUNK_DEST(mproto, fp);
331 sctp_faddr_t *fp;
342 fp = SCTP_CHUNK_DEST(mdblk);
343 if (fp == NULL)
344 fp = sctp->sctp_current;
345 if (fp->sf_isv4)
380 if (fp->sf_pmss - chunk_len > sizeof (*sdc))
381 count = chunksize = fp->sf_pmss - chunk_len;
383 count = chunksize = fp->sf_pmss;
502 count = chunksize = fp->sf_pmss - sizeof (*sdc);
527 if (fp == fp1) {
530 ((len > fp->sf_pmss - sizeof (*sdc)) ||
535 count = chunksize = fp->sf_pmss -
545 fp = fp1;
568 sctp_add_proto_hdr(sctp_t *sctp, sctp_faddr_t *fp, mblk_t *mp, int sacklen,
573 int isv4 = fp->sf_isv4;
589 * heartbeat and ended up setting fp->sf_saddr as unspec because we
593 * usable source address, fp->sf_state will be SCTP_FADDRS_UNREACH and
596 ASSERT(fp->sf_ixa->ixa_ire != NULL);
597 if ((fp->sf_ixa->ixa_ire->ire_flags & (RTF_REJECT|RTF_BLACKHOLE)) ||
598 SCTP_IS_ADDR_UNSPEC(fp->sf_isv4, fp->sf_saddr)) {
599 sctp_get_dest(sctp, fp);
600 if (fp->sf_state == SCTP_FADDRS_UNREACH) {
634 if (fp != sctp->sctp_current) {
639 IN6_V4MAPPED_TO_IPADDR(&fp->sf_faddr, iph->ipha_dst);
640 if (!IN6_IS_ADDR_V4MAPPED_ANY(&fp->sf_saddr)) {
641 IN6_V4MAPPED_TO_IPADDR(&fp->sf_saddr,
649 ip6h->ip6_dst = fp->sf_faddr;
650 if (!IN6_IS_ADDR_UNSPECIFIED(&fp->sf_saddr)) {
651 ip6h->ip6_src = fp->sf_saddr;
692 sctp_find_fast_rexmit_mblks(sctp_t *sctp, int *total, sctp_faddr_t **fp)
724 if (*fp == NULL) {
725 *fp = chunk_fp;
726 if ((*fp)->sf_state !=
728 old_fp = *fp;
729 *fp = sctp->sctp_current;
731 } else if (old_fp == NULL && *fp != chunk_fp) {
750 (*fp)->sf_pmss && start_mp != NULL) {
816 int32_t firstseg_len, uint32_t cansend, sctp_faddr_t *fp)
908 if (fp == NULL) {
909 fp = SCTP_CHUNK_DEST(sctp->sctp_xmit_unsent);
910 if (fp == NULL || fp->sf_state != SCTP_FADDRS_ALIVE)
911 fp = sctp->sctp_current;
918 fp1 != fp) {
922 meta = sctp_chunkify(sctp, fp->sf_pmss, firstseg_len, cansend);
959 sctp_faddr_t *fp = NULL;
963 mp = sctp_find_fast_rexmit_mblks(sctp, &pktlen, &fp);
968 if ((head = sctp_add_proto_hdr(sctp, fp, mp, 0, NULL)) == NULL) {
973 if ((pktlen > fp->sf_pmss) && fp->sf_isv4) {
979 sctp_set_iplen(sctp, head, fp->sf_ixa);
980 (void) conn_ip_output(head, fp->sf_ixa);
982 sctp->sctp_active = fp->sf_lastactive = ddi_get_lbolt64();
1002 sctp_faddr_t *fp;
1039 fp = sctp->sctp_current;
1061 fp = sctp->sctp_current;
1077 fp = SCTP_CHUNK_DEST(meta);
1078 if (fp == NULL || fp->sf_state != SCTP_FADDRS_ALIVE)
1079 fp = sctp->sctp_current;
1097 fp = lfp;
1103 head = sctp_add_proto_hdr(sctp, fp, nmp, sacklen,
1118 fp, chunklen, meta);
1128 fp = SCTP_CHUNK_DEST(meta);
1129 if (fp == NULL || fp->sf_state != SCTP_FADDRS_ALIVE)
1130 fp = sctp->sctp_current;
1135 if (now - fp->sf_lastactive > fp->sf_rto) {
1136 SET_CWND(fp, fp->sf_pmss,
1140 pathmax = fp->sf_cwnd - fp->sf_suna;
1150 head = sctp_add_proto_hdr(sctp, fp, nmp, 0, &error);
1164 fp, chunklen, meta);
1171 fp->sf_lastactive = now;
1172 if (pathmax > fp->sf_pmss)
1173 pathmax = fp->sf_pmss;
1174 SCTP_CHUNK_SENT(sctp, mp, sdc, fp, chunklen, meta);
1217 cansend - seglen, fp);
1227 fp != SCTP_CHUNK_DEST(meta)) {
1259 SCTP_CHUNK_SENT(sctp, mp, sdc, fp, chunklen, meta);
1263 if ((seglen > fp->sf_pmss) && fp->sf_isv4) {
1279 ntohs(sdc->sdh_ssn), (void *)fp, sctp->sctp_frwnd,
1281 sctp_set_iplen(sctp, head, fp->sf_ixa);
1282 (void) conn_ip_output(head, fp->sf_ixa);
1285 if (!fp->sf_timer_running)
1286 SCTP_FADDR_TIMER_RESTART(sctp, fp, fp->sf_rto);
1293 if (!fp->sf_timer_running)
1294 SCTP_FADDR_TIMER_RESTART(sctp, fp, fp->sf_rto);
1338 * the size does not exceed fp->sf_pmss. We return false in case
1342 sctp_add_ftsn_set(sctp_ftsn_set_t **s, sctp_faddr_t *fp, mblk_t *meta,
1355 ASSERT((*slen + sizeof (uint32_t)) <= fp->sf_pmss);
1378 if ((*slen + sizeof (uint32_t)) > fp->sf_pmss)
1401 sctp_make_ftsn_chunk(sctp_t *sctp, sctp_faddr_t *fp, sctp_ftsn_set_t *sets,
1413 if (fp->sf_isv4)
1458 sctp_faddr_t *fp, uint32_t *seglen)
1485 !sctp_add_ftsn_set(&sets, fp, meta, &nsets, seglen)) {
1510 *nmp = sctp_make_ftsn_chunk(sctp, fp, sets, nsets, *seglen);
1524 fp = sctp->sctp_lastdata;
1527 head = sctp_add_proto_hdr(sctp, fp, *nmp, sacklen, NULL);
1551 SCTP_CHUNK_SENT(sctp, mp1, sdc, fp, clen,
1653 #define SCTP_CHUNK_RX_CANBUNDLE(mp, fp) \
1655 ((SCTP_CHUNK_ISSENT((mp)) && (SCTP_CHUNK_DEST(mp) == (fp) && \
1677 sctp_faddr_t *fp;
1799 fp = oldfp;
1801 fp = sctp_rotate_faddr(sctp, oldfp);
1802 pkt = sctp_rexmit_packet(sctp, &meta, &mp, fp, &pkt_len);
1804 ASSERT(pkt_len <= fp->sf_pmss);
1805 sctp_set_iplen(sctp, pkt, fp->sf_ixa);
1806 (void) conn_ip_output(pkt, fp->sf_ixa);
1820 if (oldfp != fp && oldfp->sf_suna != 0)
1821 SCTP_FADDR_TIMER_RESTART(sctp, oldfp, fp->sf_rto);
1822 SCTP_FADDR_TIMER_RESTART(sctp, fp, fp->sf_rto);
1835 fp = sctp_rotate_faddr(sctp, oldfp);
1836 ASSERT(fp != NULL);
1841 sctp_make_ftsns(sctp, meta, mp, &nmp, fp, &seglen);
1877 * should send it back to the last fp where we
1880 * back to that fp. Also we should check that
1881 * the fp is alive.
1886 fp = sctp->sctp_lastdata;
1900 fp->sf_rtt_updates = 0;
1907 sctp_set_faddr_current(sctp, fp);
1923 head = sctp_add_proto_hdr(sctp, fp, nmp, sacklen, NULL);
1931 SCTP_CHUNK_SENT(sctp, mp, sdc, fp, chunklen, meta);
1937 while (seglen < fp->sf_pmss) {
1967 seglen, fp->sf_pmss - seglen, NULL);
1982 if ((new_len = seglen + new_len + extra) > fp->sf_pmss)
1999 SCTP_CHUNK_SENT(sctp, mp, sdc, fp, chunklen, meta);
2005 if ((seglen > fp->sf_pmss) && fp->sf_isv4) {
2015 fp->sf_rxt_unacked += seglen;
2020 (void *)fp, sctp->sctp_frwnd, sctp->sctp_lastack_rxd));
2025 sctp_set_iplen(sctp, head, fp->sf_ixa);
2026 (void) conn_ip_output(head, fp->sf_ixa);
2031 * the new fp timer for the retransmitted chunks.
2043 if (oldfp != fp && oldfp->sf_suna != 0)
2047 * Should we restart the timer of the new fp? If there is
2048 * outstanding data to the new fp, the timer should be
2052 * just retransmitted chunks to the new fp. The reason is that we
2055 * chunk with the earliest TSN sent to new fp. This probably
2057 * be conservative and restart the timer of the new fp.
2059 SCTP_FADDR_TIMER_RESTART(sctp, fp, fp->sf_rto);
2066 * to be retransmitted to the given fp. The given meta and mp
2074 sctp_rexmit_packet(sctp_t *sctp, mblk_t **meta, mblk_t **mp, sctp_faddr_t *fp,
2106 head = sctp_add_proto_hdr(sctp, fp, nmp, 0, NULL);
2111 SCTP_CHUNK_SENT(sctp, *mp, sdc, fp, chunklen, *meta);
2120 while (seglen < fp->sf_pmss) {
2163 if ((new_len = seglen + new_len + extra) > fp->sf_pmss)
2180 SCTP_CHUNK_SENT(sctp, *mp, sdc, fp, chunklen, *meta);
2191 fp->sf_rxt_unacked += seglen;
2212 sctp_faddr_t *fp;
2233 * fp where the retransmitted chunks are sent.
2235 fp = sctp->sctp_current;
2264 if (fp->sf_cwnd <= fp->sf_rxt_unacked)
2265 tot_wnd = fp->sf_pmss;
2267 tot_wnd = fp->sf_cwnd - fp->sf_rxt_unacked;
2292 if (!fp->sf_timer_running)
2293 SCTP_FADDR_TIMER_RESTART(sctp, fp, fp->sf_rto);
2294 pkt = sctp_rexmit_packet(sctp, &meta, &mp, fp, &pkt_len);
2299 if ((pkt_len > fp->sf_pmss) && fp->sf_isv4) {
2309 sctp_set_iplen(sctp, pkt, fp->sf_ixa);
2310 (void) conn_ip_output(pkt, fp->sf_ixa);
2314 if (tot_wnd <= pkt_len || tot_wnd - pkt_len < fp->sf_pmss ||