blob: 0e78dd595e40503d66f9c70b3a8328201acc13f0 [file] [log] [blame]
// Copyright 2018 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//! Data for testing parsing/serialization of ICMP.
//!
//! This data was obtained by capturing live network traffic.
pub mod ndp_neighbor {
pub const SOLICITATION_IP_PACKET_BYTES: &[u8] = &[
0x68, 0x00, 0x00, 0x00, 0x00, 0x20, 0x3a, 0xff, 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x56, 0xe0, 0x32, 0x09, 0xc4, 0x74, 0x77, 0xf0, 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x4f, 0xe7, 0x1a, 0x69, 0x86, 0x4b, 0x85, 0xc2, 0x87, 0x00, 0xca, 0xd0, 0x00,
0x00, 0x00, 0x00, 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4f, 0xe7, 0x1a, 0x69,
0x86, 0x4b, 0x85, 0xc2, 0x01, 0x01, 0x54, 0xe0, 0x32, 0x74, 0x77, 0xf0,
];
pub const SOURCE_LINK_LAYER_ADDRESS: &[u8] = &[0x54, 0xe0, 0x32, 0x74, 0x77, 0xf0];
pub const TARGET_ADDRESS: &[u8] = &[
0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4f, 0xe7, 0x1a, 0x69, 0x86, 0x4b, 0x85,
0xc2,
];
pub const ADVERTISMENT_IP_PACKET_BYTES: &[u8] = &[
0x60, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3a, 0xff, 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x4f, 0xe7, 0x1a, 0x69, 0x86, 0x4b, 0x85, 0xc2, 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x56, 0xe0, 0x32, 0x09, 0xc4, 0x74, 0x77, 0xf0, 0x88, 0x00, 0x8a, 0x1e, 0x40,
0x00, 0x00, 0x00, 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4f, 0xe7, 0x1a, 0x69,
0x86, 0x4b, 0x85, 0xc2,
];
}
pub mod ndp_router {
pub const ADVERTISMENT_IP_PACKET_BYTES: &[u8] = &[
0x68, 0x00, 0x00, 0x00, 0x00, 0x38, 0x3a, 0xff, 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x02, 0x00, 0x5e, 0xff, 0xfe, 0x00, 0x02, 0x65, 0xff, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x86, 0x00, 0xd9, 0x96, 0x40,
0x00, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00,
0x5e, 0x00, 0x02, 0x65, 0x03, 0x04, 0x40, 0xc0, 0x00, 0x27, 0x8d, 0x00, 0x00, 0x09, 0x3a,
0x80, 0x00, 0x00, 0x00, 0x00, 0x26, 0x20, 0x00, 0x00, 0x10, 0x00, 0x50, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
];
/// Options in the Advertisment packet.
pub const HOP_LIMIT: u8 = 64;
pub const LIFETIME: u16 = 3600;
pub const REACHABLE_TIME: u32 = 0;
pub const RETRANS_TIMER: u32 = 0;
/// Data from the SourceLinkLayerAddress option.
pub const SOURCE_LINK_LAYER_ADDRESS: &[u8] = &[0x00, 0x00, 0x5e, 0x00, 0x02, 0x65];
/// Data from the Prefix Info option.
pub const PREFIX_INFO_VALID_LIFETIME: u32 = 2592000;
pub const PREFIX_INFO_PREFERRED_LIFETIME: u32 = 604800;
pub const PREFIX_ADDRESS: &[u8] = &[
0x26, 0x20, 0x00, 0x00, 0x10, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
];
}