Skip to content

Commit

Permalink
detect/sip: register headers sticky buffers
Browse files Browse the repository at this point in the history
  • Loading branch information
glongo committed Apr 14, 2024
1 parent 08b5f57 commit df89215
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ noinst_HEADERS = \
detect-sid.h \
detect-sip-content-length.h \
detect-sip-content-type.h \
detect-sip-headers.h \
detect-sip-headers-stub.h \
detect-sip-from.h \
detect-sip-method.h \
Expand Down Expand Up @@ -922,6 +923,7 @@ libsuricata_c_a_SOURCES = \
detect-sid.c \
detect-sip-content-length.c \
detect-sip-content-type.c \
detect-sip-headers.c \
detect-sip-from.c \
detect-sip-method.c \
detect-sip-protocol.c \
Expand Down
2 changes: 2 additions & 0 deletions src/detect-engine-register.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@
#include "detect-sip-stat-msg.h"
#include "detect-sip-request-line.h"
#include "detect-sip-response-line.h"
#include "detect-sip-headers.h"
#include "detect-rfb-secresult.h"
#include "detect-rfb-sectype.h"
#include "detect-rfb-name.h"
Expand Down Expand Up @@ -673,6 +674,7 @@ void SigTableSetup(void)
DetectSipStatMsgRegister();
DetectSipRequestLineRegister();
DetectSipResponseLineRegister();
DetectSipHeadersRegister();
DetectRfbSecresultRegister();
DetectRfbSectypeRegister();
DetectRfbNameRegister();
Expand Down
38 changes: 38 additions & 0 deletions src/detect-sip-headers.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/* Copyright (C) 2024 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.
*/

/**
* \author Giuseppe Longo <giuseppe@glongo.it>
*/

#include "detect-sip-headers.h"
#include "detect-sip-from.h"
#include "detect-sip-to.h"
#include "detect-sip-via.h"
#include "detect-sip-ua.h"
#include "detect-sip-content-type.h"
#include "detect-sip-content-length.h"

void DetectSipHeadersRegister(void)
{
RegisterSipHeadersFrom();
RegisterSipHeadersTo();
RegisterSipHeadersVia();
RegisterSipHeadersUa();
RegisterSipHeadersContentType();
RegisterSipHeadersContentLength();
}
23 changes: 23 additions & 0 deletions src/detect-sip-headers.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/* Copyright (C) 2023 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_SIP_HEADERS_H__
#define __DETECT_SIP_HEADERS_H__

void DetectSipHeadersRegister(void);

#endif /* __DETECT_SIP_HEADERS_H__ */

0 comments on commit df89215

Please sign in to comment.