Lines Matching refs:state
175 /** List of all TCP PCBs in LISTEN state */
177 /** List of all TCP PCBs that are in a state in which
180 /** List of all TCP PCBs in TIME-WAIT state */
226 LWIP_ASSERT("tcp_free: LISTEN", pcb->state != LISTEN);
237 LWIP_ASSERT("tcp_free_listen: !LISTEN", pcb->state != LISTEN);
291 ((pcb->state == ESTABLISHED) ||
292 (pcb->state == CLOSE_WAIT))) {
314 if (pcb->state == FIN_WAIT_2) {
323 if (pcb->state == SYN_RCVD) {
329 if (pcb->state == LAST_ACK) {
332 * is required to stay in TIME_WAIT state for 2MSL of time
349 if (((pcb->state == SYN_SENT) && (pcb->nrtx >= TCP_SYNMAXRTX)) ||
350 ((pcb->state == FIN_WAIT_1) || (pcb->state == CLOSING)) ||
432 LWIP_ASSERT("pcb->state == LISTEN", pcb->state == LISTEN);
497 * a closing state), the connection is closed, and put in a closing state.
510 if (rst_on_unacked_data && ((pcb->state == ESTABLISHED) || (pcb->state == CLOSE_WAIT))) {
535 - states which send FIN and change state are handled in tcp_close_shutdown_fin() */
536 switch (pcb->state) {
538 /* Closing a pcb in the CLOSED state might seem erroneous,
539 * however, it is in this state once allocated and as yet unused
542 * or for a pcb that has been used and then entered the CLOSED state
572 switch (pcb->state) {
578 pcb->state = FIN_WAIT_1;
585 pcb->state = FIN_WAIT_1;
592 pcb->state = LAST_ACK;
627 * a closing state), the connection is closed, and put in a closing state.
649 tcp_debug_print_state(pcb->state);
651 if (pcb->state != LISTEN) {
679 if (pcb->state == LISTEN) {
696 /* This can't happen twice since if it succeeds, the pcb's state is changed.
698 switch (pcb->state) {
705 into CLOSED state, where the PCB is deallocated. */
733 /* pcb->state LISTEN not allowed here */
735 pcb->state != LISTEN);
737 are in an active state, call the receive function associated with
739 if (pcb->state == TIME_WAIT) {
752 if (pcb->state == CLOSED) {
778 last_state = pcb->state;
816 * ERR_VAL if bind failed because the PCB is not in a valid state
842 LWIP_ERROR("tcp_bind: can only bind in state CLOSED", pcb->state == CLOSED, return ERR_VAL);
846 we have to check the pcbs in TIME-WAIT state, also.
956 * Set the state of the connection to be LISTEN, which means that it
996 * Set the state of the connection to be LISTEN, which means that it
1021 LWIP_ERROR("tcp_listen_with_backlog_and_err: pcb already connected", pcb->state == CLOSED, res = ERR_CLSD; goto done);
1024 if (pcb->state == LISTEN) {
1055 lpcb->state = LISTEN;
1090 * Update the state that tracks the available window space to advertise.
1143 /* pcb->state LISTEN not allowed here */
1145 pcb->state != LISTEN);
1246 LWIP_ERROR("tcp_connect: can only connect from state CLOSED", pcb->state == CLOSED, return ERR_ISCONN);
1349 /* SYN segment was enqueued, changed the pcbs state now */
1350 pcb->state = SYN_SENT;
1392 LWIP_ASSERT("tcp_slowtmr: active pcb->state != CLOSED\n", pcb->state != CLOSED);
1393 LWIP_ASSERT("tcp_slowtmr: active pcb->state != LISTEN\n", pcb->state != LISTEN);
1394 LWIP_ASSERT("tcp_slowtmr: active pcb->state != TIME-WAIT\n", pcb->state != TIME_WAIT);
1406 if (pcb->state == SYN_SENT && pcb->nrtx >= TCP_SYNMAXRTX) {
1464 if (pcb->state != SYN_SENT) {
1493 if (pcb->state == FIN_WAIT_2) {
1508 ((pcb->state == ESTABLISHED) ||
1509 (pcb->state == CLOSE_WAIT))) {
1540 if (pcb->state == SYN_RCVD) {
1549 if (pcb->state == LAST_ACK) {
1581 last_state = pcb->state;
1619 LWIP_ASSERT("tcp_slowtmr: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT);
1926 * Kills the oldest connection that is in specific state.
1930 tcp_kill_state(enum tcp_state state)
1935 LWIP_ASSERT("invalid state", (state == CLOSING) || (state == LAST_ACK));
1939 /* Go through the list of active pcbs and get the oldest pcb that is in state
1942 if (pcb->state == state) {
1951 tcp_state_str[state], (void *)inactive, inactivity));
1958 * Kills the oldest connection that is in TIME_WAIT state.
1985 * now send the FIN (which failed before), the pcb might be in a state that is
2009 * @return a new tcp_pcb that initially is in state CLOSED
2121 * @return a new tcp_pcb that initially is in state CLOSED
2139 * @return a new tcp_pcb that initially is in state CLOSED
2159 * Specifies the program specific state that should be passed to all
2195 LWIP_ASSERT("invalid socket state for recv callback", pcb->state != LISTEN);
2215 LWIP_ASSERT("invalid socket state for sent callback", pcb->state != LISTEN);
2241 LWIP_ASSERT("invalid socket state for err callback", pcb->state != LISTEN);
2260 if ((pcb != NULL) && (pcb->state == LISTEN)) {
2291 LWIP_ASSERT("invalid socket state for poll", pcb->state != LISTEN);
2312 if (pcb->state != CLOSED &&
2313 pcb->state != TIME_WAIT &&
2314 pcb->state != LISTEN) {
2368 if ((pcb->state != TIME_WAIT) &&
2369 (pcb->state != LISTEN) &&
2375 if (pcb->state != LISTEN) {
2383 pcb->state = CLOSED;
2565 /* Free all ooseq pbufs (and possibly reset SACK state) */
2617 * Print a tcp state for debugging purposes.
2676 tcp_debug_print_state(pcb->state);
2682 tcp_debug_print_state(pcbl->state);
2690 tcp_debug_print_state(pcb->state);
2695 * Check state consistency of the tcp_pcb lists.
2702 LWIP_ASSERT("tcp_pcbs_sane: active pcb->state != CLOSED", pcb->state != CLOSED);
2703 LWIP_ASSERT("tcp_pcbs_sane: active pcb->state != LISTEN", pcb->state != LISTEN);
2704 LWIP_ASSERT("tcp_pcbs_sane: active pcb->state != TIME-WAIT", pcb->state != TIME_WAIT);
2707 LWIP_ASSERT("tcp_pcbs_sane: tw pcb->state == TIME-WAIT", pcb->state == TIME_WAIT);