Lines Matching refs:parse
60 #include "parse.h"
69 "parse", /* module name */
215 static struct streamtab parseinfo = /* stream info element for parse driver */
290 pprintf(DD_OPEN,"parse: SETUP_STREAM - setting up stream for q=%x\n", q);
311 pprintf(DD_OPEN, "parse: setup_stream - FAILED - no MEMORY for allocb\n");
326 register parsestream_t *parse;
329 pprintf(DD_OPEN, "parse: OPEN - q=%x\n", q);
333 pprintf(DD_OPEN, "parse: OPEN - FAILED - not MODOPEN\n");
339 pprintf(DD_OPEN, "parse: OPEN - FAILED - EXCLUSIVE ONLY\n");
349 pprintf(DD_OPEN, "parse: OPEN - parse area q=%x, q->q_ptr=%x\n", q, q->q_ptr);
351 pprintf(DD_OPEN, "parse: OPEN - WQ parse area q=%x, q->q_ptr=%x\n", WR(q), WR(q)->q_ptr);
353 parse = (parsestream_t *) q->q_ptr;
354 bzero((caddr_t)parse, sizeof(*parse));
355 parse->parse_queue = q;
356 parse->parse_status = PARSE_ENABLE;
357 parse->parse_ppsclockev.tv.tv_sec = 0;
358 parse->parse_ppsclockev.tv.tv_usec = 0;
359 parse->parse_ppsclockev.serial = 0;
363 pprintf(DD_OPEN, "parse: OPEN - initializing io subsystem q=%x\n", q);
365 if (!parse_ioinit(&parse->parse_io))
372 kmem_free((caddr_t)parse, sizeof(parsestream_t));
377 pprintf(DD_OPEN, "parse: OPEN - initializing stream q=%x\n", q);
382 pprintf(DD_OPEN, "parse: OPEN - SUCCEEDED\n");
400 kmem_free((caddr_t)parse, sizeof(parsestream_t));
413 register parsestream_t *parse = (parsestream_t *)q->q_ptr;
416 pprintf(DD_CLOSE, "parse: CLOSE\n");
422 if (parse->parse_dqueue)
423 close_linemon(parse->parse_dqueue, q);
424 parse->parse_dqueue = (queue_t *)0;
428 parse_ioend(&parse->parse_io);
430 kmem_free((caddr_t)parse, sizeof(parsestream_t));
453 pprintf(DD_RSVC, "parse: RSVC - putnext\n");
458 pprintf(DD_RSVC, "parse: RSVC - flow control wait\n");
479 parsestream_t *parse = (parsestream_t *)q->q_ptr;
481 pprintf(DD_WPUT, "parse: parsewput\n");
494 pprintf(DD_WPUT, "parse: parsewput - forward M_IOCTL\n");
515 *(struct ppsclockev *)(void *)datap->b_wptr = parse->parse_ppsclockev;
526 parse->parse_status = (parse->parse_status & (unsigned)~PARSE_ENABLE) |
529 if (!setup_stream(RD(q), (parse->parse_status & PARSE_ENABLE) ?
553 pprintf(DD_WPUT, "parse: parsewput - PARSEIOC_TIMECODE\n");
554 ok = parse_timecode(dct, &parse->parse_io);
558 pprintf(DD_WPUT, "parse: parsewput - PARSEIOC_SETFMT\n");
559 ok = parse_setfmt(dct, &parse->parse_io);
563 pprintf(DD_WPUT, "parse: parsewput - PARSEIOC_GETFMT\n");
564 ok = parse_getfmt(dct, &parse->parse_io);
568 pprintf(DD_WPUT, "parse: parsewput - PARSEIOC_SETCS\n");
569 ok = parse_setcs(dct, &parse->parse_io);
578 pprintf(DD_WPUT, "parse: parsewput qreply - %s\n", (mp->b_datap->db_type == M_IOCNAK) ? "M_IOCNAK" : "M_IOCACK");
630 pprintf(DD_RPUT, "parse: parserput - forward type 0x%x\n", type);
643 register parsestream_t * parse = (parsestream_t *)q->q_ptr;
656 if (!(parse->parse_status & PARSE_ENABLE))
658 pprintf(DD_RPUT, "parse: parserput - parser disabled - forward type 0x%x\n", type);
668 pprintf(DD_RPUT, "parse: parserput - M_%s\n", (type == M_DATA) ? "DATA" : "BREAK");
672 * parse packet looking for start an end characters
677 if (ch != ~0 && parse_ioread(&parse->parse_io, (unsigned int)ch, &c_time))
684 if (canputnext(parse->parse_queue) && (nmp = allocb(sizeof(parsetime_t), BPRI_MED)))
686 bcopy((caddr_t)&parse->parse_io.parse_dtime, (caddr_t)nmp->b_rptr, sizeof(parsetime_t));
688 putnext(parse->parse_queue, nmp);
692 parse_iodone(&parse->parse_io);
698 if (parse_ioread(&parse->parse_io, (unsigned int)0, &c_time))
705 if (canputnext(parse->parse_queue) && (nmp = allocb(sizeof(parsetime_t), BPRI_MED)))
707 bcopy((caddr_t)&parse->parse_io.parse_dtime, (caddr_t)nmp->b_rptr, sizeof(parsetime_t));
709 putnext(parse->parse_queue, nmp);
713 parse_iodone(&parse->parse_io);
727 register parsestream_t * parse = (parsestream_t *)q->q_ptr;
737 pprintf(DD_RPUT, "parse: parserput - M_%sHANGUP\n", (type == M_HANGUP) ? "" : "UN");
739 if ((parse->parse_status & PARSE_ENABLE) &&
740 parse_iopps(&parse->parse_io, status ? SYNC_ONE : SYNC_ZERO, &c_time))
743 if (canputnext(parse->parse_queue) && (nmp = allocb(sizeof(parsetime_t), BPRI_MED)))
745 bcopy((caddr_t)&parse->parse_io.parse_dtime, (caddr_t)nmp->b_rptr, sizeof(parsetime_t));
747 putnext(parse->parse_queue, nmp);
751 parse_iodone(&parse->parse_io);
764 parse->parse_ppsclockev.tv = c_time.tv;
765 ++(parse->parse_ppsclockev.serial);