00001 #include <stdio.h>
00002
00003 #include "proxytrace.h"
00004
00005 void PrintHeader(FILE *out_file, int noURL) {
00006
00007 fprintf(out_file, " time event server client ");
00008 fprintf(out_file, " size last mod status meth. prot. server port type flags path query");
00009
00010 if (noURL)
00011 fprintf(out_file, "\n");
00012 else
00013 fprintf(out_file, " url #\n");
00014 }
00015
00016 void PrintEntry_Text(FILE *out_file, TEntry *entry, int noURL) {
00017
00018 static int entry_count = 0;
00019
00020 if (!entry_count++)
00021 PrintHeader(out_file, noURL);
00022
00023 fprintf(out_file, "%9d%06u %8d %8d %5d %7d %9d %6d %6s %6s %6d %6d %6s %6d %6d %6d",
00024 entry -> head.time_sec, entry -> head.time_usec,
00025 entry -> head.event_duration, entry -> head.server_duration,
00026 entry -> head.client, entry -> head.size, entry -> head.last_mod,
00027 entry -> tail.status,
00028 MethodStr(entry -> tail.method),
00029 ProtocolStr(entry -> tail.protocol),
00030 entry -> head.server, entry -> head.port,
00031 ExtensionTypeStr(entry -> tail.type),
00032 entry -> tail.flags,
00033 entry -> head.path, entry -> head.query);
00034
00035 if (noURL)
00036 fprintf(out_file, "\n");
00037 else
00038 fprintf(out_file, " %6d\n", entry -> url);
00039 }