GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / include / proto / bcmicmp.h
bloba3880d7b65bf57eb5de81297438278c7f5cc81e1
1 /*
2 * Fundamental constants relating to ICMP Protocol
4 * Copyright (C) 2012, Broadcom Corporation. All Rights Reserved.
5 *
6 * Permission to use, copy, modify, and/or distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
9 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
13 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
15 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
16 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 * $Id: bcmicmp.h 329768 2012-04-26 21:33:00Z $
21 #ifndef _bcmicmp_h_
22 #define _bcmicmp_h_
24 #ifndef _TYPEDEFS_H_
25 #include <typedefs.h>
26 #endif
28 /* This marks the start of a packed structure section. */
29 #include <packed_section_start.h>
31 #define ICMP_TYPE_ECHO_REQUEST 8 /* ICMP type echo request */
32 #define ICMP_TYPE_ECHO_REPLY 0 /* ICMP type echo reply */
34 #define ICMP_CHKSUM_OFFSET 2 /* ICMP body checksum offset */
36 /* ICMP6 error and control message types */
37 #define ICMP6_DEST_UNREACHABLE 1
38 #define ICMP6_PKT_TOO_BIG 2
39 #define ICMP6_TIME_EXCEEDED 3
40 #define ICMP6_PARAM_PROBLEM 4
41 #define ICMP6_ECHO_REQUEST 128
42 #define ICMP6_ECHO_REPLY 129
43 #define ICMP_MCAST_LISTENER_QUERY 130
44 #define ICMP_MCAST_LISTENER_REPORT 131
45 #define ICMP_MCAST_LISTENER_DONE 132
46 #define ICMP6_RTR_SOLICITATION 133
47 #define ICMP6_RTR_ADVERTISEMENT 134
48 #define ICMP6_NEIGH_SOLICITATION 135
49 #define ICMP6_NEIGH_ADVERTISEMENT 136
50 #define ICMP6_REDIRECT 137
52 #define ICMP6_RTRSOL_OPT_OFFSET 8
53 #define ICMP6_RTRADV_OPT_OFFSET 16
54 #define ICMP6_NEIGHSOL_OPT_OFFSET 24
55 #define ICMP6_NEIGHADV_OPT_OFFSET 24
56 #define ICMP6_REDIRECT_OPT_OFFSET 40
58 BWL_PRE_PACKED_STRUCT struct icmp6_opt {
59 uint8 type; /* Option identifier */
60 uint8 length; /* Lenth including type and length */
61 uint8 data[0]; /* Variable length data */
62 } BWL_POST_PACKED_STRUCT;
64 #define ICMP6_OPT_TYPE_SRC_LINK_LAYER 1
65 #define ICMP6_OPT_TYPE_TGT_LINK_LAYER 2
66 #define ICMP6_OPT_TYPE_PREFIX_INFO 3
67 #define ICMP6_OPT_TYPE_REDIR_HDR 4
68 #define ICMP6_OPT_TYPE_MTU 5
70 /* These fields are stored in network order */
71 BWL_PRE_PACKED_STRUCT struct bcmicmp_hdr {
72 uint8 type; /* Echo or Echo-reply */
73 uint8 code; /* Always 0 */
74 uint16 chksum; /* Icmp packet checksum */
75 } BWL_POST_PACKED_STRUCT;
77 /* This marks the end of a packed structure section. */
78 #include <packed_section_end.h>
80 #endif /* #ifndef _bcmicmp_h_ */