Re: help with config file

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Thu, 9 Jun 2005 00:14:49 +0200 (CEST)

On Wed, 8 Jun 2005 srnoam@t2.technion.ac.il wrote:

> We are trying to add new variables in the config file, so we can use
> them later on in the code. could you direct us to the right way / place
> in the source code so squid will recognize the variables?

cf.data.pre contains all the configuration directives and their variables.
The syntax is pretty self-explanatory:

NAME: http_port ascii_port
TYPE: http_port_list
DEFAULT: none
LOC: Config.Sockaddr.http
DOC_START
         Usage: port [options]
                 hostname:port [options]
                 1.2.3.4:port [options]
[...]
         internal address:port in http_port. This way Squid will only be
         visible on the internal address.
NOCOMMENT_START
# Squid normally listens to port 3128
http_port 3128
NOCOMMENT_END
DOC_END

NAME tells the primary directive name optioally followed by compatibility
aliases.

TYPE tells how the directive is parsed. Maps to parser functions in
cache_cf.c.

DEFAULT (and DEFAULT_IF_NONE) defines the default value.

LOC tells the variable location where the value of the directive is to be
stored.

DOC_START/END identifies the documentation for this directive.

NOCOMMENT_START/END is for providing more explicit suggested default
configs..

and the variable needs to be defined somewhere suitable. Most is in the
large struct SquidConfig.

Regards
Henrik
Received on Wed Jun 08 2005 - 16:14:51 MDT

This archive was generated by hypermail pre-2.1.9 : Thu Jun 30 2005 - 12:00:05 MDT