suricata
decode-arp.h
Go to the documentation of this file.
1/* Copyright (C) 2024 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 *
20 * \author Giuseppe Longo <giuseppe@glongo.it>
21 */
22
23#ifndef SURICATA_DECODE_ARP_H
24#define SURICATA_DECODE_ARP_H
25
26#define ARP_HEADER_MIN_LEN 8
27#define ARP_HEADER_LEN 28
28#define ARP_HW_TYPE_ETHERNET 0x01
29#define ARP_PROTO_TYPE_IP 0x0800
30#define ARP_HW_SIZE 6
31#define ARP_PROTO_SIZE 4
32
33typedef struct ARPHdr_ {
34 uint16_t hw_type;
35 uint16_t proto_type;
36 uint8_t hw_size;
37 uint8_t proto_size;
38 uint16_t opcode;
39 uint8_t source_mac[6];
40 uint8_t source_ip[4];
41 uint8_t dest_mac[6];
42 uint8_t dest_ip[4];
43} __attribute__((__packed__)) ARPHdr;
44
45#endif /* SURICATA_DECODE_ARP_H */
struct PrefilterEngineFlowbits __attribute__
DNP3 application header.
uint8_t source_mac[6]
Definition decode-arp.h:39
uint8_t dest_ip[4]
Definition decode-arp.h:42
uint16_t opcode
Definition decode-arp.h:38
uint8_t source_ip[4]
Definition decode-arp.h:40
uint8_t dest_mac[6]
Definition decode-arp.h:41
uint16_t proto_type
Definition decode-arp.h:35
uint16_t hw_type
Definition decode-arp.h:34
uint8_t hw_size
Definition decode-arp.h:36
uint8_t proto_size
Definition decode-arp.h:37