Lines Matching defs:ftrace

55 FILE	*ftrace;			/* output trace file */
172 (void)fprintf(ftrace, "-- %s --\n", ts(now.tv_sec));
183 if (ftrace != 0) {
186 vfprintf(ftrace, p, args);
188 (void)fputc('\n',ftrace);
189 fflush(ftrace);
203 if (ftrace != 0 && zap_stdio) {
204 if (ftrace != stdout)
205 fclose(ftrace);
206 ftrace = 0;
223 if (ftrace != 0) {
224 fflush(ftrace);
225 if (ferror(ftrace))
226 trace_off("tracing off: %s", strerror(ferror(ftrace)));
237 if (ftrace != 0) {
240 vfprintf(ftrace, p, args);
242 (void)fputc('\n',ftrace);
312 if (ftrace == 0) {
370 ftrace = n_ftrace;
374 dup2(fileno(ftrace), STDOUT_FILENO);
375 dup2(fileno(ftrace), STDERR_FILENO);
413 if (new_tracelevel > tracelevel && ftrace == 0) {
546 (void)putc('<', ftrace);
557 (void)putc(c, ftrace);
558 (void)fprintf(ftrace, "%s", tbl->bits_name);
568 (void)putc(c, ftrace);
569 (void)fprintf(ftrace, tbl->bits_name, field);
574 (void)fputs("> ", ftrace);
605 (void)fprintf(ftrace, "metric=%-2d ", rts->rts_metric);
607 (void)fprintf(ftrace, "%s ", (rts->rts_ifp == 0 ?
611 (void)fprintf(ftrace, "router=%s ",
614 (void)fprintf(ftrace, "%s ", ts(rts->rts_time));
617 (void)fprintf(ftrace, "tag=%#x ", ntohs(rts->rts_tag));
621 (void)fprintf(ftrace, "de_ag=%d ", i);
631 if (!TRACEACTIONS || ftrace == 0)
635 (void)fprintf(ftrace, "%-3s interface %-4s ", act, ifp->int_name);
636 (void)fprintf(ftrace, "%-15s-->%-15s ",
643 (void)fprintf(ftrace, "metric=%d ", ifp->int_metric);
645 (void)fprintf(ftrace, "adj_inmetric=%u ",
648 (void)fprintf(ftrace, "adj_outmetric=%u ",
652 (void)fprintf(ftrace, "fake_default=%u ", ifp->int_d_metric);
655 (void)fputc('\n',ftrace);
664 if (!TRACEACTIONS || ftrace == 0)
676 (void)fprintf(ftrace, "Del #%d %-35s ",
684 (void)fprintf(ftrace, "Chg #%d %-35s ",
693 (void)fprintf(ftrace, "\n %19s%-16s ", "",
706 (void)fprintf(ftrace, "Add #%d %-35s ",
713 (void)fputc('\n',ftrace);
724 if (ftrace == 0)
729 vfprintf(ftrace, p, args);
731 (void)fputc('\n',ftrace);
742 if (!TRACEACTIONS || ftrace == 0)
747 vfprintf(ftrace, p, args);
749 (void)fputc('\n',ftrace);
760 if (!TRACEPACKETS || ftrace == 0)
765 vfprintf(ftrace, p, args);
767 (void)fputc('\n',ftrace);
777 if (ftrace == 0)
789 (void)fprintf(ftrace, "%s %-35s ",
796 (void)fprintf(ftrace, "\n%*s %19s%-16s ",
809 (void)fputc('\n',ftrace);
816 if (ftrace == 0)
820 (void)fprintf(ftrace, "%s %-35s ",
825 (void)fputc('\n',ftrace);
838 (void)fprintf(ftrace, " %-35s ",
844 (void)fprintf(ftrace, "pm=%d@%s",
850 (void)fprintf(ftrace,"\n #%d%15s%-16s ",
855 (void)fputc('\n',ftrace);
866 if (ftrace == 0)
870 (void)fputs("current daemon state:\n", ftrace);
888 if (!TRACEPACKETS || ftrace == 0)
894 (void)fprintf(ftrace, "%s bad RIPv%d cmd=%d %s"
903 (void)fprintf(ftrace, "%s RIPv%d %s %s %s.%d%s%s\n",
924 (void)fputs("\tQUERY ", ftrace);
926 (void)fprintf(ftrace, "%s ",
929 (void)fprintf(ftrace, "mask=%#x ",
932 (void)fprintf(ftrace, "nhop=%s ",
935 (void)fprintf(ftrace, "tag=%#x ",
937 (void)fputc('\n',ftrace);
944 (void)fprintf(ftrace, "\tPassword"
954 (void)fprintf(ftrace,
968 (void)fprintf(ftrace,
974 (void)fprintf(ftrace, "%02x ",
976 (void)fputc('\n',ftrace);
982 (void)fprintf(ftrace,
988 (void)fprintf(ftrace, "\t%-18s ",
993 (void)fprintf(ftrace, "\t%-18s ",
998 (void)fprintf(ftrace, "metric=%-2d ",
1001 (void)fprintf(ftrace, " nhop=%s ",
1004 (void)fprintf(ftrace, "tag=%#x",
1006 (void)fputc('\n',ftrace);
1009 (void)fprintf(ftrace, "truncated record, len %d\n",
1014 fprintf(ftrace, "\tfile=\"%.*s\"\n", size-4,