Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

formsquid.cc File Reference

#include <stdio.h>
#include "proxytrace.h"

Include dependency graph for formsquid.cc:

Include dependency graph

Go to the source code of this file.

Functions

const char * make_query (u_4bytes query)
const char * make_port (u_4bytes port)
void PrintEntry_Squid (FILE *out_file, TEntry *entry, int swap)


Function Documentation

const char* make_port u_4bytes  port  ) 
 

Definition at line 16 of file formsquid.cc.

Referenced by PrintEntry_Squid().

00016                                      {
00017         static char buf[128];
00018 
00019         sprintf(buf, ":%d", port);
00020 
00021         return buf;
00022 }

const char* make_query u_4bytes  query  ) 
 

Definition at line 7 of file formsquid.cc.

Referenced by PrintEntry_Squid().

00007                                        {
00008         static char buf[128];
00009 
00010         sprintf(buf, "?%d", query);
00011 
00012         return buf;
00013 }

void PrintEntry_Squid FILE *  out_file,
TEntry entry,
int  swap
 

Definition at line 24 of file formsquid.cc.

References CGI_BIN_FLAG, _TEntry::client, duration, _TEntry::event_duration, EXTENSION_SPECIFIED_FLAG, ExtensionStr(), _TEntry::flags, make_port(), make_query(), _TEntry::method, MethodStr(), _TEntry::port, PORT_SPECIFIED_FLAG, _TEntry::protocol, ProtocolStr, QUERY_FOUND_FLAG, _TEntry::server, _TEntry::size, _TEntry::status, swap(), _TEntry::time_sec, _TEntry::time_usec, and u_4bytes.

00024                                                                {
00025 
00026         u_4bytes duration = ((entry -> head.event_duration+500)/1000); /* milliseconds */
00027 
00028         fprintf(stdout, "%9d.%06u %d %d %s/%d %d %s %s://%d%s/%s%d%s%s %s %s/%d\n",
00029                 entry -> head.time_sec, entry -> head.time_usec,
00030                 (( swap) ? entry -> head.client : duration),
00031                 ((!swap) ? entry -> head.client : duration),
00032                 "NONE", /* Log Tag is missing */
00033                 entry -> tail.status,
00034                 entry -> head.size,
00035                 MethodStr(entry -> tail.method),
00036         ProtocolStr(entry -> tail.protocol),
00037                 entry -> head.server,
00038                 ((entry -> tail.flags & PORT_SPECIFIED_FLAG) ? make_port(entry -> head.port) : ""),
00039                 ((entry -> tail.flags & CGI_BIN_FLAG) ? "cgi_bin/" : ""),
00040                 entry -> head.path,
00041                 ((entry -> tail.flags & EXTENSION_SPECIFIED_FLAG) ? ExtensionStr(entry -> tail.type) : ""),
00042                 ((entry -> tail.flags & QUERY_FOUND_FLAG) ? make_query(entry -> head.query) : ""),
00043                 "-", /* Ident is missing */
00044                 "DIRECT", /* assuming direct retrieval */
00045                 entry -> head.server);
00046 }

Here is the call graph for this function:


Generated on Tue Apr 20 12:20:20 2004 for NS2.26SourcesOriginal by doxygen 1.3.3