-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src: make include guards more library friendly
Include guards for libraries should use a prefix that is meaningful for the library to avoid conflicts with other user code. For Suricata, use SURICATA. Additionally, remove the pattern of leading and trailing underscores as these are reserved for the language implementation per the C and C++ standards.
- Loading branch information
1 parent
632ca75
commit 44388f1
Showing
579 changed files
with
1,705 additions
and
1,856 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,8 +21,8 @@ | |
* \author Victor Julien <[email protected]> | ||
*/ | ||
|
||
#ifndef __ACTION_GLOBALS_H__ | ||
#define __ACTION_GLOBALS_H__ | ||
#ifndef SURICATA_ACTION_GLOBALS_H | ||
#define SURICATA_ACTION_GLOBALS_H | ||
|
||
/* Changing them as flags, so later we can have alerts | ||
* and drop simultaneously */ | ||
|
@@ -38,4 +38,4 @@ | |
|
||
#define ACTION_DROP_REJECT (ACTION_REJECT_ANY | ACTION_DROP) | ||
|
||
#endif /* __ACTION_GLOBALS_H__ */ | ||
#endif /* SURICATA_ACTION_GLOBALS_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,10 +21,9 @@ | |
* \author Victor Julien <[email protected]> | ||
*/ | ||
|
||
#ifndef __ALERT_DEBUGLOG_H__ | ||
#define __ALERT_DEBUGLOG_H__ | ||
#ifndef SURICATA_ALERT_DEBUGLOG_H | ||
#define SURICATA_ALERT_DEBUGLOG_H | ||
|
||
void AlertDebugLogRegister(void); | ||
|
||
#endif /* __ALERT_DEBUGLOG_H__ */ | ||
|
||
#endif /* SURICATA_ALERT_DEBUGLOG_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,11 +21,10 @@ | |
* \author Victor Julien <[email protected]> | ||
*/ | ||
|
||
#ifndef __ALERT_FASTLOG_H__ | ||
#define __ALERT_FASTLOG_H__ | ||
#ifndef SURICATA_ALERT_FASTLOG_H | ||
#define SURICATA_ALERT_FASTLOG_H | ||
|
||
void AlertFastLogRegister(void); | ||
OutputInitResult AlertFastLogInitCtx(ConfNode *); | ||
|
||
#endif /* __ALERT_FASTLOG_H__ */ | ||
|
||
#endif /* SURICATA_ALERT_FASTLOG_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,8 +22,8 @@ | |
* \author Anoop Saldanha <[email protected]> | ||
*/ | ||
|
||
#ifndef __APP_LAYER_DETECT_PROTO__H__ | ||
#define __APP_LAYER_DETECT_PROTO__H__ | ||
#ifndef SURICATA_APP_LAYER_DETECT_PROTO__H | ||
#define SURICATA_APP_LAYER_DETECT_PROTO__H | ||
|
||
#include "flow.h" | ||
#include "app-layer-protos.h" | ||
|
@@ -228,4 +228,4 @@ void AppLayerProtoDetectUnittestsRegister(void); | |
|
||
#endif /* UNITTESTS */ | ||
|
||
#endif /* __APP_LAYER_DETECT_PROTO__H__ */ | ||
#endif /* SURICATA_APP_LAYER_DETECT_PROTO__H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,8 +21,8 @@ | |
* \author Kevin Wong <[email protected]> | ||
*/ | ||
|
||
#ifndef __APP_LAYER_ENIP_COMMON_H__ | ||
#define __APP_LAYER_ENIP_COMMON_H__ | ||
#ifndef SURICATA_APP_LAYER_ENIP_COMMON_H | ||
#define SURICATA_APP_LAYER_ENIP_COMMON_H | ||
|
||
#include "rust.h" | ||
|
||
|
@@ -242,4 +242,4 @@ int DecodeCIPRequestMSPPDU(const uint8_t *input, uint32_t input_len, | |
int DecodeCIPResponseMSPPDU(const uint8_t *input, uint32_t input_len, | ||
ENIPTransaction *enip_data, uint16_t offset); | ||
|
||
#endif /* __APP_LAYER_ENIP_COMMON_H__ */ | ||
#endif /* SURICATA_APP_LAYER_ENIP_COMMON_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,12 +21,11 @@ | |
* \author Kevin Wong <[email protected]> | ||
*/ | ||
|
||
#ifndef __APP_LAYER_ENIP_H__ | ||
#define __APP_LAYER_ENIP_H__ | ||
|
||
#ifndef SURICATA_APP_LAYER_ENIP_H | ||
#define SURICATA_APP_LAYER_ENIP_H | ||
|
||
void RegisterENIPUDPParsers(void); | ||
void RegisterENIPTCPParsers(void); | ||
void ENIPParserRegisterTests(void); | ||
|
||
#endif /* __APP_LAYER_ENIP_H__ */ | ||
#endif /* SURICATA_APP_LAYER_ENIP_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,8 +22,8 @@ | |
* \author Anoop Saldanha <[email protected]> | ||
*/ | ||
|
||
#ifndef __APP_LAYER_EVENTS_H__ | ||
#define __APP_LAYER_EVENTS_H__ | ||
#ifndef SURICATA_APP_LAYER_EVENTS_H | ||
#define SURICATA_APP_LAYER_EVENTS_H | ||
|
||
/* contains fwd declaration of AppLayerDecoderEvents_ */ | ||
#include "decode.h" | ||
|
@@ -78,5 +78,4 @@ void AppLayerDecoderEventsResetEvents(AppLayerDecoderEvents *events); | |
void AppLayerDecoderEventsFreeEvents(AppLayerDecoderEvents **events); | ||
int DetectEngineGetEventInfo(const char *event_name, int *event_id, AppLayerEventType *event_type); | ||
|
||
#endif /* __APP_LAYER_EVENTS_H__ */ | ||
|
||
#endif /* SURICATA_APP_LAYER_EVENTS_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,8 +21,8 @@ | |
* \author Eric Leblond <[email protected]> | ||
*/ | ||
|
||
#ifndef __APP_LAYER_EXPECTATION__H__ | ||
#define __APP_LAYER_EXPECTATION__H__ | ||
#ifndef SURICATA_APP_LAYER_EXPECTATION__H | ||
#define SURICATA_APP_LAYER_EXPECTATION__H | ||
|
||
#include "flow-storage.h" | ||
|
||
|
@@ -36,4 +36,4 @@ void AppLayerExpectationClean(Flow *f); | |
|
||
uint64_t ExpectationGetCounter(void); | ||
|
||
#endif /* __APP_LAYER_EXPECTATION__H__ */ | ||
#endif /* SURICATA_APP_LAYER_EXPECTATION__H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,8 +21,8 @@ | |
* \author Victor Julien <[email protected]> | ||
*/ | ||
|
||
#ifndef __APP_LAYER_FRAMES_H__ | ||
#define __APP_LAYER_FRAMES_H__ | ||
#ifndef SURICATA_APP_LAYER_FRAMES_H | ||
#define SURICATA_APP_LAYER_FRAMES_H | ||
|
||
#include "rust.h" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,8 +22,8 @@ | |
* \author Jeff Lucovsky <[email protected]> | ||
*/ | ||
|
||
#ifndef __APP_LAYER_FTP_H__ | ||
#define __APP_LAYER_FTP_H__ | ||
#ifndef SURICATA_APP_LAYER_FTP_H | ||
#define SURICATA_APP_LAYER_FTP_H | ||
|
||
#include "rust.h" | ||
|
||
|
@@ -192,5 +192,4 @@ uint64_t FTPMemcapGlobalCounter(void); | |
uint16_t JsonGetNextLineFromBuffer(const char *buffer, const uint16_t len); | ||
bool EveFTPDataAddMetadata(void *vtx, JsonBuilder *jb); | ||
|
||
#endif /* __APP_LAYER_FTP_H__ */ | ||
|
||
#endif /* SURICATA_APP_LAYER_FTP_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,8 +22,8 @@ | |
* \author Duarte Silva <[email protected]> | ||
*/ | ||
|
||
#ifndef __APP_LAYER_HTP_XFF_H__ | ||
#define __APP_LAYER_HTP_XFF_H__ | ||
#ifndef SURICATA_APP_LAYER_HTP_XFF_H | ||
#define SURICATA_APP_LAYER_HTP_XFF_H | ||
|
||
/** XFF is disabled */ | ||
#define XFF_DISABLED 1 | ||
|
@@ -51,4 +51,4 @@ int HttpXFFGetIP(const Flow *f, HttpXFFCfg *xff_cfg, char *dstbuf, int dstbuflen | |
|
||
void HTPXFFParserRegisterTests(void); | ||
|
||
#endif /* __APP_LAYER_HTP_XFF_H__ */ | ||
#endif /* SURICATA_APP_LAYER_HTP_XFF_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,11 +21,11 @@ | |
* \author Philippe Antoine <[email protected]> | ||
*/ | ||
|
||
#ifndef __APP_LAYER_HTTP2_H__ | ||
#define __APP_LAYER_HTTP2_H__ | ||
#ifndef SURICATA_APP_LAYER_HTTP2_H | ||
#define SURICATA_APP_LAYER_HTTP2_H | ||
|
||
void RegisterHTTP2Parsers(void); | ||
|
||
void HTTP2MimicHttp1Request(void *, void *); | ||
|
||
#endif /* __APP_LAYER_HTTP2_H__ */ | ||
#endif /* SURICATA_APP_LAYER_HTTP2_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,8 +22,8 @@ | |
* \author Frank Honza <[email protected]> | ||
*/ | ||
|
||
#ifndef __APP_LAYER_IKE_H__ | ||
#define __APP_LAYER_IKE_H__ | ||
#ifndef SURICATA_APP_LAYER_IKE_H | ||
#define SURICATA_APP_LAYER_IKE_H | ||
|
||
void RegisterIKEParsers(void); | ||
void IKEParserRegisterTests(void); | ||
|
@@ -32,4 +32,4 @@ void IKEParserRegisterTests(void); | |
typedef struct IKEState_ IKEState; | ||
typedef struct IKETransaction_ IKETransaction; | ||
|
||
#endif /* __APP_LAYER_IKE_H__ */ | ||
#endif /* SURICATA_APP_LAYER_IKE_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,8 +21,8 @@ | |
* \author Pierre Chifflier <[email protected]> | ||
*/ | ||
|
||
#ifndef __APP_LAYER_KRB5_H__ | ||
#define __APP_LAYER_KRB5_H__ | ||
#ifndef SURICATA_APP_LAYER_KRB5_H | ||
#define SURICATA_APP_LAYER_KRB5_H | ||
|
||
void RegisterKRB5Parsers(void); | ||
void KRB5ParserRegisterTests(void); | ||
|
@@ -31,4 +31,4 @@ void KRB5ParserRegisterTests(void); | |
typedef struct KRB5State_ KRB5State; | ||
typedef struct KRB5Transaction_ KRB5Transaction; | ||
|
||
#endif /* __APP_LAYER_KRB5_H__ */ | ||
#endif /* SURICATA_APP_LAYER_KRB5_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,9 +31,9 @@ | |
* \author David DIALLO <[email protected]> | ||
*/ | ||
|
||
#ifndef __APP_LAYER_MODBUS_H__ | ||
#define __APP_LAYER_MODBUS_H__ | ||
#ifndef SURICATA_APP_LAYER_MODBUS_H | ||
#define SURICATA_APP_LAYER_MODBUS_H | ||
|
||
void RegisterModbusParsers(void); | ||
|
||
#endif /* __APP_LAYER_MODBUS_H__ */ | ||
#endif /* SURICATA_APP_LAYER_MODBUS_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,9 +21,9 @@ | |
* \author Victor Julien <[email protected]> | ||
*/ | ||
|
||
#ifndef __APP_LAYER_NFS_TCP_H__ | ||
#define __APP_LAYER_NFS_TCP_H__ | ||
#ifndef SURICATA_APP_LAYER_NFS_TCP_H | ||
#define SURICATA_APP_LAYER_NFS_TCP_H | ||
|
||
void RegisterNFSTCPParsers(void); | ||
|
||
#endif /* __APP_LAYER_NFS_TCP_H__ */ | ||
#endif /* SURICATA_APP_LAYER_NFS_TCP_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,10 +21,10 @@ | |
* \author Victor Julien <[email protected]> | ||
*/ | ||
|
||
#ifndef __APP_LAYER_NFS_UDP_H__ | ||
#define __APP_LAYER_NFS_UDP_H__ | ||
#ifndef SURICATA_APP_LAYER_NFS_UDP_H | ||
#define SURICATA_APP_LAYER_NFS_UDP_H | ||
|
||
void RegisterNFSUDPParsers(void); | ||
void NFSUDPParserRegisterTests(void); | ||
|
||
#endif /* __APP_LAYER_NFS_UDP_H__ */ | ||
#endif /* SURICATA_APP_LAYER_NFS_UDP_H */ |
Oops, something went wrong.