Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ipv6_test_values.h Source File

ipv6_test_values.h

00001 /*
00002  * Copyright (c) 2015 ARM Limited. All rights reserved.
00003  * SPDX-License-Identifier: Apache-2.0
00004  * Licensed under the Apache License, Version 2.0 (the License); you may
00005  * not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  * http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an AS IS BASIS, WITHOUT
00012  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 #ifndef IPV6_TEST_VALUES_H
00017 #define IPV6_TEST_VALUES_H
00018 
00019 #include <stdint.h>
00020 
00021 struct ip6_addresses_and_its_binary_form_t {
00022     char *addr;
00023     uint8_t bin[16];
00024 } ipv6_test_values[] = {
00025     { "2001:db8::1:0:0:1",                      { 0x20, 0x01, 0xd, 0xb8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1 }},
00026     { "2001:db8:aaaa:bbbb:cccc:dddd:eeee:1",    { 0x20, 0x01, 0xd, 0xb8, 0xaa, 0xaa, 0xbb, 0xbb, 0xcc, 0xcc, 0xdd, 0xdd, 0xee, 0xee, 0x00, 0x01 }},
00027     { "2001:db8::1",                            { 0x20, 0x01, 0xd, 0xb8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }},
00028     { "2001:db8::2:1",                          { 0x20, 0x01, 0xd, 0xb8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1 }},
00029     { "2001:db8:aaaa:bbbb:cccc:dddd:0:1",       { 0x20, 0x01, 0xd, 0xb8, 0xaa, 0xaa, 0xbb, 0xbb, 0xcc, 0xcc, 0xdd, 0xdd, 0, 0, 0x00, 0x01 }},
00030     { "2001:db8::aaaa:0:0:1",                   { 0x20, 0x01, 0xd, 0xb8, 0, 0, 0, 0, 0xaa, 0xaa, 0, 0, 0, 0, 0, 1 }},
00031     { "2001:0:0:1::1",                          { 0x20, 0x01, 0, 0 , 0, 0 , 0, 1, 0, 0, 0, 0, 0, 0, 0, 1 }},
00032     { "2001:0:0:1::",                           { 0x20, 0x01, 0, 0 , 0, 0 , 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 }},
00033     { "2001:db8::",                             { 0x20, 0x01, 0xd, 0xb8 }},
00034     { "::aaaa:0:0:1",                           { 0, 0, 0, 0, 0, 0, 0, 0, 0xaa, 0xaa, 0, 0, 0, 0, 0, 1 }},
00035     { "::1",                                    { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }},
00036     { "::",                                     { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }},
00037     { "FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF", { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}},
00038     {NULL, {0}}
00039 };
00040 
00041 #endif /* IPV6_TEST_VALUES_H */