1 /** 2 * Copyright (C) 2012-2013 Steven Barth <steven@midlink.org> 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License v2 as published by 6 * the Free Software Foundation. 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 */ 14 15 #pragma once 16 #include <stdint.h> 17 #include <netinet/in.h> 18 #include <netinet/icmp6.h> 19 20 struct icmpv6_opt { 21 uint8_t type; 22 uint8_t len; 23 uint8_t data[6]; 24 }; 25 26 27 #define icmpv6_for_each_option(opt, start, end)\ 28 for (opt = (struct icmpv6_opt*)(start);\ 29 (void*)(opt + 1) <= (void*)(end) && opt->len > 0 &&\ 30 (void*)(opt + opt->len) <= (void*)(end); opt += opt->len) 31 32 33 #define MaxInitialRtrAdvInterval 16 34 #define MaxInitialRtAdvs 3 35 /* RFC8319 §4 36 This document updates §4.2 and 6.2.1 of [RFC4861] to change 37 the following router configuration variables. 38 39 In §6.2.1, inside the paragraph that defines 40 MaxRtrAdvInterval, change 1800 to 65535 seconds. 41 42 In §6.2.1, inside the paragraph that defines 43 AdvDefaultLifetime, change 9000 to 65535 seconds. 44 */ 45 #define MaxRtrAdvInterval 65535 46 #define MinRtrAdvInterval 3 47 #define AdvDefaultLifetime 65535 48 /* RFC8319 §4 49 This document updates §4.2 and 6.2.1 of [RFC4861] to change 50 the following router configuration variables. 51 52 In §4.2, inside the paragraph that defines Router Lifetime, 53 change 9000 to 65535 seconds. 54 55 Note: this is 16 bit Router Lifetime field in RA packets 56 */ 57 /* RFC9096 defines recommended option lifetimes configuration values 58 ND_PREFERRED_LIMIT 2700 59 ND_VALID_LIMIT 5400 60 61 RFC9096 §3.4 62 CE routers SHOULD set the "Router Lifetime" of Router Advertisement 63 (RA) messages to ND_PREFERRED_LIMIT. 64 65 Note: while the RFC recommends SHOULD of ND_PREFERRED_LIMIT, this 66 define is used to cap values to a sane ceiling, i.e. ND_VALID_LIMIT. 67 */ 68 #define RouterLifetime 5400 69 /* RFC4861 §6.2.1 : AdvReachableTime : 70 * MUST be no greater than 3,600,000 msec 71 */ 72 #define AdvReachableTime 3600000 73 /* RFC4861 §6.2.1 : AdvCurHopLimit 74 The value should be set to the current 75 diameter of the Internet. The value zero means 76 unspecified (by this router). 77 78 Note: this value is an 8 bit int, so max 255. 79 */ 80 #define AdvCurHopLimit 255 81 /* RFC4861 §10 - constants 82 Node constants: 83 RETRANS_TIMER 1,000 milliseconds 84 */ 85 #define RETRANS_TIMER_MAX 60000 86 /* RFC2460 §5 87 IPv6 requires that every link in the internet have an MTU of 1280 88 octets or greater. 89 */ 90 #define RA_MTU_MIN 1280 91 #define RA_MTU_MAX 65535 92 93 #define ND_RA_FLAG_PROXY 0x4 94 #define ND_RA_PREF_HIGH (1 << 3) 95 #define ND_RA_PREF_LOW (3 << 3) 96
This page was automatically generated by LXR 0.3.1. • OpenWrt