mgp_dev_state     229 src/dps8/dps8_mgp.c } mgp_dev_state;
mgp_dev_state     488 src/dps8/dps8_mgp.c   (void)memset(&mgp_dev_state, 0, sizeof ( mgp_dev_state ));
mgp_dev_state     489 src/dps8/dps8_mgp.c   mgp_dev_state.pipe = NULL;
mgp_dev_state     490 src/dps8/dps8_mgp.c   mgp_dev_state.in_buffer_len = 0;
mgp_dev_state     491 src/dps8/dps8_mgp.c   mgp_dev_state.reading_stopped = 0;
mgp_dev_state     492 src/dps8/dps8_mgp.c   mgp_dev_state.eof_draining = 0;
mgp_dev_state     503 src/dps8/dps8_mgp.c   while (mgp_dev_state.in_buffer_len - pos >= NCP_FRAME_HEADER_SIZE)
mgp_dev_state     505 src/dps8/dps8_mgp.c       int len = ((unsigned char)mgp_dev_state.in_buffer[pos] << 8) |
mgp_dev_state     506 src/dps8/dps8_mgp.c                  (unsigned char)mgp_dev_state.in_buffer[pos + 1];
mgp_dev_state     509 src/dps8/dps8_mgp.c         mgp_dev_state.in_buffer_len - pos < NCP_FRAME_HEADER_SIZE + len)
mgp_dev_state     525 src/dps8/dps8_mgp.c   if (complete_bytes != mgp_dev_state.in_buffer_len)
mgp_dev_state     527 src/dps8/dps8_mgp.c                    mgp_dev_state.in_buffer_len - complete_bytes);
mgp_dev_state     529 src/dps8/dps8_mgp.c   mgp_dev_state.in_buffer_len = complete_bytes;
mgp_dev_state     530 src/dps8/dps8_mgp.c   mgp_dev_state.reading_stopped = 0;
mgp_dev_state     531 src/dps8/dps8_mgp.c   mgp_dev_state.eof_draining = frames != 0;
mgp_dev_state     532 src/dps8/dps8_mgp.c   mgp_dev_state.eof_drain_progress = uv_hrtime();
mgp_dev_state     536 src/dps8/dps8_mgp.c   if (!mgp_dev_state.eof_draining)
mgp_dev_state     539 src/dps8/dps8_mgp.c   if (mgp_dev_state.in_buffer_len == 0)
mgp_dev_state     541 src/dps8/dps8_mgp.c       mgp_dev_state.eof_draining = 0;
mgp_dev_state     545 src/dps8/dps8_mgp.c   if (uv_hrtime() - mgp_dev_state.eof_drain_progress >= NCP_EOF_DRAIN_IDLE_NS)
mgp_dev_state     551 src/dps8/dps8_mgp.c                      frames, mgp_dev_state.in_buffer_len);
mgp_dev_state     552 src/dps8/dps8_mgp.c       mgp_dev_state.in_buffer_len = 0;
mgp_dev_state     553 src/dps8/dps8_mgp.c       mgp_dev_state.eof_draining = 0;
mgp_dev_state     559 src/dps8/dps8_mgp.c   size_t free_bytes = sizeof(mgp_dev_state.in_buffer) - (size_t)mgp_dev_state.in_buffer_len;
mgp_dev_state     560 src/dps8/dps8_mgp.c   buf->base = (char *)mgp_dev_state.in_buffer + mgp_dev_state.in_buffer_len;
mgp_dev_state     565 src/dps8/dps8_mgp.c   if (!mgp_dev_state.reading_stopped &&
mgp_dev_state     566 src/dps8/dps8_mgp.c       (int)sizeof(mgp_dev_state.in_buffer) - mgp_dev_state.in_buffer_len < NCP_MAX_FRAME) {
mgp_dev_state     570 src/dps8/dps8_mgp.c       mgp_dev_state.reading_stopped = 1;
mgp_dev_state     574 src/dps8/dps8_mgp.c       mgp_dev_state.pipe = NULL;
mgp_dev_state     584 src/dps8/dps8_mgp.c   if (mgp_dev_state.reading_stopped && mgp_dev_state.pipe &&
mgp_dev_state     585 src/dps8/dps8_mgp.c       mgp_dev_state.in_buffer_len <= (int)sizeof(mgp_dev_state.in_buffer) / 2) {
mgp_dev_state     586 src/dps8/dps8_mgp.c     int rc = uv_read_start((uv_stream_t *)mgp_dev_state.pipe,
mgp_dev_state     590 src/dps8/dps8_mgp.c       mgp_dev_state.reading_stopped = 0;
mgp_dev_state     593 src/dps8/dps8_mgp.c       uv_close((uv_handle_t *)mgp_dev_state.pipe, ncp_close_cb);
mgp_dev_state     594 src/dps8/dps8_mgp.c       mgp_dev_state.pipe = NULL;
mgp_dev_state     612 src/dps8/dps8_mgp.c     mgp_dev_state.pipe = NULL;
mgp_dev_state     616 src/dps8/dps8_mgp.c   mgp_dev_state.in_buffer_len += (int)nread;
mgp_dev_state     623 src/dps8/dps8_mgp.c     if (mgp_dev_state.pipe) {
mgp_dev_state     624 src/dps8/dps8_mgp.c       uv_close((uv_handle_t *)mgp_dev_state.pipe, ncp_close_cb);
mgp_dev_state     625 src/dps8/dps8_mgp.c       mgp_dev_state.pipe = NULL;
mgp_dev_state     630 src/dps8/dps8_mgp.c     mgp_dev_state.reading_stopped = 0;
mgp_dev_state     631 src/dps8/dps8_mgp.c     int rc = uv_read_start((uv_stream_t *)mgp_dev_state.pipe,
mgp_dev_state     635 src/dps8/dps8_mgp.c       uv_close((uv_handle_t *)mgp_dev_state.pipe, ncp_close_cb);
mgp_dev_state     636 src/dps8/dps8_mgp.c       mgp_dev_state.pipe = NULL;
mgp_dev_state     650 src/dps8/dps8_mgp.c   if (mgp_dev_state.pipe) return 0; /* already connected or pending */
mgp_dev_state     651 src/dps8/dps8_mgp.c   if (mgp_dev_state.eof_draining) return -1;
mgp_dev_state     654 src/dps8/dps8_mgp.c   if (mgp_dev_state.ptw_failed_at > 0)
mgp_dev_state     656 src/dps8/dps8_mgp.c       if (time(NULL) - mgp_dev_state.ptw_failed_at < PTW_BACKOFF_SECS)
mgp_dev_state     658 src/dps8/dps8_mgp.c       mgp_dev_state.ptw_failed_at = 0;
mgp_dev_state     661 src/dps8/dps8_mgp.c   mgp_dev_state.pipe = malloc(sizeof(uv_pipe_t));
mgp_dev_state     662 src/dps8/dps8_mgp.c   if (!mgp_dev_state.pipe)
mgp_dev_state     664 src/dps8/dps8_mgp.c   uv_pipe_init(uv_default_loop(), mgp_dev_state.pipe, 0);
mgp_dev_state     668 src/dps8/dps8_mgp.c     uv_close((uv_handle_t *)mgp_dev_state.pipe, ncp_close_cb);
mgp_dev_state     669 src/dps8/dps8_mgp.c     mgp_dev_state.pipe = NULL;
mgp_dev_state     673 src/dps8/dps8_mgp.c   mgp_dev_state.in_buffer_len = 0;
mgp_dev_state     674 src/dps8/dps8_mgp.c   mgp_dev_state.reading_stopped = 0;
mgp_dev_state     675 src/dps8/dps8_mgp.c   mgp_dev_state.eof_draining = 0;
mgp_dev_state     676 src/dps8/dps8_mgp.c   uv_pipe_connect(req, mgp_dev_state.pipe, ncp_socket_path, ncp_connect_cb);
mgp_dev_state     703 src/dps8/dps8_mgp.c   if (!mgp_dev_state.pipe) {
mgp_dev_state     732 src/dps8/dps8_mgp.c   int rc = uv_write(&wr->req, (uv_stream_t *)mgp_dev_state.pipe,
mgp_dev_state     757 src/dps8/dps8_mgp.c   if (!mgp_dev_state.pipe && !mgp_dev_state.eof_draining)
mgp_dev_state     760 src/dps8/dps8_mgp.c   if (mgp_dev_state.in_buffer_len < NCP_FRAME_HEADER_SIZE) return 0;
mgp_dev_state     762 src/dps8/dps8_mgp.c   int pktlen = ((unsigned char)mgp_dev_state.in_buffer[0] << 8)
mgp_dev_state     763 src/dps8/dps8_mgp.c              |  (unsigned char)mgp_dev_state.in_buffer[1];
mgp_dev_state     768 src/dps8/dps8_mgp.c     if (mgp_dev_state.pipe) {
mgp_dev_state     769 src/dps8/dps8_mgp.c       uv_close((uv_handle_t *)mgp_dev_state.pipe, ncp_close_cb);
mgp_dev_state     770 src/dps8/dps8_mgp.c       mgp_dev_state.pipe = NULL;
mgp_dev_state     772 src/dps8/dps8_mgp.c     mgp_dev_state.in_buffer_len = 0;
mgp_dev_state     773 src/dps8/dps8_mgp.c     mgp_dev_state.eof_draining = 0;
mgp_dev_state     777 src/dps8/dps8_mgp.c   if (mgp_dev_state.in_buffer_len < NCP_FRAME_HEADER_SIZE + pktlen) return 0;
mgp_dev_state     779 src/dps8/dps8_mgp.c   memcpy(pkt8, mgp_dev_state.in_buffer + NCP_FRAME_HEADER_SIZE, pktlen);
mgp_dev_state     781 src/dps8/dps8_mgp.c   mgp_dev_state.in_buffer_len -= consumed;
mgp_dev_state     782 src/dps8/dps8_mgp.c   if (mgp_dev_state.in_buffer_len > 0)
mgp_dev_state     783 src/dps8/dps8_mgp.c     memmove(mgp_dev_state.in_buffer,
mgp_dev_state     784 src/dps8/dps8_mgp.c             mgp_dev_state.in_buffer + consumed,
mgp_dev_state     785 src/dps8/dps8_mgp.c             mgp_dev_state.in_buffer_len);
mgp_dev_state     787 src/dps8/dps8_mgp.c   if (mgp_dev_state.eof_draining)
mgp_dev_state     789 src/dps8/dps8_mgp.c       mgp_dev_state.eof_drain_progress = uv_hrtime();
mgp_dev_state     790 src/dps8/dps8_mgp.c       if (mgp_dev_state.in_buffer_len == 0)
mgp_dev_state     791 src/dps8/dps8_mgp.c         mgp_dev_state.eof_draining = 0;
mgp_dev_state    1210 src/dps8/dps8_mgp.c           mgp_dev_state.ptw_failed_at = time(NULL);
mgp_dev_state    1248 src/dps8/dps8_mgp.c       mgp_dev_state.want_to_read           = 1;
mgp_dev_state    1249 src/dps8/dps8_mgp.c       mgp_dev_state.want_to_read_since     = time(NULL);
mgp_dev_state    1250 src/dps8/dps8_mgp.c       mgp_dev_state.read_unit_idx          = iom_unit_idx;
mgp_dev_state    1251 src/dps8/dps8_mgp.c       mgp_dev_state.read_unit_chan         = chan;
mgp_dev_state    1265 src/dps8/dps8_mgp.c       mgp_dev_state.delivery_succeeded = 1;
mgp_dev_state    1311 src/dps8/dps8_mgp.c           mgp_dev_state.ptw_failed_at = time(NULL);
mgp_dev_state    1312 src/dps8/dps8_mgp.c           if (mgp_dev_state.pipe)
mgp_dev_state    1314 src/dps8/dps8_mgp.c               uv_close((uv_handle_t *)mgp_dev_state.pipe, ncp_close_cb);
mgp_dev_state    1315 src/dps8/dps8_mgp.c               mgp_dev_state.pipe = NULL;
mgp_dev_state    1334 src/dps8/dps8_mgp.c           mgp_dev_state.ptw_failed_at = time(NULL);
mgp_dev_state    1335 src/dps8/dps8_mgp.c           if (mgp_dev_state.pipe)
mgp_dev_state    1337 src/dps8/dps8_mgp.c               uv_close((uv_handle_t *)mgp_dev_state.pipe, ncp_close_cb);
mgp_dev_state    1338 src/dps8/dps8_mgp.c               mgp_dev_state.pipe = NULL;
mgp_dev_state    1406 src/dps8/dps8_mgp.c           mgp_dev_state.ptw_failed_at = time(NULL);
mgp_dev_state    1407 src/dps8/dps8_mgp.c           if (mgp_dev_state.pipe)
mgp_dev_state    1409 src/dps8/dps8_mgp.c               uv_close((uv_handle_t *)mgp_dev_state.pipe, ncp_close_cb);
mgp_dev_state    1410 src/dps8/dps8_mgp.c               mgp_dev_state.pipe = NULL;
mgp_dev_state    1654 src/dps8/dps8_mgp.c   mgp_dev_state.want_to_read = 0;
mgp_dev_state    1655 src/dps8/dps8_mgp.c   mgp_dev_state.ptw_failed_at = time(NULL); /* start reconnect backoff */
mgp_dev_state    1656 src/dps8/dps8_mgp.c   if (mgp_dev_state.pipe != NULL)
mgp_dev_state    1658 src/dps8/dps8_mgp.c       uv_close((uv_handle_t *)mgp_dev_state.pipe, ncp_close_cb);
mgp_dev_state    1659 src/dps8/dps8_mgp.c       mgp_dev_state.pipe = NULL;
mgp_dev_state    1661 src/dps8/dps8_mgp.c   send_terminate_interrupt(mgp_dev_state.read_unit_idx,
mgp_dev_state    1662 src/dps8/dps8_mgp.c                            mgp_dev_state.read_unit_chan);
mgp_dev_state    1707 src/dps8/dps8_mgp.c   if (mgp_dev_state.pipe != NULL && mgp_dev_state.want_to_read_since > 0)
mgp_dev_state    1710 src/dps8/dps8_mgp.c       if (mgp_dev_state.last_progress_time == 0)
mgp_dev_state    1712 src/dps8/dps8_mgp.c           mgp_dev_state.last_progress_time = now_np;
mgp_dev_state    1714 src/dps8/dps8_mgp.c       else if (now_np - mgp_dev_state.last_progress_time >= NO_PROGRESS_TIMEOUT_SECS)
mgp_dev_state    1720 src/dps8/dps8_mgp.c           if (mgp_dev_state.pipe)
mgp_dev_state    1722 src/dps8/dps8_mgp.c               uv_close((uv_handle_t *)mgp_dev_state.pipe, ncp_close_cb);
mgp_dev_state    1723 src/dps8/dps8_mgp.c               mgp_dev_state.pipe = NULL;
mgp_dev_state    1725 src/dps8/dps8_mgp.c           mgp_dev_state.last_progress_time = 0;
mgp_dev_state    1726 src/dps8/dps8_mgp.c           mgp_dev_state.masked_since = 0;
mgp_dev_state    1727 src/dps8/dps8_mgp.c           mgp_dev_state.want_to_read = 0;
mgp_dev_state    1728 src/dps8/dps8_mgp.c           send_terminate_interrupt(mgp_dev_state.read_unit_idx,
mgp_dev_state    1729 src/dps8/dps8_mgp.c                                    mgp_dev_state.read_unit_chan);
mgp_dev_state    1734 src/dps8/dps8_mgp.c   if (!mgp_dev_state.want_to_read)
mgp_dev_state    1739 src/dps8/dps8_mgp.c   uint iom_unit_idx = mgp_dev_state.read_unit_idx;
mgp_dev_state    1740 src/dps8/dps8_mgp.c   uint chan          = mgp_dev_state.read_unit_chan;
mgp_dev_state    1757 src/dps8/dps8_mgp.c         mgp_dev_state.want_to_read = 0;
mgp_dev_state    1767 src/dps8/dps8_mgp.c         if (mgp_dev_state.pipe != NULL)
mgp_dev_state    1770 src/dps8/dps8_mgp.c             if (mgp_dev_state.masked_since == 0)
mgp_dev_state    1772 src/dps8/dps8_mgp.c                 mgp_dev_state.masked_since = now;
mgp_dev_state    1777 src/dps8/dps8_mgp.c             else if (now - mgp_dev_state.masked_since >= MASKED_STUCK_TIMEOUT_SECS)
mgp_dev_state    1783 src/dps8/dps8_mgp.c                 if (mgp_dev_state.pipe)
mgp_dev_state    1785 src/dps8/dps8_mgp.c                     uv_close((uv_handle_t *)mgp_dev_state.pipe, ncp_close_cb);
mgp_dev_state    1786 src/dps8/dps8_mgp.c                     mgp_dev_state.pipe = NULL;
mgp_dev_state    1788 src/dps8/dps8_mgp.c                 mgp_dev_state.masked_since = 0;
mgp_dev_state    1789 src/dps8/dps8_mgp.c                 send_terminate_interrupt(mgp_dev_state.read_unit_idx,
mgp_dev_state    1790 src/dps8/dps8_mgp.c                                          mgp_dev_state.read_unit_chan);
mgp_dev_state    1811 src/dps8/dps8_mgp.c             mgp_dev_state.masked_since = 0;
mgp_dev_state    1813 src/dps8/dps8_mgp.c             if (mgp_dev_state.want_to_read_since > 0 &&
mgp_dev_state    1814 src/dps8/dps8_mgp.c                 now_ma - mgp_dev_state.want_to_read_since >= NCP_ABSENT_TIMEOUT_SECS)
mgp_dev_state    1820 src/dps8/dps8_mgp.c                 mgp_dev_state.want_to_read = 0;
mgp_dev_state    1821 src/dps8/dps8_mgp.c                 send_terminate_interrupt(mgp_dev_state.read_unit_idx,
mgp_dev_state    1822 src/dps8/dps8_mgp.c                                          mgp_dev_state.read_unit_chan);
mgp_dev_state    1829 src/dps8/dps8_mgp.c     mgp_dev_state.masked_since = 0;
mgp_dev_state    1840 src/dps8/dps8_mgp.c                   mgp_dev_state.want_to_read,
mgp_dev_state    1841 src/dps8/dps8_mgp.c                   mgp_dev_state.pipe,
mgp_dev_state    1842 src/dps8/dps8_mgp.c                   mgp_dev_state.read_unit_idx,
mgp_dev_state    1843 src/dps8/dps8_mgp.c                   mgp_dev_state.read_unit_chan);
mgp_dev_state    1858 src/dps8/dps8_mgp.c   if (mgp_dev_state.pipe == NULL && !mgp_dev_state.eof_draining)
mgp_dev_state    1862 src/dps8/dps8_mgp.c       if (mgp_dev_state.pipe == NULL)
mgp_dev_state    1866 src/dps8/dps8_mgp.c           if (now2 - mgp_dev_state.want_to_read_since >= NCP_ABSENT_TIMEOUT_SECS)
mgp_dev_state    1872 src/dps8/dps8_mgp.c                         mgp_dev_state.read_unit_chan);
mgp_dev_state    1873 src/dps8/dps8_mgp.c               mgp_dev_state.want_to_read = 0;
mgp_dev_state    1874 src/dps8/dps8_mgp.c               send_terminate_interrupt(mgp_dev_state.read_unit_idx,
mgp_dev_state    1875 src/dps8/dps8_mgp.c                                        mgp_dev_state.read_unit_chan);
mgp_dev_state    1881 src/dps8/dps8_mgp.c       mgp_dev_state.want_to_read_since = time(NULL);
mgp_dev_state    1937 src/dps8/dps8_mgp.c       mgp_dev_state.ring_full = 0;
mgp_dev_state    1943 src/dps8/dps8_mgp.c       if (!mgp_dev_state.ring_full)
mgp_dev_state    1949 src/dps8/dps8_mgp.c       mgp_dev_state.ring_full = 1;
mgp_dev_state    1952 src/dps8/dps8_mgp.c   mgp_dev_state.ring_full = 0;
mgp_dev_state    2000 src/dps8/dps8_mgp.c       mgp_dev_state.want_to_read = 0;
mgp_dev_state    2106 src/dps8/dps8_mgp.c       mgp_dev_state.want_to_read = 0;
mgp_dev_state    2107 src/dps8/dps8_mgp.c       send_terminate_interrupt(mgp_dev_state.read_unit_idx,
mgp_dev_state    2108 src/dps8/dps8_mgp.c                                mgp_dev_state.read_unit_chan);
mgp_dev_state    2117 src/dps8/dps8_mgp.c   mgp_dev_state.last_progress_time = time(NULL);
mgp_dev_state    2150 src/dps8/dps8_mgp.c   mgp_dev_state.delivery_succeeded = 0;
mgp_dev_state    2155 src/dps8/dps8_mgp.c              __func__, __LINE__, rc, mgp_dev_state.delivery_succeeded);
mgp_dev_state    2160 src/dps8/dps8_mgp.c     if (mgp_dev_state.delivery_succeeded)
mgp_dev_state    2172 src/dps8/dps8_mgp.c                            mgp_dev_state.read_unit_chan);
mgp_dev_state    2174 src/dps8/dps8_mgp.c             mgp_dev_state.want_to_read = 0;
mgp_dev_state    2177 src/dps8/dps8_mgp.c             if (mgp_dev_state.pipe != NULL)
mgp_dev_state    2179 src/dps8/dps8_mgp.c                 if (mgp_dev_state.pipe) //-V547
mgp_dev_state    2181 src/dps8/dps8_mgp.c                     uv_close((uv_handle_t *)mgp_dev_state.pipe, ncp_close_cb);
mgp_dev_state    2182 src/dps8/dps8_mgp.c                     mgp_dev_state.pipe = NULL;
mgp_dev_state    2186 src/dps8/dps8_mgp.c               send_terminate_interrupt(mgp_dev_state.read_unit_idx,
mgp_dev_state    2187 src/dps8/dps8_mgp.c                                        mgp_dev_state.read_unit_chan);
mgp_dev_state    2196 src/dps8/dps8_mgp.c       send_terminate_interrupt(mgp_dev_state.read_unit_idx,
mgp_dev_state    2197 src/dps8/dps8_mgp.c                                mgp_dev_state.read_unit_chan);