utility.c File Reference

#include <sys/types.h>
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "utility.h"
#include "config.h"

Include dependency graph for utility.c:

Go to the source code of this file.

Functions

char * logdate (time_t *t)
char * httpdate (time_t *t)
time_t httptime (char *p)
char * mimetype (char *url)
char * decode64 (char *p)
int getparms (char *p, parms, int maxparms)
int mkurlaccess (char *p)

Variables

const char * days [] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }
const char * months []


Function Documentation

char* decode64 char *  p  ) 
 

Definition at line 192 of file utility.c.

References c, d, decode, and i.

Referenced by authorize().

int getparms char *  p,
parms  ,
int  maxparms
 

Definition at line 222 of file utility.c.

References LWS, and NULL.

Referenced by doconfig().

char* httpdate time_t t  ) 
 

Definition at line 47 of file utility.c.

References days, gmtime(), months, NULL, sprintf(), time, time_t, tm::tm_hour, tm::tm_mday, tm::tm_min, tm::tm_mon, tm::tm_sec, tm::tm_wday, and tm::tm_year.

Referenced by proxy(), and sendreply().

time_t httptime char *  p  ) 
 

Definition at line 69 of file utility.c.

References atoi, days, i, months, strncmp(), time_t, tm::tm_isdst, tm::tm_mday, tm::tm_mon, tm::tm_wday, tm::tm_yday, and tm::tm_year.

Referenced by getrequest().

char* logdate time_t t  ) 
 

Definition at line 24 of file utility.c.

References localtime(), NULL, sprintf(), time, time_t, tm::tm_hour, tm::tm_mday, tm::tm_min, tm::tm_mon, tm::tm_sec, and tm::tm_year.

Referenced by main(), and proxy().

char* mimetype char *  url  ) 
 

Definition at line 163 of file utility.c.

References NULL, p, ps, and strcmp.

Referenced by police().

int mkurlaccess char *  p  ) 
 

Definition at line 248 of file utility.c.

References toupper, URLA_EXEC, URLA_HEADERS, URLA_READ, and URLA_WRITE.

Referenced by doauth(), doproxyauth(), and dovpath().


Variable Documentation

const char* days[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }
 

Definition at line 20 of file utility.c.

const char* months[]
 

Initial value:

 { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
                         "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }

Definition at line 21 of file utility.c.


Generated on Fri Apr 14 22:58:14 2006 for minix by  doxygen 1.4.6