Lines Matching refs:softc

130     tcpconsole_t *softc;
133 softc = (tcpconsole_t *) KMALLOC(sizeof(tcpconsole_t),0);
134 if (softc) {
135 softc->tcp_socket = -1;
136 softc->tcp_status = TCPCONSTAT_IDLE;
141 softc->tcp_port = (int)probe_a;
143 cfe_attach(drv, softc, NULL, descr);
148 static int tcpconsole_isready(tcpconsole_t *softc,int *rxbytes)
153 res = tcp_status(softc->tcp_socket,&connstat,rxbytes,&rxeof);
170 static int tcpconsole_process(tcpconsole_t *softc)
174 switch (softc->tcp_status) {
179 softc->tcp_status = TCPCONSTAT_BROKEN;
182 softc->tcp_socket = res;
184 res = tcp_listen(softc->tcp_socket,softc->tcp_port);
187 tcp_close(softc->tcp_socket);
188 softc->tcp_status = TCPCONSTAT_BROKEN;
189 softc->tcp_socket = -1;
192 softc->tcp_status = TCPCONSTAT_LISTEN;
198 if (tcpconsole_isready(softc,NULL) > 0) {
199 softc->tcp_status = TCPCONSTAT_CONNECTED;
209 tcp_close(softc->tcp_socket);
210 softc->tcp_socket = -1;
211 softc->tcp_status = TCPCONSTAT_IDLE;
231 tcpconsole_t *softc = ctx->dev_softc;
237 tcpconsole_process(softc);
241 if (softc->tcp_status == TCPCONSTAT_CONNECTED) {
245 if (tcpconsole_isready(softc,NULL) <= 0) {
246 softc->tcp_status = TCPCONSTAT_DISCONNECTED;
250 res = tcp_recv(softc->tcp_socket,bptr,blen);
262 tcpconsole_t *softc = ctx->dev_softc;
266 tcpconsole_process(softc);
270 if (softc->tcp_status == TCPCONSTAT_CONNECTED) {
271 if (tcpconsole_isready(softc,(int *)&rxbytes) <= 0) {
272 softc->tcp_status = TCPCONSTAT_DISCONNECTED;
284 tcpconsole_t *softc = ctx->dev_softc;
290 tcpconsole_process(softc);
294 if (softc->tcp_status == TCPCONSTAT_CONNECTED) {
298 if (tcpconsole_isready(softc,NULL) <= 0) {
299 softc->tcp_status = TCPCONSTAT_DISCONNECTED;
303 res = tcp_send(softc->tcp_socket,bptr,blen);
320 tcpconsole_t *softc = ctx->dev_softc;
322 if (softc->tcp_status == TCPCONSTAT_CONNECTED) {
323 softc->tcp_status = TCPCONSTAT_DISCONNECTED;