Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
ipv6_constants.h
00001 /* 00002 * Copyright (c) 2013-2017, Arm Limited and affiliates. 00003 * SPDX-License-Identifier: Apache-2.0 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); 00006 * you may not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 */ 00017 00018 #ifndef IPV6_CONSTANTS_H_ 00019 #define IPV6_CONSTANTS_H_ 00020 00021 #define IPV6_MIN_LINK_MTU 1280 /* All links can transfer 1280-octet IP packets */ 00022 #define IPV6_MIN_FRAG_MRU 1500 /* All hosts can receive 1500-octet fragmented datagrams */ 00023 00024 /* 00025 * IPv6 header offsets 00026 */ 00027 #define IPV6_HDROFF_FLOW_LABEL 1 00028 #define IPV6_HDROFF_PAYLOAD_LENGTH 4 00029 #define IPV6_HDROFF_NH 6 00030 #define IPV6_HDROFF_HOP_LIMIT 7 00031 #define IPV6_HDROFF_SRC_ADDR 8 00032 #define IPV6_HDROFF_DST_ADDR 24 00033 #define IPV6_HDRLEN 40 00034 00035 /* 00036 * Standard IPv6 Next Header numbers 00037 */ 00038 #define IPV6_NH_HOP_BY_HOP 0 00039 #define IPV6_NH_TCP 6 00040 #define IPV6_NH_UDP 17 00041 #define IPV6_NH_IPV6 41 00042 #define IPV6_NH_ROUTING 43 00043 #define IPV6_NH_FRAGMENT 44 00044 #define IPV6_NH_AUTH 51 00045 #define IPV6_NH_MOBILITY 55 00046 #define IPV6_NH_ICMPV6 58 00047 #define IPV6_NH_NONE 59 00048 #define IPV6_NH_DEST_OPT 60 00049 #define IPV6_NH_HIP 139 00050 #define IPV6_NH_SHIM6 140 00051 00052 /* Options in IPv6 Destination/Hop-by-Hop Options Headers */ 00053 #define IPV6_OPTION_PAD1 0x00 /* (skip, does not change en-route) */ 00054 #define IPV6_OPTION_PADN 0x01 /* (skip, does not change en-route) */ 00055 #define IPV6_OPTION_ROUTER_ALERT 0x05 /* (skip, does not change en-route) */ 00056 #define IPV6_OPTION_RPL 0x63 /* (discard, may change en-route) */ 00057 #define IPV6_OPTION_MPL 0x6D /* (discard, may change en-route) */ 00058 #define IPV6_OPTION_MPL_EXP 0x7E /* (discard, may change en-route) */ 00059 00060 /* Encoded bits in IPv6 Option numbers; action if unrecognised, and mutability */ 00061 #define IPV6_OPTION_ACTION_MASK 0xC0 00062 #define IPV6_OPTION_ACTION_SKIP 0x00 /* ignore unrecognised */ 00063 #define IPV6_OPTION_ACTION_DISCARD 0x40 /* discard packet */ 00064 #define IPV6_OPTION_ACTION_ERROR 0x80 /* discard, and send ICMP Parameter Problem */ 00065 #define IPV6_OPTION_ACTION_ERROR_UNICAST 0xC0 /* discard, and send ICMP Parameter Problem if unicast dst */ 00066 00067 #define IPV6_OPTION_CHANGE_MASK 0x20 00068 #define IPV6_OPTION_CHANGE_DOES_NOT 0x00 /* does not change en-route */ 00069 #define IPV6_OPTION_CHANGE_MAY 0x20 /* may change en-route */ 00070 00071 /* Routing Types */ 00072 #define IPV6_ROUTING_TYPE_RPL 3 00073 00074 /* Scope values (RFC 7346) */ 00075 #define IPV6_SCOPE_INTERFACE_LOCAL 0x1 00076 #define IPV6_SCOPE_LINK_LOCAL 0x2 00077 #define IPV6_SCOPE_REALM_LOCAL 0x3 00078 #define IPV6_SCOPE_ADMIN_LOCAL 0x4 00079 #define IPV6_SCOPE_SITE_LOCAL 0x5 00080 #define IPV6_SCOPE_ORGANIZATION_LOCAL 0x8 00081 #define IPV6_SCOPE_GLOBAL 0xE 00082 00083 /* Router Alert values (RFC 2711) */ 00084 #define IPV6_ROUTER_ALERT_MLD 0 00085 00086 00087 00088 #endif /* IPV6_CONSTANTS_H_ */
Generated on Tue Jul 12 2022 14:23:50 by
