suricata
decode-ppp.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 Breno Silva Pinto <breno.silva@gmail.com>
22  */
23 
24 #ifndef __DECODE_PPP_H__
25 #define __DECODE_PPP_H__
26 
27 /** Point to Point Protocol RFC1331 - Supported tyes */
28 #define PPP_IP 0x0021 /* Internet Protocol */
29 #define PPP_IPV6 0x0057 /* Internet Protocol version 6 */
30 #define PPP_VJ_UCOMP 0x002f /* VJ uncompressed TCP/IP */
31 
32 /** Unsupported PPP types (libpcap source reference) */
33 #define PPP_IPX 0x002b /* Novell IPX Protocol */
34 #define PPP_VJ_COMP 0x002d /* VJ compressed TCP/IP */
35 #define PPP_IPX 0x002b /* Novell IPX Protocol */
36 #define PPP_OSI 0x0023 /* OSI Network Layer */
37 #define PPP_NS 0x0025 /* Xerox NS IDP */
38 #define PPP_DECNET 0x0027 /* DECnet Phase IV */
39 #define PPP_APPLE 0x0029 /* Appletalk */
40 #define PPP_BRPDU 0x0031 /* Bridging PDU */
41 #define PPP_STII 0x0033 /* Stream Protocol (ST-II) */
42 #define PPP_VINES 0x0035 /* Banyan Vines */
43 #define PPP_HELLO 0x0201 /* 802.1d Hello Packets */
44 #define PPP_LUXCOM 0x0231 /* Luxcom */
45 #define PPP_SNS 0x0233 /* Sigma Network Systems */
46 #define PPP_MPLS_UCAST 0x0281 /* rfc 3032 */
47 #define PPP_MPLS_MCAST 0x0283 /* rfc 3022 */
48 #define PPP_IPCP 0x8021 /* IP Control Protocol */
49 #define PPP_OSICP 0x8023 /* OSI Network Layer Control Protocol */
50 #define PPP_NSCP 0x8025 /* Xerox NS IDP Control Protocol */
51 #define PPP_DECNETCP 0x8027 /* DECnet Control Protocol */
52 #define PPP_APPLECP 0x8029 /* Appletalk Control Protocol */
53 #define PPP_IPXCP 0x802b /* Novell IPX Control Protocol */
54 #define PPP_STIICP 0x8033 /* Strean Protocol Control Protocol */
55 #define PPP_VINESCP 0x8035 /* Banyan Vines Control Protocol */
56 #define PPP_IPV6CP 0x8057 /* IPv6 Control Protocol */
57 #define PPP_MPLSCP 0x8281 /* rfc 3022 */
58 #define PPP_LCP 0xc021 /* Link Control Protocol */
59 #define PPP_PAP 0xc023 /* Password Authentication Protocol */
60 #define PPP_LQM 0xc025 /* Link Quality Monitoring */
61 #define PPP_CHAP 0xc223 /* Challenge Handshake Authentication Protocol */
62 
63 /** PPP Packet header */
64 typedef struct PPPHdr_ {
65  uint8_t address;
66  uint8_t control;
67  uint16_t protocol;
68 } __attribute__((__packed__)) PPPHdr;
69 
70 /** PPP Packet header length */
71 #define PPP_HEADER_LEN 4
72 
73 void DecodePPPRegisterTests(void);
74 
75 #endif /* __DECODE_PPP_H__ */
76 
uint8_t address
Definition: decode-ppp.h:65
uint16_t protocol
Definition: decode-ppp.h:67
uint8_t control
Definition: decode-ppp.h:66
void DecodePPPRegisterTests(void)
Definition: decode-ppp.c:310
struct PPPHdr_ __attribute__((__packed__)) PPPHdr
DNP3 link header.