Simon Kelley | 2a8710a | 2020-01-05 16:40:06 +0000 | [diff] [blame] | 1 | /* dnsmasq is Copyright (c) 2000-2020 Simon Kelley |
Simon Kelley | c5ad4e7 | 2012-02-24 16:06:20 +0000 | [diff] [blame] | 2 | |
| 3 | This program is free software; you can redistribute it and/or modify |
| 4 | it under the terms of the GNU General Public License as published by |
| 5 | the Free Software Foundation; version 2 dated June, 1991, or |
| 6 | (at your option) version 3 dated 29 June, 2007. |
| 7 | |
| 8 | This program is distributed in the hope that it will be useful, |
| 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | GNU General Public License for more details. |
| 12 | |
| 13 | You should have received a copy of the GNU General Public License |
| 14 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | */ |
| 16 | |
Simon Kelley | f632e56 | 2012-05-12 15:05:34 +0100 | [diff] [blame] | 17 | #define ALL_NODES "FF02::1" |
Simon Kelley | c5ad4e7 | 2012-02-24 16:06:20 +0000 | [diff] [blame] | 18 | #define ALL_ROUTERS "FF02::2" |
| 19 | |
Simon Kelley | 353ae4d | 2012-03-19 20:07:51 +0000 | [diff] [blame] | 20 | struct ping_packet { |
| 21 | u8 type, code; |
| 22 | u16 checksum; |
| 23 | u16 identifier; |
| 24 | u16 sequence_no; |
| 25 | }; |
| 26 | |
Simon Kelley | c5ad4e7 | 2012-02-24 16:06:20 +0000 | [diff] [blame] | 27 | struct ra_packet { |
| 28 | u8 type, code; |
| 29 | u16 checksum; |
| 30 | u8 hop_limit, flags; |
| 31 | u16 lifetime; |
| 32 | u32 reachable_time; |
| 33 | u32 retrans_time; |
| 34 | }; |
| 35 | |
Simon Kelley | d81b42d | 2013-09-23 12:26:34 +0100 | [diff] [blame] | 36 | struct neigh_packet { |
| 37 | u8 type, code; |
| 38 | u16 checksum; |
| 39 | u16 reserved; |
| 40 | struct in6_addr target; |
| 41 | }; |
| 42 | |
Simon Kelley | c5ad4e7 | 2012-02-24 16:06:20 +0000 | [diff] [blame] | 43 | struct prefix_opt { |
| 44 | u8 type, len, prefix_len, flags; |
| 45 | u32 valid_lifetime, preferred_lifetime, reserved; |
| 46 | struct in6_addr prefix; |
| 47 | }; |
| 48 | |
Simon Kelley | c5ad4e7 | 2012-02-24 16:06:20 +0000 | [diff] [blame] | 49 | #define ICMP6_OPT_SOURCE_MAC 1 |
| 50 | #define ICMP6_OPT_PREFIX 3 |
| 51 | #define ICMP6_OPT_MTU 5 |
Simon Kelley | 7ea3d3f | 2014-04-25 22:04:05 +0100 | [diff] [blame] | 52 | #define ICMP6_OPT_ADV_INTERVAL 7 |
Ilya Ponetaev | 5bf50af | 2014-09-09 12:46:21 +0100 | [diff] [blame] | 53 | #define ICMP6_OPT_RT_INFO 24 |
Simon Kelley | c5ad4e7 | 2012-02-24 16:06:20 +0000 | [diff] [blame] | 54 | #define ICMP6_OPT_RDNSS 25 |
Simon Kelley | 18f0fb0 | 2012-03-31 21:18:55 +0100 | [diff] [blame] | 55 | #define ICMP6_OPT_DNSSL 31 |
Simon Kelley | c5ad4e7 | 2012-02-24 16:06:20 +0000 | [diff] [blame] | 56 | |
| 57 | |
| 58 | |