haproxy/include/haproxy
Willy Tarreau c8d167bcfb MINOR: tools: add a new configurable line parse, parse_line()
This function takes on input a string to tokenize, an output storage
(which may be the same) and a number of options indicating how to handle
certain characters (single & double quote support, backslash support,
end of line on '#', environment variables etc). On output it will provide
a list of pointers to individual words after having possibly unescaped
some character sequences, handled quotes and resolved environment
variables, and it will also indicate a status made of:
  - a list of failures (overlap between src/dst, wrong quote etc)
  - the pointer to the first sequence in error
  - the required output length (a-la snprintf()).

This allows a caller to freely unescape/unquote a string by using a
pre-allocated temporary buffer and expand it as necessary. It takes
extreme care at avoiding expensive operations and intentionally does
not use memmove() when removing escapes, hence the reason for the
different input and output buffers. The goal is to use it as the basis
for the config parser.
2020-06-16 16:27:26 +02:00
..
acl-t.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
acl.h CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
action-t.h CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
action.h REORG: include: move action.h to haproxy/action{,-t}.h 2020-06-11 10:18:57 +02:00
activity-t.h REORG: include: move activity to haproxy/ 2020-06-11 10:18:57 +02:00
activity.h CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
api-t.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
api.h CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
applet-t.h CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
applet.h CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
arg-t.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
arg.h REORG: include: move arg.h to haproxy/arg{,-t}.h 2020-06-11 10:18:57 +02:00
atomic.h BUILD: atomic: add string.h for memcpy() on ARM64 2020-06-14 08:08:13 +02:00
auth-t.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
auth.h CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
backend-t.h CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
backend.h CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
base64.h CLEANUP: include: don't include stddef.h directly 2020-06-11 10:18:59 +02:00
buf-t.h CLEANUP: include: don't include stddef.h directly 2020-06-11 10:18:59 +02:00
buf.h REORG: include: split buf.h into haproxy/buf-t.h and haproxy/buf.h 2020-06-11 10:18:56 +02:00
bug.h REORG: include: move the BUG_ON() code to haproxy/bug.h 2020-06-11 10:18:56 +02:00
capture-t.h REORG: include: move capture.h to haproxy/capture{,-t}.h 2020-06-11 10:18:57 +02:00
capture.h REORG: include: move capture.h to haproxy/capture{,-t}.h 2020-06-11 10:18:57 +02:00
cfgparse.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
channel-t.h CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
channel.h CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
check-t.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
check.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
chunk.h CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
cli-t.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
cli.h REORG: include: move stream.h to haproxy/stream{,-t}.h 2020-06-11 10:18:58 +02:00
compat.h REORG: include: move connection.h to haproxy/connection{,-t}.h 2020-06-11 10:18:58 +02:00
compiler.h REORG: include: move THREAD_LOCAL and __decl_thread() to compiler.h 2020-06-11 10:18:59 +02:00
compression-t.h REORG: include: move compression.h to haproxy/compression{,-t}.h 2020-06-11 10:18:57 +02:00
compression.h REORG: include: move compression.h to haproxy/compression{,-t}.h 2020-06-11 10:18:57 +02:00
connection-t.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
connection.h REORG: check: move tcpchecks away from check.c 2020-06-11 10:18:58 +02:00
counters-t.h REORG: include: move counters.h to haproxy/counters-t.h 2020-06-11 10:18:57 +02:00
debug.h CLEANUP: debug: drop unused function p_malloc() 2020-06-11 10:18:56 +02:00
defaults.h REORG: include: move MAX_THREADS to defaults.h 2020-06-11 10:18:59 +02:00
dgram-t.h REORG: dgram: rename proto_udp to dgram 2020-06-11 10:18:59 +02:00
dgram.h REORG: dgram: rename proto_udp to dgram 2020-06-11 10:18:59 +02:00
dict-t.h REORG: include: move THREAD_LOCAL and __decl_thread() to compiler.h 2020-06-11 10:18:59 +02:00
dict.h REORG: include: move dict.h to hparoxy/dict{,-t}.h 2020-06-11 10:18:57 +02:00
dns-t.h REORG: dgram: rename proto_udp to dgram 2020-06-11 10:18:59 +02:00
dns.h REORG: include: move dns.h to haproxy/dns{,-t}.h 2020-06-11 10:18:57 +02:00
dynbuf-t.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
dynbuf.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
errors.h REORG: include: move the error reporting functions to from log.h to errors.h 2020-06-11 10:18:59 +02:00
extcheck.h REORG: check: extract the external checks from check.{c,h} 2020-06-11 10:18:58 +02:00
fcgi-app-t.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
fcgi-app.h REORG: include: move stream.h to haproxy/stream{,-t}.h 2020-06-11 10:18:58 +02:00
fcgi.h REORG: include: move common/fcgi.h to haproxy/ 2020-06-11 10:18:57 +02:00
fd-t.h CLEANUP: compiler: add a THREAD_ALIGNED macro and use it where appropriate 2020-06-11 10:18:59 +02:00
fd.h REORG: include: move fd.h to haproxy/fd{,-t}.h 2020-06-11 10:18:57 +02:00
filters-t.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
filters.h REORG: include: move stream.h to haproxy/stream{,-t}.h 2020-06-11 10:18:58 +02:00
flt_http_comp.h REORG: include: move proxy.h to haproxy/proxy{,-t}.h 2020-06-11 10:18:58 +02:00
freq_ctr-t.h REORG: include: move freq_ctr to haproxy/ 2020-06-11 10:18:56 +02:00
freq_ctr.h CLEANUP: include: make atomic.h part of the base API 2020-06-11 10:18:59 +02:00
frontend.h REORG: include: move stream.h to haproxy/stream{,-t}.h 2020-06-11 10:18:58 +02:00
global-t.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
global.h BUILD: haproxy: mark deinit_and_exit() as noreturn 2020-06-15 18:43:46 +02:00
h1.h REORG: include: move common/h1.h to haproxy/h1.h 2020-06-11 10:18:57 +02:00
h1_htx.h REORG: include: move h1_htx.h to haproxy/h1_htx.h 2020-06-11 10:18:57 +02:00
h2.h REORG: include: move common/h2.h to haproxy/h2.h 2020-06-11 10:18:57 +02:00
hash.h REORG: include: move base64.h, errors.h and hash.h from common to to haproxy/ 2020-06-11 10:18:56 +02:00
hlua-t.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
hlua.h REORG: include: move hlua.h to haproxy/hlua{,-t}.h 2020-06-11 10:18:57 +02:00
hlua_fcn.h REORG: include: move hlua_fcn.h to haproxy/hlua_fcn.h 2020-06-11 10:18:57 +02:00
hpack-dec.h REORG: include: move hpack*.h to haproxy/ and split hpack-tbl 2020-06-11 10:18:57 +02:00
hpack-enc.h REORG: include: move hpack*.h to haproxy/ and split hpack-tbl 2020-06-11 10:18:57 +02:00
hpack-huff.h REORG: include: move hpack*.h to haproxy/ and split hpack-tbl 2020-06-11 10:18:57 +02:00
hpack-tbl-t.h REORG: include: move hpack*.h to haproxy/ and split hpack-tbl 2020-06-11 10:18:57 +02:00
hpack-tbl.h CLEANUP: hpack: export debug functions and move inlines to .h 2020-06-11 10:18:58 +02:00
http-hdr-t.h REORG: include: split common/http-hdr.h into haproxy/http-hdr{,-t}.h 2020-06-11 10:18:57 +02:00
http-hdr.h REORG: include: split common/http-hdr.h into haproxy/http-hdr{,-t}.h 2020-06-11 10:18:57 +02:00
http-t.h REORG: include: split common/http.h into haproxy/http{,-t}.h 2020-06-11 10:18:57 +02:00
http.h CLEANUP: include: don't include stddef.h directly 2020-06-11 10:18:59 +02:00
http_ana-t.h CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
http_ana.h REORG: include: move stream.h to haproxy/stream{,-t}.h 2020-06-11 10:18:58 +02:00
http_fetch.h CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
http_htx-t.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
http_htx.h REORG: include: move proxy.h to haproxy/proxy{,-t}.h 2020-06-11 10:18:58 +02:00
http_rules.h CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
htx-t.h REORG: include: split common/htx.h into haproxy/htx{,-t}.h 2020-06-11 10:18:57 +02:00
htx.h CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
initcall.h REORG: include: move the base files from common/ to haproxy/ 2020-06-11 10:18:56 +02:00
intops.h REORG: include: move integer manipulation functions from standard.h to intops.h 2020-06-11 10:18:56 +02:00
istbuf.h REORG: include: move istbuf.h to haproxy/ 2020-06-11 10:18:56 +02:00
lb_chash-t.h CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
lb_chash.h REORG: include: split global.h into haproxy/global{,-t}.h 2020-06-11 10:18:58 +02:00
lb_fas-t.h REORG: include: move lb_fas.h to haproxy/lb_fas{,-t}.h 2020-06-11 10:18:58 +02:00
lb_fas.h REORG: include: move server.h to haproxy/server{,-t}.h 2020-06-11 10:18:58 +02:00
lb_fwlc-t.h REORG: include: move lb_fwlc.h to haproxy/lb_fwlc{,-t}.h 2020-06-11 10:18:58 +02:00
lb_fwlc.h REORG: include: move server.h to haproxy/server{,-t}.h 2020-06-11 10:18:58 +02:00
lb_fwrr-t.h REORG: include: move lb_fwrr.h to haproxy/lb_fwrr{,-t}.h 2020-06-11 10:18:58 +02:00
lb_fwrr.h REORG: include: move server.h to haproxy/server{,-t}.h 2020-06-11 10:18:58 +02:00
lb_map-t.h CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
lb_map.h REORG: include: move server.h to haproxy/server{,-t}.h 2020-06-11 10:18:58 +02:00
list-t.h REORG: include: split mini-clist into haproxy/list and list-t.h 2020-06-11 10:18:56 +02:00
list.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
listener-t.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
listener.h REORG: include: move cli.h to haproxy/cli{,-t}.h 2020-06-11 10:18:58 +02:00
log-t.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
log.h REORG: include: move THREAD_LOCAL and __decl_thread() to compiler.h 2020-06-11 10:18:59 +02:00
mailers-t.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
mailers.h REORG: check: move the e-mail alerting code to mailers.c 2020-06-11 10:18:58 +02:00
map-t.h REORG: include: move sample.h to haproxy/sample{,-t}.h 2020-06-11 10:18:58 +02:00
map.h REORG: include: move sample.h to haproxy/sample{,-t}.h 2020-06-11 10:18:58 +02:00
mworker-t.h REORG: include: move signal.h to haproxy/signal{,-t}.h 2020-06-11 10:18:58 +02:00
mworker.h REORG: include: move signal.h to haproxy/signal{,-t}.h 2020-06-11 10:18:58 +02:00
namespace-t.h CLEANUP: include: don't include stddef.h directly 2020-06-11 10:18:59 +02:00
namespace.h CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
net_helper.h REORG: include: move common/net_helper.h to haproxy/net_helper.h 2020-06-11 10:18:57 +02:00
obj_type-t.h REORG: include: move obj_type.h to haproxy/obj_type{,-t}.h 2020-06-11 10:18:57 +02:00
obj_type.h CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
openssl-compat.h REORG: include: move openssl-compat.h from common/ to haproxy/ 2020-06-11 10:18:56 +02:00
pattern-t.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
pattern.h CLEANUP: include: move sample_data out of sample-t.h 2020-06-11 10:18:59 +02:00
payload.h REORG: include: move stream.h to haproxy/stream{,-t}.h 2020-06-11 10:18:58 +02:00
peers-t.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
peers.h REORG: include: move stream.h to haproxy/stream{,-t}.h 2020-06-11 10:18:58 +02:00
pipe-t.h REORG: include: move pipe.h to haproxy/pipe{,-t}.h 2020-06-11 10:18:57 +02:00
pipe.h REORG: include: move pipe.h to haproxy/pipe{,-t}.h 2020-06-11 10:18:57 +02:00
pool-os.h REORG: memory: move the OS-level allocator to haproxy/pool-os.h 2020-06-11 10:18:56 +02:00
pool-t.h MEDIUM: memory: make local pools independent on lockless pools 2020-06-11 10:18:57 +02:00
pool.h REORG: include: move common/memory.h to haproxy/pool.h 2020-06-11 10:18:57 +02:00
port_range-t.h REORG: include: move port_range.h to haproxy/port_range{,-t}.h 2020-06-11 10:18:57 +02:00
port_range.h CLEANUP: include: make atomic.h part of the base API 2020-06-11 10:18:59 +02:00
proto_sockpair.h REORG: include: move proto/proto_sockpair.h to haproxy/proto_sockpair.h 2020-06-11 10:18:57 +02:00
proto_tcp.h CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
protobuf-t.h REORG: include: move protocol_buffers.h to haproxy/protobuf{,-t}.h 2020-06-11 10:18:58 +02:00
protobuf.h REORG: include: move protocol_buffers.h to haproxy/protobuf{,-t}.h 2020-06-11 10:18:58 +02:00
protocol-t.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
protocol.h REORG: include: move protocol.h to haproxy/protocol{,-t}.h 2020-06-11 10:18:57 +02:00
proxy-t.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
proxy.h CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
queue-t.h REORG: include: move queue.h to haproxy/queue{,-t}.h 2020-06-11 10:18:58 +02:00
queue.h CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
regex-t.h REORG: include: move THREAD_LOCAL and __decl_thread() to compiler.h 2020-06-11 10:18:59 +02:00
regex.h REORG: include: move THREAD_LOCAL and __decl_thread() to compiler.h 2020-06-11 10:18:59 +02:00
ring-t.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
ring.h REORG: include: move ring to haproxy/ring{,-t}.h 2020-06-11 10:18:57 +02:00
sample-t.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
sample.h CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
sample_data-t.h CLEANUP: include: move sample_data out of sample-t.h 2020-06-11 10:18:59 +02:00
server-t.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
server.h CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
session-t.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
session.h REORG: include: move server.h to haproxy/server{,-t}.h 2020-06-11 10:18:58 +02:00
shctx-t.h REORG: include: move shctx to haproxy/shctx{,-t}.h 2020-06-11 10:18:57 +02:00
shctx.h REORG: include: move shctx to haproxy/shctx{,-t}.h 2020-06-11 10:18:57 +02:00
signal-t.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
signal.h REORG: include: move signal.h to haproxy/signal{,-t}.h 2020-06-11 10:18:58 +02:00
sink-t.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
sink.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
spoe-t.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
spoe.h REORG: include: move spoe.h to haproxy/spoe{,-t}.h 2020-06-11 10:18:58 +02:00
ssl_ckch-t.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
ssl_ckch.h REORG: include: move ssl_ckch.h to haproxy/ssl_ckch{,-t}.h 2020-06-11 10:18:58 +02:00
ssl_crtlist-t.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
ssl_crtlist.h REORG: move ssl_crtlist.h to haproxy/ssl_crtlist{,-t}.h 2020-06-11 10:18:58 +02:00
ssl_sock-t.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
ssl_sock.h CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
ssl_utils.h REORG: include: move ssl_utils.h to haproxy/ssl_utils.h 2020-06-11 10:18:57 +02:00
stats-t.h REORG: include: move stats.h to haproxy/stats{,-t}.h 2020-06-11 10:18:58 +02:00
stats.h CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
stick_table-t.h CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
stick_table.h CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
stream-t.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
stream.h REORG: include: move stream.h to haproxy/stream{,-t}.h 2020-06-11 10:18:58 +02:00
stream_interface-t.h REORG: include: move stream_interface.h to haproxy/stream_interface{,-t}.h 2020-06-11 10:18:58 +02:00
stream_interface.h CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
task-t.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
task.h REORG: include: move task.h to haproxy/task{,-t}.h 2020-06-11 10:18:58 +02:00
tcp_rules.h REORG: include: move stream.h to haproxy/stream{,-t}.h 2020-06-11 10:18:58 +02:00
tcpcheck-t.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
tcpcheck.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
thread-t.h REORG: include: move THREAD_LOCAL and __decl_thread() to compiler.h 2020-06-11 10:18:59 +02:00
thread.h BUILD: thread: add parenthesis around values of locking macros 2020-06-12 11:46:44 +02:00
ticks.h REORG: include: move common/ticks.h to haproxy/ticks.h 2020-06-11 10:18:57 +02:00
time.h REORG: include: move time.h from common/ to haproxy/ 2020-06-11 10:18:56 +02:00
tools-t.h REORG: tools: split common/standard.h into haproxy/tools{,-t}.h 2020-06-11 10:18:57 +02:00
tools.h MINOR: tools: add a new configurable line parse, parse_line() 2020-06-16 16:27:26 +02:00
trace-t.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
trace.h REORG: include: move THREAD_LOCAL and __decl_thread() to compiler.h 2020-06-11 10:18:59 +02:00
uri_auth-t.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
uri_auth.h REORG: include: split common/uri_auth.h into haproxy/uri_auth{,-t}.h 2020-06-11 10:18:58 +02:00
vars-t.h REORG: include: make list-t.h part of the base API 2020-06-11 10:18:59 +02:00
vars.h CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
version.h REORG: include: move version.h to haproxy/ 2020-06-11 10:18:56 +02:00
xref-t.h REORG: include: split common/xref.h into haproxy/xref{,-t}.h 2020-06-11 10:18:57 +02:00
xref.h CLEANUP: include: make atomic.h part of the base API 2020-06-11 10:18:59 +02:00