From 449205cfeb5301cc25553ef83a0f329a53d525ed Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Fri, 26 Mar 2010 13:09:43 +0100 Subject: [PATCH] Remove wrong copyright info, cleanup headers. --- src/app-layer-dcerpc-common.h | 28 ++++++------------- src/app-layer-dcerpc.c | 22 ++++----------- src/app-layer-dcerpc.h | 30 +++++++-------------- src/app-layer-nbss.h | 51 +++++++++++++++-------------------- src/app-layer-smb.c | 22 ++++----------- src/app-layer-smb.h | 31 +++++++-------------- src/app-layer-smb2.c | 22 ++++----------- src/app-layer-smb2.h | 30 +++++++-------------- 8 files changed, 72 insertions(+), 164 deletions(-) diff --git a/src/app-layer-dcerpc-common.h b/src/app-layer-dcerpc-common.h index 299d2c8574..cc077771fa 100644 --- a/src/app-layer-dcerpc-common.h +++ b/src/app-layer-dcerpc-common.h @@ -1,26 +1,14 @@ -/* - * Copyright (c) 2009,2010 Open Information Security Foundation - * app-layer-dcerpc.h +/* Copyright (c) 2009,2010 Open Information Security Foundation */ + +/** + * \file * * \author Kirby Kuehl - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * 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 - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef APPLAYERDCERPCCOMMON_H_ -#define APPLAYERDCERPCCOMMON_H_ +#ifndef __APP_LAYER_DCERPC_COMMON_H__ +#define __APP_LAYER_DCERPC_COMMON_H__ + #include "app-layer-protos.h" #include "app-layer-parser.h" #include "flow.h" @@ -187,5 +175,5 @@ int32_t DCERPCParser(DCERPC *dcerpc, uint8_t *input, uint32_t input_len); void hexdump(const void *buf, size_t len); void printUUID(char *type, struct uuid_entry *uuid); -#endif /* APPLAYERDCERPCCOMMON_H_ */ +#endif /* __APP_LAYER_DCERPC_COMMON_H__ */ diff --git a/src/app-layer-dcerpc.c b/src/app-layer-dcerpc.c index 7f2dffb15f..8d79f9e1f2 100644 --- a/src/app-layer-dcerpc.c +++ b/src/app-layer-dcerpc.c @@ -1,23 +1,11 @@ -/* - * Copyright (c) 2009, 2010 Open Information Security Foundation - * app-layer-dcerpc.c +/* Copyright (c) 2009,2010 Open Information Security Foundation */ + +/** + * \file * * \author Kirby Kuehl - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * 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 - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + #include "suricata-common.h" #include "suricata.h" diff --git a/src/app-layer-dcerpc.h b/src/app-layer-dcerpc.h index 21cdfdcc43..239f2f667e 100644 --- a/src/app-layer-dcerpc.h +++ b/src/app-layer-dcerpc.h @@ -1,26 +1,14 @@ -/* - * Copyright (c) 2009,2010 Open Information Security Foundation - * app-layer-dcerpc.h +/* Copyright (c) 2009,2010 Open Information Security Foundation */ + +/** + * \file * * \author Kirby Kuehl - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * 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 - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef APPLAYERDCERPC_H_ -#define APPLAYERDCERPC_H_ +#ifndef __APP_LAYER_DCERPC_H__ +#define __APP_LAYER_DCERPC_H__ + #include "app-layer-protos.h" #include "app-layer-parser.h" #include "app-layer-dcerpc-common.h" @@ -30,11 +18,11 @@ typedef struct DCERPCState_ { DCERPC dcerpc; -}DCERPCState; +} DCERPCState; void RegisterDCERPCParsers(void); void DCERPCParserTests(void); void DCERPCParserRegisterTests(void); -#endif /* APPLAYERDCERPC_H_ */ +#endif /* __APP_LAYER_DCERPC_H__ */ diff --git a/src/app-layer-nbss.h b/src/app-layer-nbss.h index db1320a204..e6f173aa53 100644 --- a/src/app-layer-nbss.h +++ b/src/app-layer-nbss.h @@ -1,31 +1,20 @@ -/* - * Copyright (c) 2009 Open Information Security Foundation - * app-layer-nbss.h +/* Copyright (c) 2009 Open Information Security Foundation */ + +/** + * \file * * \author Kirby Kuehl - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * 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 - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef APPLAYERNBSS_H_ -#define APPLAYERNBSS_H_ +#ifndef __APP_LAYER_NBSS_H__ +#define __APP_LAYER_NBSS_H__ + +#include "suricata-common.h" #include "app-layer-protos.h" #include "app-layer-parser.h" #include "flow.h" #include "stream.h" -#include + /* http://ubiqx.org/cifs/rfc-draft/rfc1002.html#s4.3 All session packets are of the following general structure: @@ -43,18 +32,20 @@ The TYPE, FLAGS, and LENGTH fields are present in every session packet. */ -#define NBSS_SESSION_MESSAGE 0x00 -#define NBSS_SESSION_REQUEST 0x81 -#define NBSS_POSITIVE_SESSION_RESPONSE 0x82 -#define NBSS_NEGATIVE_SESSION_RESPONSE 0x83 -#define NBSS_RETARGET_SESSION_RESPONSE 0x84 -#define NBSS_SESSION_KEEP_ALIVE 0x85 - -typedef struct nbss_hdr_ { + +#define NBSS_SESSION_MESSAGE 0x00 +#define NBSS_SESSION_REQUEST 0x81 +#define NBSS_POSITIVE_SESSION_RESPONSE 0x82 +#define NBSS_NEGATIVE_SESSION_RESPONSE 0x83 +#define NBSS_RETARGET_SESSION_RESPONSE 0x84 +#define NBSS_SESSION_KEEP_ALIVE 0x85 + +typedef struct NBSSHdr_ { uint8_t type; uint8_t flags; uint32_t length; -}NBSSHdr; +} NBSSHdr; + #define NBSS_HDR_LEN 4 -#endif /* APPLAYERNBSS_H_ */ +#endif /* __APP_LAYER_NBSS_H__ */ diff --git a/src/app-layer-smb.c b/src/app-layer-smb.c index 6ceccea0e7..949de9df9f 100644 --- a/src/app-layer-smb.c +++ b/src/app-layer-smb.c @@ -1,23 +1,11 @@ -/* - * Copyright (c) 2009, 2010 Open Information Security Foundation - * app-layer-smb.c +/* Copyright (c) 2009,2010 Open Information Security Foundation */ + +/** + * \file * * \author Kirby Kuehl - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * 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 - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + #include "suricata-common.h" #include "debug.h" diff --git a/src/app-layer-smb.h b/src/app-layer-smb.h index cdba107151..33507a05fb 100644 --- a/src/app-layer-smb.h +++ b/src/app-layer-smb.h @@ -1,31 +1,19 @@ -/* - * Copyright (c) 2009,2010 Open Information Security Foundation - * app-layer-smb.h +/* Copyright (c) 2009,2010 Open Information Security Foundation */ + +/** + * \file * * \author Kirby Kuehl - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * 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 - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef APPLAYERSMB_H_ -#define APPLAYERSMB_H_ +#ifndef __APP_LAYER_SMB_H__ +#define __APP_LAYER_SMB_H__ + +#include "suricata-common.h" #include "app-layer-protos.h" #include "app-layer-parser.h" #include "flow.h" #include "stream.h" -#include #include "app-layer-nbss.h" #include "app-layer-dcerpc-common.h" @@ -43,6 +31,7 @@ typedef struct smb_hdr_ { uint16_t uid; uint16_t mid; }SMBHdr; + #define SMB_HDR_LEN 32 #define MINIMUM_SMB_LEN 35 #define NBSS_SMB_HDRS_LEN 36 @@ -155,5 +144,5 @@ void RegisterSMBParsers(void); void SMBParserRegisterTests(void); int isAndX(SMBState *smb_state); +#endif /* __APP_LAYER_SMB_H__ */ -#endif /* APPLAYERSMB_H_ */ diff --git a/src/app-layer-smb2.c b/src/app-layer-smb2.c index 961c58dac1..1bc44c9b07 100644 --- a/src/app-layer-smb2.c +++ b/src/app-layer-smb2.c @@ -1,23 +1,11 @@ -/* - * Copyright (c) 2009,2010 Open Information Security Foundation - * app-layer-smb.c +/* Copyright (c) 2009,2010 Open Information Security Foundation */ + +/** + * \file * * \author Kirby Kuehl - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * 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 - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + #include "suricata-common.h" #include "debug.h" diff --git a/src/app-layer-smb2.h b/src/app-layer-smb2.h index 53a5360eea..0223837ec7 100644 --- a/src/app-layer-smb2.h +++ b/src/app-layer-smb2.h @@ -1,32 +1,20 @@ -/* - * Copyright (c) 2009,2010 Open Information Security Foundation - * app-layer-smb2.h +/* Copyright (c) 2009,2010 Open Information Security Foundation */ + +/** + * \file * * \author Kirby Kuehl - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * 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 - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef APPLAYERSMB2_H_ -#define APPLAYERSMB2_H_ +#ifndef __APP_LAYER_SMB2_H__ +#define __APP_LAYER_SMB2_H__ + +#include "suricata-common.h" #include "app-layer-protos.h" #include "app-layer-parser.h" #include "app-layer-nbss.h" #include "flow.h" #include "stream.h" -#include typedef struct smb2_hdr { uint32_t Protocol; // Contains 0xFE,'SMB' @@ -76,5 +64,5 @@ typedef struct SMB2State_ { void RegisterSMB2Parsers(void); void SMB2ParserRegisterTests(void); +#endif /* __APP_LAYER_SMB2_H__ */ -#endif /* APPLAYERSMB2_H_ */