"Fossies" - the Fresh Open Source Software Archive

Member "delegate9.9.13/src/icap.c" (13 Jun 2010, 1514 Bytes) of package /linux/misc/old/delegate9.9.13.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "icap.c" see the Fossies "Dox" file reference documentation.

    1 /*////////////////////////////////////////////////////////////////////////
    2 Copyright (c) 2005 National Institute of Advanced Industrial Science and Technology (AIST)
    3 
    4 Permission to use this material for evaluation, copy this material for
    5 your own use, and distribute the copies via publically accessible on-line
    6 media, without fee, is hereby granted provided that the above copyright
    7 notice and this permission notice appear in all copies.
    8 AIST MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY OF THIS
    9 MATERIAL FOR ANY PURPOSE.  IT IS PROVIDED "AS IS", WITHOUT ANY EXPRESS
   10 OR IMPLIED WARRANTIES.
   11 //////////////////////////////////////////////////////////////////////////
   12 Content-Type:   program/C; charset=US-ASCII
   13 Program:    icap.c (Internet Content Adaptation Protocol, RFC3507)
   14 Author:     Yutaka Sato <ysato@delegate.org>
   15 Description:
   16 
   17 History:
   18     050524  created
   19 //////////////////////////////////////////////////////////////////////#*/
   20 #include "delegate.h"
   21 
   22 int service_icap(Connection *Conn)
   23 {   FILE *fc,*tc;
   24     const char *dp;
   25     CStr(req,1024);
   26     CStr(method,16);
   27     CStr(uri,1024);
   28     CStr(ver,16);
   29 
   30     fc = fdopen(FromC,"r");
   31     tc = fdopen(ToC,"w");
   32 
   33     if( fgetsTIMEOUT(AVStr(req),sizeof(req),fc) != NULL ){
   34         dp = wordScan(req,method);
   35         dp = wordScan(dp,uri);
   36         wordScan(dp,ver);
   37         sv1log("ICAP REQUEST [%s][%s][%s]\n",method,uri,ver);
   38         if( streq(method,"REQMOD") ){
   39         }else
   40         if( streq(method,"RESPMOD") ){
   41         }else
   42         if( streq(method,"OPTIONS") ){
   43         }else{
   44         }
   45     }
   46 
   47     fcloseFILE(tc);
   48     fcloseFILE(fc);
   49     return 0;
   50 }