/*
 * Copyright (c) 2015 Cisco and/or its affiliates.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at:
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/*
 * icmp46_packet.h: ip4/ip6 icmp packet format
 *
 * Copyright (c) 2008 Eliot Dresselhaus
 *
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 *  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
 *  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
 *  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 *  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */

#ifndef included_vnet_icmp46_packet_h
#define included_vnet_icmp46_packet_h

#include <vnet/ethernet/packet.h>
#include <vnet/ip/ip6_packet.h>

#define foreach_icmp4_type			\
  _ (0, echo_reply)				\
  _ (3, destination_unreachable)		\
  _ (4, source_quench)				\
  _ (5, redirect)				\
  _ (6, alternate_host_address)			\
  _ (8, echo_request)				\
  _ (9, router_advertisement)			\
  _ (10, router_solicitation)			\
  _ (11, time_exceeded)				\
  _ (12, parameter_problem)			\
  _ (13, timestamp_request)			\
  _ (14, timestamp_reply)			\
  _ (15, information_request)			\
  _ (16, information_reply)			\
  _ (17, address_mask_request)			\
  _ (18, address_mask_reply)			\
  _ (30, traceroute)				\
  _ (31, datagram_conversion_error)		\
  _ (32, mobile_host_redirect)			\
  _ (33, ip6_where_are_you)			\
  _ (34, ip6_i_am_here)				\
  _ (35, mobile_registration_request)		\
  _ (36, mobile_registration_reply)		\
  _ (37, domain_name_request)			\
  _ (38, domain_name_reply)			\
  _ (39, skip)					\
  _ (40, photuris)

#define icmp_no_code 0

#define foreach_icmp4_code						\
  _ (destination_unreachable, 0, destination_unreachable_net)		\
  _ (destination_unreachable, 1, destination_unreachable_host)		\
  _ (destination_unreachable, 2, protocol_unreachable)			\
  _ (destination_unreachable, 3, port_unreachable)			\
  _ (destination_unreachable, 4, fragmentation_needed_and_dont_fragment_set) \
  _ (destination_unreachable, 5, source_route_failed)			\
  _ (destination_unreachable, 6, destination_network_unknown)		\
  _ (destination_unreachable, 7, destination_host_unknown)		\
  _ (destination_unreachable, 8, source_host_isolated)			\
  _ (destination_unreachable, 9, network_administratively_prohibited)	\
  _ (destination_unreachable, 10, host_administratively_prohibited)	\
  _ (destination_unreachable, 11, network_unreachable_for_type_of_service) \
  _ (destination_unreachable, 12, host_unreachable_for_type_of_service)	\
  _ (destination_unreachable, 13, communication_administratively_prohibited) \
  _ (destination_unreachable, 14, host_precedence_violation)		\
  _ (destination_unreachable, 15, precedence_cutoff_in_effect)		\
  _ (redirect, 0, network_redirect)					\
  _ (redirect, 1, host_redirect)					\
  _ (redirect, 2, type_of_service_and_network_redirect)			\
  _ (redirect, 3, type_of_service_and_host_redirect)			\
  _ (router_advertisement, 0, normal_router_advertisement)		\
  _ (router_advertisement, 16, does_not_route_common_traffic)		\
  _ (time_exceeded, 0, ttl_exceeded_in_transit)				\
  _ (time_exceeded, 1, fragment_reassembly_time_exceeded)		\
  _ (parameter_problem, 0, pointer_indicates_error)			\
  _ (parameter_problem, 1, missing_required_option)			\
  _ (parameter_problem, 2, bad_length)

/* ICMPv6 */
#define foreach_icmp6_type			\
  _ (1, destination_unreachable)		\
  _ (2, packet_too_big)				\
  _ (3, time_exceeded)				\
  _ (4, parameter_problem)			\
  _ (128, echo_request)				\
  _ (129, echo_reply)				\
  _ (130, multicast_listener_request)		\
  _ (131, multicast_listener_report)		\
  _ (132, multicast_listener_done)		\
  _ (133, router_solicitation)			\
  _ (134, router_advertisement)			\
  _ (135, neighbor_solicitation)		\
  _ (136, neighbor_advertisement)		\
  _ (137, redirect)				\
  _ (138, router_renumbering)			\
  _ (139, node_information_request)		\
  _ (140, node_information_response)		\
  _ (141, inverse_neighbor_solicitation)	\
  _ (142, inverse_neighbor_advertisement)	\
  _ (143, multicast_listener_report_v2)		\
  _ (144, home_agent_address_discovery_request)	\
  _ (145, home_agent_address_discovery_reply)	\
  _ (146, mobile_prefix_solicitation)		\
  _ (147, mobile_prefix_advertisement)		\
  _ (148, certification_path_solicitation)	\
  _ (149, certification_path_advertisement)	\
  _ (151, multicast_router_advertisement)	\
  _ (152, multicast_router_solicitation)	\
  _ (153, multicast_router_termination)		\
  _ (154, fmipv6_messages)

#define foreach_icmp6_code						\
  _ (destination_unreachable, 0, no_route_to_destination)		\
  _ (destination_unreachable, 1, destination_administratively_prohibited) \
  _ (destination_unreachable, 2, beyond_scope_of_source_address)	\
  _ (destination_unreachable, 3, address_unreachable)			\
  _ (destination_unreachable, 4, port_unreachable)			\
  _ (destination_unreachable, 5, source_address_failed_policy)		\
  _ (destination_unreachable, 6, reject_route_to_destination)		\
  _ (time_exceeded, 0, ttl_exceeded_in_transit)				\
  _ (time_exceeded, 1, fragment_reassembly_time_exceeded)		\
  _ (parameter_problem, 0, erroneous_header_field)			\
  _ (parameter_problem, 1, unrecognized_next_header)			\
  _ (parameter_problem, 2, unrecognized_option)				\
  _ (parameter_problem, 3, first_fragment_has_incomplete_header_chain)  \
  _ (router_renumbering, 0, command)					\
  _ (router_renumbering, 1, result)					\
  _ (node_information_request, 0, data_contains_ip6_address)		\
  _ (node_information_request, 1, data_contains_name)			\
  _ (node_information_request, 2, data_contains_ip4_address)		\
  _ (node_information_response, 0, success)				\
  _ (node_information_response, 1, failed)				\
  _ (node_information_response, 2, unknown_request)

typedef enum
{
#define _(n,f) ICMP4_##f = n,
  foreach_icmp4_type
#undef _
} icmp4_type_t;

typedef enum
{
#define _(t,n,f) ICMP4_##t##_##f = n,
  foreach_icmp4_code
#undef _
} icmp4_code_t;

typedef enum
{
#define _(n,f) ICMP6_##f = n,
  foreach_icmp6_type
#undef _
} icmp6_type_t;

typedef enum
{
#define _(t,n,f) ICMP6_##t##_##f = n,
  foreach_icmp6_code
#undef _
} icmp6_code_t;

/* *INDENT-OFF* */
typedef CLIB_PACKED (struct
{
    u8 type;
    u8 code;
    /* IP checksum of icmp header plus data which follows. */
    u16 checksum;
}) icmp46_header_t;
/* *INDENT-ON* */

/* ip6 neighbor discovery */
#define foreach_icmp6_neighbor_discovery_option	\
  _ (1, source_link_layer_address)		\
  _ (2, target_link_layer_address)		\
  _ (3, prefix_information)			\
  _ (4, redirected_header)			\
  _ (5, mtu)					\
  _ (6, nbma_shortcut_limit)			\
  _ (7, advertisement_interval)			\
  _ (8, home_agent_information)			\
  _ (9, source_address_list)			\
  _ (10, target_address_list)			\
  _ (11, cryptographically_generated_address)	\
  _ (12, rsa_signature)				\
  _ (13, timestamp)				\
  _ (14, nonce)					\
  _ (15, trust_anchor)				\
  _ (16, certificate)				\
  _ (17, ip_address_and_prefix)			\
  _ (18, new_router_prefix_information)		\
  _ (19, mobile_link_layer_address)		\
  _ (20, neighbor_advertisement_acknowledgment)	\
  _ (23, map)					\
  _ (24, route_information)			\
  _ (25, recursive_dns_server)			\
  _ (26, ra_flags_extension)			\
  _ (27, handover_key_request)			\
  _ (28, handover_key_reply)			\
  _ (29, handover_assist_information)		\
  _ (30, mobile_node_identifier)		\
  _ (31, dns_search_list)			\
  _ (138, card_request)				\
  _ (139, card_reply)

typedef enum icmp6_neighbor_discovery_option_type
{
#define _(n,f) ICMP6_NEIGHBOR_DISCOVERY_OPTION_##f = n,
  foreach_icmp6_neighbor_discovery_option
#undef _
} icmp6_neighbor_discovery_option_type_t;

/* *INDENT-OFF* */
typedef CLIB_PACKED (struct
{
    /* Option type. */
    u8 type;
    /* Length of this header plus option data in 8 byte units. */
    u8 n_data_u64s;
    /* Option data follows. */
    u8 data[0];
}) icmp6_neighbor_discovery_option_header_t;

typedef CLIB_PACKED (struct
{
    icmp6_neighbor_discovery_option_header_t header;
    u8 dst_address_length;
    u8 flags;
#define ICMP6_NEIGHBOR_DISCOVERY_PREFIX_INFORMATION_FLAG_ON_LINK (1 << 7)
#define ICMP6_NEIGHBOR_DISCOVERY_PREFIX_INFORMATION_AUTO (1 << 6)
    u32 valid_time;
    u32 preferred_time;
    u32 unused; ip6_address_t dst_address;
}) icmp6_neighbor_discovery_prefix_information_option_t;

typedef CLIB_PACKED (struct
{
    u8 type;
    u8 aux_data_len_u32s;
    u16 num_sources;
    ip6_address_t mcast_addr; ip6_address_t source_addr[0];
}) icmp6_multicast_address_record_t;

typedef CLIB_PACKED (struct
{
    icmp6_neighbor_discovery_option_header_t header;
    u8 reserved[6];
    /* IP6 header plus payload follows. */
    u8 data[0];
}) icmp6_neighbor_discovery_redirected_header_option_t;

typedef CLIB_PACKED (struct
{
    icmp6_neighbor_discovery_option_header_t header;
    u16 unused; u32 mtu;
}) icmp6_neighbor_discovery_mtu_option_t;

typedef CLIB_PACKED (struct
{
    icmp6_neighbor_discovery_option_header_t header;
    u8 ethernet_address[6];
}) icmp6_neighbor_discovery_ethernet_link_layer_address_option_t;

typedef CLIB_PACKED (struct
{
    icmp6_neighbor_discovery_option_header_t header;
    u8 max_l2_address[6 + 8];
}) icmp6_neighbor_discovery_max_link_layer_address_option_t;

/* Generic neighbor discover header.  Used for router solicitations,
   etc. */
typedef CLIB_PACKED (struct
{
    icmp46_header_t icmp; u32 reserved_must_be_zero;
}) icmp6_neighbor_discovery_header_t;

/* Router advertisement packet formats. */
typedef CLIB_PACKED (struct
{
    icmp46_header_t icmp;
    /* Current hop limit to use for outgoing packets. */
    u8 current_hop_limit;
    u8 flags;
#define ICMP6_ROUTER_DISCOVERY_FLAG_ADDRESS_CONFIG_VIA_DHCP (1 << 7)
#define ICMP6_ROUTER_DISCOVERY_FLAG_OTHER_CONFIG_VIA_DHCP (1 << 6)
    /* Zero means unspecified. */
    u16 router_lifetime_in_sec;
    /* Zero means unspecified. */
    u32 neighbor_reachable_time_in_msec;
    /* Zero means unspecified. */
    u32
    time_in_msec_between_retransmitted_neighbor_solicitations;
    /* Options that may follow: source_link_layer_address, mtu, prefix_information. */
}) icmp6_router_advertisement_header_t;

/* Neighbor solicitation/advertisement header. */
typedef CLIB_PACKED (struct
{
    icmp46_header_t icmp;
    /* Zero for solicitation; flags for advertisement. */
    u32 advertisement_flags;
    /* Set when sent by a router. */
#define ICMP6_NEIGHBOR_ADVERTISEMENT_FLAG_ROUTER (1 << 31)
    /* Set when response to solicitation. */
#define ICMP6_NEIGHBOR_ADVERTISEMENT_FLAG_SOLICITED (1 << 30)
#define ICMP6_NEIGHBOR_ADVERTISEMENT_FLAG_OVERRIDE (1 << 29)
    ip6_address_t target_address;
    /* Options that may follow: source_link_layer_address
       (for solicitation) target_link_layer_address (for advertisement). */
}) icmp6_neighbor_solicitation_or_advertisement_header_t;

typedef CLIB_PACKED (struct
{
    icmp46_header_t icmp;
    u32 reserved_must_be_zero;
    /* Better next hop to use for given destination. */
    ip6_address_t better_next_hop_address;
    ip6_address_t dst_address;
    /* Options that may follow: target_link_layer_address,
       redirected_header. */
}) icmp6_redirect_header_t;

/* Solicitation/advertisement packet format for ethernet. */
typedef CLIB_PACKED (struct
{
    ip6_header_t ip;
    icmp6_neighbor_solicitation_or_advertisement_header_t
    neighbor;
    icmp6_neighbor_discovery_ethernet_link_layer_address_option_t
    link_layer_option;
}) icmp6_neighbor_solicitation_header_t;
/* *INDENT-ON* */

#endif /* included_vnet_icmp46_packet_h */
