detect: implement http_connection sticky buffer

pull/2673/head
Victor Julien 8 years ago
parent 5714129e32
commit 1d1176b0d5

@ -165,6 +165,7 @@ detect-gid.c detect-gid.h \
detect-hostbits.c detect-hostbits.h \
detect-http-accept.c detect-http-accept.h \
detect-http-client-body.c detect-http-client-body.h \
detect-http-connection.c detect-http-connection.h \
detect-http-cookie.c detect-http-cookie.h \
detect-http-header.c detect-http-header.h \
detect-http-headers.c detect-http-headers.h detect-http-headers-stub.h \

@ -0,0 +1,46 @@
/* Copyright (C) 2007-2017 Open Information Security Foundation
*
* You can copy, redistribute or modify this Program under the terms of
* the GNU General Public License version 2 as published by the Free
* Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/
/**
* \ingroup httplayer
*
* @{
*/
/**
* \file
*
* \author Victor Julien <victor@inliniac.net>
*
* Implements the http_connection sticky buffer
*/
#define KEYWORD_NAME "http_connection"
#define KEYWORD_DOC "http-keywords#http-connection"
#define BUFFER_NAME "http_connection"
#define BUFFER_DESC "http connection header"
#define HEADER_NAME "Connection"
#define KEYWORD_ID DETECT_AL_HTTP_HEADER_CONNECTION
#define KEYWORD_TOSERVER 1
#include "detect-http-headers-stub.h"
void RegisterHttpHeadersConnection(void)
{
DetectHttpHeadersRegisterStub();
}

@ -0,0 +1,23 @@
/* Copyright (C) 2007-2017 Open Information Security Foundation
*
* You can copy, redistribute or modify this Program under the terms of
* the GNU General Public License version 2 as published by the Free
* Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/
#ifndef __DETECT_HTTP_CONNECTION_H__
#define __DETECT_HTTP_CONNECTION_H__
void RegisterHttpHeadersConnection(void);
#endif /* __DETECT_HTTP_CONNECTION_H__ */

@ -16,10 +16,12 @@
*/
#include "detect-http-accept.h"
#include "detect-http-connection.h"
#include "detect-http-referer.h"
void DetectHttpHeadersRegister(void)
{
RegisterHttpHeadersAccept();
RegisterHttpHeadersReferer();
RegisterHttpHeadersConnection();
}

@ -1242,6 +1242,7 @@ enum {
DETECT_AL_HTTP_HEADER,
DETECT_AL_HTTP_HEADER_NAMES,
DETECT_AL_HTTP_HEADER_ACCEPT,
DETECT_AL_HTTP_HEADER_CONNECTION,
DETECT_AL_HTTP_HEADER_REFERER,
DETECT_AL_HTTP_RAW_HEADER,
DETECT_AL_HTTP_URI,

Loading…
Cancel
Save