Syntax of string in dhcpd.conf

John Wobus jw354 at cornell.edu
Wed Feb 16 22:09:47 UTC 2011


Hi,

Below is the most elaborate description I could find about the syntax  
of quoted
strings as parsed in dhcpd.config by dhcpd.  Short of the code, can  
anyone point
me at a more complete description?

My actual interest is in strings as used for specifying option values.
This is for a web app that allows administrators choose their own  
options, e.g
filenames.  If practical, I'd like to validate the string before  
trying out the
config.  For example:

option bootfile-name "boot\\x86\\wdsnbp.com";

John Wobus
Cornell CIT



Description of string from dhcp-eval man page:

        A string, enclosed in quotes, may be specified as  a  data
        expression,  and  returns  the  text  between  the quotes,
        encoded in  ASCII.    The  backslash  ('\')  character  is
        treated  specially,  as  in C programming: '\t' means TAB,
        '\r' means carriage return, '\n' means newline,  and  '\b'
        means  bell.    Any  octal  value  can  be  specified with
        '\nnn', where nnn is any positive octal number  less  than
        0400.  Any hexadecimal value can be specified with '\xnn',
        where nn is any positive hexadecimal number less  than  or
        equal to 0xff.




More information about the dhcp-users mailing list