Lines Matching refs:iip

92 	struct ifile_info *iip;  member
289 static void rem_input_file(struct ifile_info *iip) in rem_input_file() argument
291 list_del(&iip->head); in rem_input_file()
293 close(iip->ifd); in rem_input_file()
294 free(iip->file_name); in rem_input_file()
295 free(iip->devnm); in rem_input_file()
296 free(iip); in rem_input_file()
307 struct ifile_info *iip = malloc(sizeof(*iip)); in __add_input_file() local
309 iip->cpu = cpu; in __add_input_file()
310 iip->tpkts = 0; in __add_input_file()
311 iip->genesis = 0; in __add_input_file()
312 iip->devnm = strdup(devnm); in __add_input_file()
313 iip->file_name = strdup(file_name); in __add_input_file()
314 iip->ifd = open(file_name, O_RDONLY); in __add_input_file()
315 if (iip->ifd < 0) { in __add_input_file()
320 list_add_tail(&iip->head, &input_files); in __add_input_file()
333 struct ifile_info *iip = list_entry(p, struct ifile_info, head); in add_input_file() local
334 if (strcmp(iip->devnm, devnm) == 0) in add_input_file()
483 static int next_io(struct ifile_info *iip, struct io_spec *spec) in next_io() argument
491 ret = read(iip->ifd, &t, sizeof(t)); in next_io()
493 fatal(iip->file_name, ERR_SYSCALL, "Read failed\n"); in next_io()
500 iip->file_name, (int)ret); in next_io()
527 ret = read(iip->ifd, buf, pdu_len); in next_io()
529 fatal(iip->file_name, ERR_SYSCALL, "Read PDU failed\n"); in next_io()
534 iip->file_name, (int)ret); in next_io()
539 iip->tpkts++; in next_io()
546 iip->cpu, (long long unsigned)spec->sector, in next_io()
550 if (iip->genesis == 0) { in next_io()
551 iip->genesis = spec->time; in next_io()
554 (long long unsigned)iip->genesis, iip->cpu); in next_io()
556 else if (iip->genesis > spec->time) in next_io()
559 (long long unsigned )iip->genesis, in next_io()
579 __u64 off = hdrp->time_stamp - stream->iip->genesis; in bunch_output_hdr()
676 static struct io_stream *stream_open(struct ifile_info *iip) in stream_open() argument
688 sprintf(ofile_name, "%s/%s.%s.%d", odir, iip->devnm, obase, iip->cpu); in stream_open()
695 stream->iip = iip; in stream_open()
706 sprintf(vfile_name, "%s/%s.%s.%d.rec", odir, iip->devnm, in stream_open()
707 obase, iip->cpu); in stream_open()
728 .genesis = stream->iip->genesis, in stream_close()
741 stream->iip->devnm, stream->iip->cpu, in stream_close()
742 (unsigned long long)stream->iip->tpkts, in stream_close()
759 static void process(struct ifile_info *iip) in process() argument
764 stream = stream_open(iip); in process()
765 while (next_io(iip, &spec)) in process()
769 rem_input_file(iip); in process()