#include <stdio.h>#include <sys/types.h>Include dependency graph for proxytrace.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Compounds | |
| struct | ReqLog |
| struct | TEntry |
| struct | TEntryHeader |
| struct | TEntryTail |
| struct | URL |
Defines | |
| #define | NO_PATH_FLAG 1 |
| #define | PORT_SPECIFIED_FLAG 2 |
| #define | NULL_PATH_ADDED_FLAG 4 |
| #define | QUERY_FOUND_FLAG 8 |
| #define | EXTENSION_SPECIFIED_FLAG 16 |
| #define | CGI_BIN_FLAG 32 |
| #define | TRACE_HEADER_SIZE 8192 |
Typedefs | |
| typedef unsigned int | u_4bytes |
| typedef unsigned short int | u_2bytes |
| typedef int | method_t |
| typedef int | protocol_t |
| typedef int | pagetype_t |
Functions | |
| const char * | MethodStr (int method) |
| const char * | ProtocolStr (int protocol) |
| const char * | ExtensionStr (int type) |
| const char * | ExtensionTypeStr (int type) |
| size_t | ReadHeader (FILE *in_file, void *userBuf) |
| size_t | ReadEntry (FILE *in_file, TEntry *entry) |
| size_t | ReadEntryV1 (FILE *in_file, TEntry *entry) |
Variables | |
| const int | METHOD_NONE |
| const int | PROTO_NONE |
| const int | EXT_NONE |
|
|
Definition at line 51 of file proxytrace.h. Referenced by lf_analyze(), and PrintEntry_Squid(). |
|
|
Definition at line 50 of file proxytrace.h. Referenced by PrintEntry_Squid(). |
|
|
Definition at line 46 of file proxytrace.h. |
|
|
Definition at line 48 of file proxytrace.h. |
|
|
Definition at line 47 of file proxytrace.h. Referenced by PrintEntry_Squid(). |
|
|
Definition at line 49 of file proxytrace.h. Referenced by lf_analyze(), and PrintEntry_Squid(). |
|
|
Definition at line 82 of file proxytrace.h. Referenced by ReadHeader(). |
|
|
Definition at line 10 of file proxytrace.h. Referenced by ToOtherEndian(). |
|
|
Definition at line 27 of file proxytrace.h. |
|
|
Definition at line 18 of file proxytrace.h. Referenced by ToOtherEndian(). |
|
|
Definition at line 8 of file proxytrace.h. |
|
|
Definition at line 7 of file proxytrace.h. Referenced by PrintEntry_Squid(), rotate4(), and ToOtherEndian(). |
|
|
Definition at line 71 of file proxytrace.cc. References ExtensionStrings, and MAX_EXTENSIONS. Referenced by ExtensionTypeStr(), and PrintEntry_Squid().
00071 {
00072
00073 if (type < 0 || type > MAX_EXTENSIONS)
00074 type = MAX_EXTENSIONS;
00075
00076 return ExtensionStrings[type];
00077 }
|
|
|
Definition at line 79 of file proxytrace.cc. References ExtensionStr(). Referenced by PrintEntry_Text().
00079 {
00080
00081 return (type == 0) ? "NONE" : (ExtensionStr(type)+1);
00082 }
|
Here is the call graph for this function:

|
|
Definition at line 55 of file proxytrace.cc. References MAX_METHODS, and MethodStrings. Referenced by PrintEntry_Squid(), and PrintEntry_Text().
00055 {
00056
00057 if (method < 0 || method > MAX_METHODS)
00058 method = MAX_METHODS;
00059
00060 return MethodStrings[method];
00061 }
|
|
|
Definition at line 63 of file proxytrace.cc. References MAX_PROTOCOLS, and ProtocolStrings.
00063 {
00064
00065 if (protocol < 0 || protocol > MAX_PROTOCOLS)
00066 protocol = MAX_PROTOCOLS;
00067
00068 return ProtocolStrings[protocol];
00069 }
|
|
||||||||||||
|
Definition at line 99 of file proxytrace.cc. References in_file, and TEntry. Referenced by main().
00099 {
00100
00101 size_t items_read = fread(entry, sizeof(TEntry), 1, in_file);
00102
00103 if (items_read < 0 || items_read > 1) {
00104 fprintf(stderr, "%s:%d error reading trace entry (%u bytes)\n",
00105 __FILE__, __LINE__, (unsigned)sizeof(TEntry));
00106 exit(-2);
00107 }
00108
00109 return items_read*sizeof(TEntry);
00110 }
|
|
||||||||||||
|
Definition at line 112 of file proxytrace.cc.
00112 {
00113
00114 size_t items_read = fread(&entry -> head, sizeof(TEntryHeader), 1, in_file);
00115
00116 if (items_read == 1)
00117 items_read = fread(&entry -> tail, sizeof(TEntryTail), 1, in_file);
00118
00119 if (items_read < 0 || items_read > 1) {
00120 fprintf(stderr, "%s:%d error reading v1 trace entry (%u bytes)\n",
00121 __FILE__, __LINE__, (unsigned)(sizeof(TEntryHeader)+sizeof(TEntryTail)));
00122 exit(-2);
00123 }
00124
00125 entry -> url = 0; /* initialize unused field */
00126
00127 return items_read*(sizeof(TEntryHeader)+sizeof(TEntryTail));
00128 }
|
|
||||||||||||
|
Definition at line 85 of file proxytrace.cc. References in_file, and TRACE_HEADER_SIZE. Referenced by main().
00085 {
00086 static char defaultBuf[TRACE_HEADER_SIZE];
00087
00088 void *buf = (userBuf) ? userBuf : defaultBuf;
00089
00090 if (fread(buf, TRACE_HEADER_SIZE, 1, in_file) != 1) {
00091 fprintf(stderr, "%s:%d error reading file header (%d bytes)\n",
00092 __FILE__, __LINE__, TRACE_HEADER_SIZE);
00093 exit(-2);
00094 }
00095
00096 return TRACE_HEADER_SIZE;
00097 }
|
|
|
Initial value: 0
EXT_HTML = 1
EXT_GIF = 2
EXT_CGI = 3
EXT_DATA = 4
EXT_CLASS = 5
EXT_MAP = 6
EXT_JPEG = 7
EXT_MPEG = 8
EXT_OTHER = 9
Definition at line 28 of file proxytrace.h. |
|
|
Initial value: 0
METHOD_GET = 1
METHOD_POST = 2
METHOD_HEAD = 3
METHOD_CONNECT = 4
Definition at line 12 of file proxytrace.h. |
|
|
Initial value: 0
PROTO_HTTP = 1
PROTO_FTP = 2
PROTO_GOPHER= 3
PROTO_WAIS = 4
PROTO_CACHEOBJ = 5
PROTO_MAX = 6
Definition at line 19 of file proxytrace.h. |
1.3.3