Lines Matching refs:parse
62 #include "parse.h"
71 "parse", /* module name */
217 static struct streamtab parseinfo = /* stream info element for parse driver */
292 pprintf(DD_OPEN,"parse: SETUP_STREAM - setting up stream for q=%x\n", q);
313 pprintf(DD_OPEN, "parse: setup_stream - FAILED - no MEMORY for allocb\n");
328 register parsestream_t *parse;
331 pprintf(DD_OPEN, "parse: OPEN - q=%x\n", q);
335 pprintf(DD_OPEN, "parse: OPEN - FAILED - not MODOPEN\n");
341 pprintf(DD_OPEN, "parse: OPEN - FAILED - EXCLUSIVE ONLY\n");
351 pprintf(DD_OPEN, "parse: OPEN - parse area q=%x, q->q_ptr=%x\n", q, q->q_ptr);
353 pprintf(DD_OPEN, "parse: OPEN - WQ parse area q=%x, q->q_ptr=%x\n", WR(q), WR(q)->q_ptr);
355 parse = (parsestream_t *) q->q_ptr;
356 bzero((caddr_t)parse, sizeof(*parse));
357 parse->parse_queue = q;
358 parse->parse_status = PARSE_ENABLE;
359 parse->parse_ppsclockev.tv.tv_sec = 0;
360 parse->parse_ppsclockev.tv.tv_usec = 0;
361 parse->parse_ppsclockev.serial = 0;
365 pprintf(DD_OPEN, "parse: OPEN - initializing io subsystem q=%x\n", q);
367 if (!parse_ioinit(&parse->parse_io))
374 kmem_free((caddr_t)parse, sizeof(parsestream_t));
379 pprintf(DD_OPEN, "parse: OPEN - initializing stream q=%x\n", q);
384 pprintf(DD_OPEN, "parse: OPEN - SUCCEEDED\n");
402 kmem_free((caddr_t)parse, sizeof(parsestream_t));
415 register parsestream_t *parse = (parsestream_t *)q->q_ptr;
418 pprintf(DD_CLOSE, "parse: CLOSE\n");
424 if (parse->parse_dqueue)
425 close_linemon(parse->parse_dqueue, q);
426 parse->parse_dqueue = (queue_t *)0;
430 parse_ioend(&parse->parse_io);
432 kmem_free((caddr_t)parse, sizeof(parsestream_t));
455 pprintf(DD_RSVC, "parse: RSVC - putnext\n");
460 pprintf(DD_RSVC, "parse: RSVC - flow control wait\n");
481 parsestream_t *parse = (parsestream_t *)q->q_ptr;
483 pprintf(DD_WPUT, "parse: parsewput\n");
496 pprintf(DD_WPUT, "parse: parsewput - forward M_IOCTL\n");
517 *(struct ppsclockev *)(void *)datap->b_wptr = parse->parse_ppsclockev;
528 parse->parse_status = (parse->parse_status & (unsigned)~PARSE_ENABLE) |
531 if (!setup_stream(RD(q), (parse->parse_status & PARSE_ENABLE) ?
555 pprintf(DD_WPUT, "parse: parsewput - PARSEIOC_TIMECODE\n");
556 ok = parse_timecode(dct, &parse->parse_io);
560 pprintf(DD_WPUT, "parse: parsewput - PARSEIOC_SETFMT\n");
561 ok = parse_setfmt(dct, &parse->parse_io);
565 pprintf(DD_WPUT, "parse: parsewput - PARSEIOC_GETFMT\n");
566 ok = parse_getfmt(dct, &parse->parse_io);
570 pprintf(DD_WPUT, "parse: parsewput - PARSEIOC_SETCS\n");
571 ok = parse_setcs(dct, &parse->parse_io);
580 pprintf(DD_WPUT, "parse: parsewput qreply - %s\n", (mp->b_datap->db_type == M_IOCNAK) ? "M_IOCNAK" : "M_IOCACK");
632 pprintf(DD_RPUT, "parse: parserput - forward type 0x%x\n", type);
645 register parsestream_t * parse = (parsestream_t *)q->q_ptr;
658 if (!(parse->parse_status & PARSE_ENABLE))
660 pprintf(DD_RPUT, "parse: parserput - parser disabled - forward type 0x%x\n", type);
670 pprintf(DD_RPUT, "parse: parserput - M_%s\n", (type == M_DATA) ? "DATA" : "BREAK");
674 * parse packet looking for start an end characters
679 if (ch != ~0 && parse_ioread(&parse->parse_io, (unsigned int)ch, &c_time))
686 if (canputnext(parse->parse_queue) && (nmp = allocb(sizeof(parsetime_t), BPRI_MED)))
688 bcopy((caddr_t)&parse->parse_io.parse_dtime, (caddr_t)nmp->b_rptr, sizeof(parsetime_t));
690 putnext(parse->parse_queue, nmp);
694 parse_iodone(&parse->parse_io);
700 if (parse_ioread(&parse->parse_io, (unsigned int)0, &c_time))
707 if (canputnext(parse->parse_queue) && (nmp = allocb(sizeof(parsetime_t), BPRI_MED)))
709 bcopy((caddr_t)&parse->parse_io.parse_dtime, (caddr_t)nmp->b_rptr, sizeof(parsetime_t));
711 putnext(parse->parse_queue, nmp);
715 parse_iodone(&parse->parse_io);
729 register parsestream_t * parse = (parsestream_t *)q->q_ptr;
739 pprintf(DD_RPUT, "parse: parserput - M_%sHANGUP\n", (type == M_HANGUP) ? "" : "UN");
741 if ((parse->parse_status & PARSE_ENABLE) &&
742 parse_iopps(&parse->parse_io, status ? SYNC_ONE : SYNC_ZERO, &c_time))
745 if (canputnext(parse->parse_queue) && (nmp = allocb(sizeof(parsetime_t), BPRI_MED)))
747 bcopy((caddr_t)&parse->parse_io.parse_dtime, (caddr_t)nmp->b_rptr, sizeof(parsetime_t));
749 putnext(parse->parse_queue, nmp);
753 parse_iodone(&parse->parse_io);
766 parse->parse_ppsclockev.tv = c_time.tv;
767 ++(parse->parse_ppsclockev.serial);