suricata
detect-rpc.h
Go to the documentation of this file.
1/* Copyright (C) 2007-2010 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 Pablo Rincon <pablo.rincon.crespo@gmail.com>
22 */
23
24#ifndef SURICATA_DETECT_RPC_H
25#define SURICATA_DETECT_RPC_H
26
27/* At least we check the program, the version is optional,
28 * and the procedure is optional if we are checking the version.
29 * If we parse the wildcard "*" we will allow any value (no check) */
30#define DETECT_RPC_CHECK_PROGRAM 0x01
31#define DETECT_RPC_CHECK_VERSION 0x02
32#define DETECT_RPC_CHECK_PROCEDURE 0x04
33
34/** Simple struct for a rpc msg call */
35typedef struct RpcMsg_ {
36 uint32_t xid;
37 uint32_t type; /**< CALL = 0 (We only search for CALLS */
38 uint32_t rpcvers; /**< must be equal to two (2) */
39 uint32_t prog;
40 uint32_t vers;
41 uint32_t proc;
43
44typedef struct DetectRpcData_ {
45 uint32_t program;
47 uint32_t procedure;
48 uint8_t flags;
50
51/* prototypes */
52void DetectRpcRegister (void);
53
54#endif /* SURICATA_DETECT_RPC_H */
void DetectRpcRegister(void)
Registration function for rpc keyword.
Definition detect-rpc.c:61
struct RpcMsg_ RpcMsg
struct DetectRpcData_ DetectRpcData
uint32_t procedure
Definition detect-rpc.h:47
uint32_t program_version
Definition detect-rpc.h:46
uint32_t program
Definition detect-rpc.h:45
uint8_t flags
Definition detect-rpc.h:48
uint32_t xid
Definition detect-rpc.h:36
uint32_t prog
Definition detect-rpc.h:39
uint32_t proc
Definition detect-rpc.h:41
uint32_t type
Definition detect-rpc.h:37
uint32_t vers
Definition detect-rpc.h:40
uint32_t rpcvers
Definition detect-rpc.h:38