syslog-ng source
find-crlf.h File Reference
#include "syslog-ng.h"
Include dependency graph for find-crlf.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

gchar * find_cr_or_lf_or_nul (gchar *s, gsize n)
 

Function Documentation

◆ find_cr_or_lf_or_nul()

gchar* find_cr_or_lf_or_nul ( gchar *  s,
gsize  n 
)

This is an optimized version of finding either a CR or LF or NUL character in a buffer. It is used to find these line terminators in syslog traffic.

It uses an algorithm very similar to what there's in libc memchr/strchr.