Lines Matching defs:ifd
48 static int iftraceinit(struct interface *ifp, struct ifdebug *ifd);
50 static void dumptrace(FILE *fp, char *dir, struct ifdebug *ifd);
64 iftraceinit(struct interface *ifp, struct ifdebug *ifd)
68 ifd->ifd_records = (struct iftrace *)
70 if (ifd->ifd_records == NULL)
72 ifd->ifd_front = ifd->ifd_records;
73 ifd->ifd_count = 0;
74 for (t = ifd->ifd_records; t < ifd->ifd_records + NRECORDS; t++) {
78 ifd->ifd_if = ifp;
111 trace(struct ifdebug *ifd, struct sockaddr_in6 *who, char *p, int len, int m)
115 if (ifd->ifd_records == 0)
117 t = ifd->ifd_front++;
118 if (ifd->ifd_front >= ifd->ifd_records + NRECORDS)
119 ifd->ifd_front = ifd->ifd_records;
120 if (ifd->ifd_count < NRECORDS)
121 ifd->ifd_count++;
232 dumptrace(FILE *fp, char *dir, struct ifdebug *ifd)
237 if (ifd->ifd_front == ifd->ifd_records &&
238 ifd->ifd_front->ift_size == 0) {
244 t = ifd->ifd_front - ifd->ifd_count;
245 if (t < ifd->ifd_records)
247 for (; ifd->ifd_count; ifd->ifd_count--, t++) {
248 if (t >= ifd->ifd_records + NRECORDS)
249 t = ifd->ifd_records;