A
PPENDICES
S
ECTION
A
PPENDIX
C
480
8
E
6 T
ECHNOLOGIES
, R3000 E
NTERPRISE
F
ILTER
U
SER
G
UIDE
CGI written in C
/*
* cusc_block.c
* Description: sample C source code of CGI for customized block page
* Replace <R3000 IP> with real IP and recompile before using
* Revision: 1
* Date: 03/08/2004
*/
#include <stdio.h>
struct {
char *name;
char *val;
} entries[20];
char szIP[16];
char szURL[1024];
char szUserName[1024];
char szCategory[8];
/*function prototypes*/
void printhtml();
void unescape_url(char *url);
char x2c(char *what);
char *makeword(char *line, char stop);
void plustospace(char *str);
char *fmakeword(FILE *f, char stop, int *cl);
int to_upper(char *string);
void getquery(char *paramd, char **paramv);
void getnextquery(char **paramv);
int main(int argc, char **argv)
{
int data_size; /* size (in bytes) of POST input */
int index;
char *paramd, *paramn, *paramv;
char step[120];
printf("content-type: text/html\n\n");
/* If using the GET method */
if (strcmp((char *)getenv("REQUEST_METHOD"), "GET") == 0)
{
paramd = (char *)strdup((char *)getenv("QUERY_STRING"));
getquery(paramd, ¶mv);
while (paramv)
{
plustospace(paramv);
Summary of Contents for Enterprise Filter Authentication R3000
Page 1: ... R3000 Enterprise Filter USER GUIDE Model R3000 Release 2 1 00 Manual Version 1 02 ...
Page 2: ...ii 8E6 TECHNOLOGIES R3000 ENTERPRISE FILTER USER GUIDE ...
Page 4: ...iv 8E6 TECHNOLOGIES R3000 ENTERPRISE FILTER USER GUIDE ...
Page 578: ...APPENDICES SECTION APPENDIX H 554 8E6 TECHNOLOGIES R3000 ENTERPRISE FILTER USER GUIDE ...
Page 594: ...INDEX 570 8E6 TECHNOLOGIES R3000 ENTERPRISE FILTER USER GUIDE ...