geomyidae

A small C-based gopherd. (gopher://bitreich.org/1/scm/geomyidae)
git clone git://r-36.net/geomyidae
Log | Files | Refs | README | LICENSE

handlr.h (1524B)


      1 /*
      2  * Copy me if you can.
      3  * by 20h
      4  */
      5 
      6 #ifndef HANDLR_H
      7 #define HANDLR_H
      8 
      9 /*
     10  * Handler API definition
     11  *
     12  * path .... absolute path to the script
     13  * port .... port which the script should use when defining menu items
     14  *	     (See -o and -p in geomyidae(8))
     15  * base .... base path of geomyidae ("" in case of chroot)
     16  * args .... query string parsed after »script?query«
     17  * sear .... search part of request (»selector\tsearch\r\n«)
     18  * ohost ... host of geomiydae (See -h in geomyidae(8))
     19  * chost ... IP of the client sending a request
     20  * bhost ... server IP the server received the connection to
     21  * istls ... set to 1, if TLS was used for thr request
     22  */
     23 
     24 void handledir(int sock, char *path, char *port, char *base, char *args,
     25 			char *sear, char *ohost, char *chost, char *bhost,
     26 			int istls);
     27 void handlegph(int sock, char *file, char *port, char *base, char *args,
     28 			char *sear, char *ohost, char *chost, char *bhost,
     29 			int istls);
     30 void handlebin(int sock, char *file, char *port, char *base, char *args,
     31 			char *sear, char *ohost, char *chost, char *bhost,
     32 			int istls);
     33 void handletxt(int sock, char *file, char *port, char *base, char *args,
     34 			char *sear, char *ohost, char *chost, char *bhost,
     35 			int istls);
     36 void handlecgi(int sock, char *file, char *port, char *base, char *args,
     37 			char *sear, char *ohost, char *chost, char *bhost,
     38 			int istls);
     39 void handledcgi(int sock, char *file, char *port, char *base, char *args,
     40 			char *sear, char *ohost, char *chost, char *bhost,
     41 			int istls);
     42 
     43 #endif