volta.h
changeset 18 d4ce82194b64
parent 17 bd746609ba46
child 22 822094314703
equal deleted inserted replaced
17:bd746609ba46 18:d4ce82194b64
   115  * members are just left NULL.
   115  * members are just left NULL.
   116  *
   116  *
   117  */
   117  */
   118 typedef struct parsed {
   118 typedef struct parsed {
   119 	unsigned short int type;
   119 	unsigned short int type;
   120 	unsigned short int wl;
   120 	unsigned short int negate;
   121 	char   *path_re;
   121 	char   *path_re;
   122 	char   *redir;
   122 	char   *redir;
   123 	char   *scheme;
   123 	char   *scheme;
   124 	char   *host;
   124 	char   *host;
   125 	char   *tld;
   125 	char   *tld;
   160 void shutdown_handler( int );
   160 void shutdown_handler( int );
   161 void shutdown_actions( void );
   161 void shutdown_actions( void );
   162 
   162 
   163 void usage( char * );
   163 void usage( char * );
   164 void debug( int, char *, int, const char *, ... );
   164 void debug( int, char *, int, const char *, ... );
   165 void out( const char * );
       
   166 void reverse_str( char * );
   165 void reverse_str( char * );
   167 void lowercase_str( char *, unsigned short int );
   166 void lowercase_str( char *, unsigned short int );
   168 void report_speed( void );
   167 void report_speed( void );
   169 char *slurp_file( char * );
       
   170 char *extend_line( char *, const char * );
   168 char *extend_line( char *, const char * );
   171 char *copy_string_token( char *, unsigned short int );
   169 char *copy_string_token( char *, unsigned short int );
   172 /* struct in_addr *copy_ipv4_token( char *, unsigned short int ); */
   170 /* struct in_addr *copy_ipv4_token( char *, unsigned short int ); */
   173 
   171 
   174 int  accept_loop( void );
   172 int  accept_loop( void );
   179 void populate_parsed( parsed * );
   177 void populate_parsed( parsed * );
   180 void parse_tld( parsed * );
   178 void parse_tld( parsed * );
   181 void finish_parsed( parsed * );
   179 void finish_parsed( parsed * );
   182 void reset_results( parsed **, unsigned int );
   180 void reset_results( parsed **, unsigned int );
   183 unsigned short int check_rule( parsed *, parsed * );
   181 unsigned short int check_rule( parsed *, parsed * );
       
   182 void pass( parsed *, parsed * );
   184 void rewrite( parsed *, parsed * );
   183 void rewrite( parsed *, parsed * );
   185 
   184 
   186 #endif
   185 #endif
   187 
   186