suricata
app-layer-protos.h
Go to the documentation of this file.
1 /* Copyright (C) 2007-2013 Open Information Security Foundation
2  *
3  * You can copy, redistribute or modify this Program under the terms of
4  * the GNU General Public License version 2 as published by the Free
5  * Software Foundation.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * version 2 along with this program; if not, write to the Free Software
14  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15  * 02110-1301, USA.
16  */
17 
18 /**
19  * \file
20  *
21  * \author Victor Julien <victor@inliniac.net>
22  * \author Anoop Saldanha <anoopsaldanha@gmail.com>
23  */
24 
25 #ifndef __APP_LAYER_PROTOS_H__
26 #define __APP_LAYER_PROTOS_H__
27 
33  ALPROTO_TLS, /* SSLv2, SSLv3 & TLSv1 */
42 
56 
57  /* used by the probing parser when alproto detection fails
58  * permanently for that particular stream */
60 #ifdef UNITTESTS
62 #endif /* UNITESTS */
63  /* keep last */
65 };
66 // NOTE: if ALPROTO's get >= 256, update SignatureNonPrefilterStore
67 
68 /* not using the enum as that is a unsigned int, so 4 bytes */
69 typedef uint16_t AppProto;
70 
71 /**
72  * \brief Maps the ALPROTO_*, to its string equivalent.
73  *
74  * \param alproto App layer protocol id.
75  *
76  * \retval String equivalent for the alproto.
77  */
78 const char *AppProtoToString(AppProto alproto);
79 
80 /**
81  * \brief Maps a string to its ALPROTO_* equivalent.
82  *
83  * \param String equivalent for the alproto.
84  *
85  * \retval alproto App layer protocol id, or ALPROTO_UNKNOWN.
86  */
87 AppProto StringToAppProto(const char *proto_name);
88 
89 #endif /* __APP_LAYER_PROTOS_H__ */
const char * AppProtoToString(AppProto alproto)
Maps the ALPROTO_*, to its string equivalent.
AppProtoEnum
uint16_t AppProto
AppProto StringToAppProto(const char *proto_name)
Maps a string to its ALPROTO_* equivalent.