equal
deleted
inserted
replaced
|
1 |
|
2 #ifndef _VOLTA_H |
|
3 #define _VOLTA_H |
|
4 |
|
5 #ifndef PROG |
|
6 #define PROG "volta" |
|
7 #endif |
|
8 #define VERSION "$Version$" /* expanded by mercurial */ |
|
9 |
|
10 #include <stdio.h> |
|
11 #include <stdlib.h> |
|
12 #include <stdarg.h> |
|
13 #include <string.h> |
|
14 #include <unistd.h> |
|
15 |
|
16 #include <sys/types.h> |
|
17 #include <sys/socket.h> |
|
18 #include <netinet/in.h> |
|
19 #include <arpa/inet.h> |
|
20 |
|
21 |
|
22 /* Maximum length per line from Squid */ |
|
23 #define LINE_BUFSIZE 2048 |
|
24 |
|
25 /* URL <SP> client_ip "/" fqdn <SP> user <SP> method [<SP> kvpairs]<NL> */ |
|
26 typedef struct request { |
|
27 char *url; |
|
28 char *host; |
|
29 struct sockaddr_in ip; |
|
30 char *ip_fqdn; |
|
31 char *user; |
|
32 char *method; |
|
33 char *kvpairs; |
|
34 } request; |
|
35 |
|
36 /* An "empty" request struct used for re-assignment */ |
|
37 static const struct request reset_request; |
|
38 |
|
39 /* Prototypes */ |
|
40 void usage( char *prg ); |
|
41 void debug( const char *fmt, ... ); |
|
42 int parse( char *p ); |
|
43 |
|
44 #endif |
|
45 |