FD.io VPP  v20.01-48-g3e0dafb74
Vector Packet Processing
icmp46_packet.h File Reference
+ Include dependency graph for icmp46_packet.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define foreach_icmp4_type
 
#define icmp_no_code   0
 
#define foreach_icmp4_code
 
#define foreach_icmp6_type
 
#define foreach_icmp6_code
 
#define foreach_icmp6_neighbor_discovery_option
 
#define ICMP6_NEIGHBOR_DISCOVERY_PREFIX_INFORMATION_FLAG_ON_LINK   (1 << 7)
 
#define ICMP6_NEIGHBOR_DISCOVERY_PREFIX_INFORMATION_AUTO   (1 << 6)
 
#define ICMP6_ROUTER_DISCOVERY_FLAG_ADDRESS_CONFIG_VIA_DHCP   (1 << 7)
 
#define ICMP6_ROUTER_DISCOVERY_FLAG_OTHER_CONFIG_VIA_DHCP   (1 << 6)
 
#define ICMP6_NEIGHBOR_ADVERTISEMENT_FLAG_ROUTER   (1 << 31)
 
#define ICMP6_NEIGHBOR_ADVERTISEMENT_FLAG_SOLICITED   (1 << 30)
 
#define ICMP6_NEIGHBOR_ADVERTISEMENT_FLAG_OVERRIDE   (1 << 29)
 

Typedefs

typedef enum icmp6_neighbor_discovery_option_type icmp6_neighbor_discovery_option_type_t
 

Enumerations

enum  icmp4_type_t { foreach_icmp4_type }
 
enum  icmp4_code_t { foreach_icmp4_code }
 
enum  icmp6_type_t { foreach_icmp6_type }
 
enum  icmp6_code_t { foreach_icmp6_code }
 
enum  icmp6_neighbor_discovery_option_type { foreach_icmp6_neighbor_discovery_option }
 

Functions

typedef CLIB_PACKED (struct { u8 type;u8 code;u16 checksum;}) icmp46_header_t
 
typedef CLIB_PACKED (struct { u8 type;u8 n_data_u64s;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 #define ICMP6_NEIGHBOR_DISCOVERY_PREFIX_INFORMATION_AUTO 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];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
 
typedef CLIB_PACKED (struct { icmp46_header_t icmp;u32 reserved_must_be_zero;}) icmp6_neighbor_discovery_header_t
 
typedef CLIB_PACKED (struct { icmp46_header_t icmp;u8 current_hop_limit;u8 flags;#define ICMP6_ROUTER_DISCOVERY_FLAG_ADDRESS_CONFIG_VIA_DHCP #define ICMP6_ROUTER_DISCOVERY_FLAG_OTHER_CONFIG_VIA_DHCP u16 router_lifetime_in_sec;u32 neighbor_reachable_time_in_msec;u32 time_in_msec_between_retransmitted_neighbor_solicitations;}) icmp6_router_advertisement_header_t
 
typedef CLIB_PACKED (struct { icmp46_header_t icmp;u32 advertisement_flags;#define ICMP6_NEIGHBOR_ADVERTISEMENT_FLAG_ROUTER #define ICMP6_NEIGHBOR_ADVERTISEMENT_FLAG_SOLICITED #define ICMP6_NEIGHBOR_ADVERTISEMENT_FLAG_OVERRIDE ip6_address_t target_address;}) icmp6_neighbor_solicitation_or_advertisement_header_t
 
typedef CLIB_PACKED (struct { icmp46_header_t icmp;u32 reserved_must_be_zero;ip6_address_t better_next_hop_address;ip6_address_t dst_address;}) icmp6_redirect_header_t
 
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
 

Macro Definition Documentation

◆ foreach_icmp4_code

#define foreach_icmp4_code
Value:
_ (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)

Definition at line 77 of file icmp46_packet.h.

◆ foreach_icmp4_type

#define foreach_icmp4_type
Value:
_ (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)

Definition at line 46 of file icmp46_packet.h.

◆ foreach_icmp6_code

#define foreach_icmp6_code
Value:
_ (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)

Definition at line 139 of file icmp46_packet.h.

◆ foreach_icmp6_neighbor_discovery_option

#define foreach_icmp6_neighbor_discovery_option
Value:
_ (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)
f64 timestamp
Definition: vpe_types.api:27

Definition at line 201 of file icmp46_packet.h.

◆ foreach_icmp6_type

#define foreach_icmp6_type
Value:
_ (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)

Definition at line 107 of file icmp46_packet.h.

◆ ICMP6_NEIGHBOR_ADVERTISEMENT_FLAG_OVERRIDE

#define ICMP6_NEIGHBOR_ADVERTISEMENT_FLAG_OVERRIDE   (1 << 29)

◆ ICMP6_NEIGHBOR_ADVERTISEMENT_FLAG_ROUTER

#define ICMP6_NEIGHBOR_ADVERTISEMENT_FLAG_ROUTER   (1 << 31)

◆ ICMP6_NEIGHBOR_ADVERTISEMENT_FLAG_SOLICITED

#define ICMP6_NEIGHBOR_ADVERTISEMENT_FLAG_SOLICITED   (1 << 30)

◆ ICMP6_NEIGHBOR_DISCOVERY_PREFIX_INFORMATION_AUTO

#define ICMP6_NEIGHBOR_DISCOVERY_PREFIX_INFORMATION_AUTO   (1 << 6)

◆ ICMP6_NEIGHBOR_DISCOVERY_PREFIX_INFORMATION_FLAG_ON_LINK

#define ICMP6_NEIGHBOR_DISCOVERY_PREFIX_INFORMATION_FLAG_ON_LINK   (1 << 7)

◆ ICMP6_ROUTER_DISCOVERY_FLAG_ADDRESS_CONFIG_VIA_DHCP

#define ICMP6_ROUTER_DISCOVERY_FLAG_ADDRESS_CONFIG_VIA_DHCP   (1 << 7)

◆ ICMP6_ROUTER_DISCOVERY_FLAG_OTHER_CONFIG_VIA_DHCP

#define ICMP6_ROUTER_DISCOVERY_FLAG_OTHER_CONFIG_VIA_DHCP   (1 << 6)

◆ icmp_no_code

#define icmp_no_code   0

Definition at line 75 of file icmp46_packet.h.

Typedef Documentation

◆ icmp6_neighbor_discovery_option_type_t

Enumeration Type Documentation

◆ icmp4_code_t

Enumerator
foreach_icmp4_code 

Definition at line 169 of file icmp46_packet.h.

◆ icmp4_type_t

Enumerator
foreach_icmp4_type 

Definition at line 162 of file icmp46_packet.h.

◆ icmp6_code_t

Enumerator
foreach_icmp6_code 

Definition at line 183 of file icmp46_packet.h.

◆ icmp6_neighbor_discovery_option_type

Enumerator
foreach_icmp6_neighbor_discovery_option 

Definition at line 234 of file icmp46_packet.h.

◆ icmp6_type_t

Enumerator
foreach_icmp6_type 

Definition at line 176 of file icmp46_packet.h.

Function Documentation

◆ CLIB_PACKED() [1/13]

typedef CLIB_PACKED ( struct { u8 type;u8 code;u16 checksum;}  )

◆ CLIB_PACKED() [2/13]

typedef CLIB_PACKED ( struct { u8 type;u8 n_data_u64s;u8 data[0];}  )

◆ CLIB_PACKED() [3/13]

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 #define ICMP6_NEIGHBOR_DISCOVERY_PREFIX_INFORMATION_AUTO u32 valid_time;u32 preferred_time;u32 unused;ip6_address_t dst_address;}  )

◆ CLIB_PACKED() [4/13]

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];}  )

◆ CLIB_PACKED() [5/13]

typedef CLIB_PACKED ( struct { icmp6_neighbor_discovery_option_header_t header;u8 reserved[6];u8 data[0];}  )

◆ CLIB_PACKED() [6/13]

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

◆ CLIB_PACKED() [7/13]

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

◆ CLIB_PACKED() [8/13]

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

◆ CLIB_PACKED() [9/13]

typedef CLIB_PACKED ( struct { icmp46_header_t icmp;u32 reserved_must_be_zero;}  )

◆ CLIB_PACKED() [10/13]

typedef CLIB_PACKED ( struct { icmp46_header_t icmp;u8 current_hop_limit;u8 flags;#define ICMP6_ROUTER_DISCOVERY_FLAG_ADDRESS_CONFIG_VIA_DHCP #define ICMP6_ROUTER_DISCOVERY_FLAG_OTHER_CONFIG_VIA_DHCP u16 router_lifetime_in_sec;u32 neighbor_reachable_time_in_msec;u32 time_in_msec_between_retransmitted_neighbor_solicitations;}  )

◆ CLIB_PACKED() [11/13]

typedef CLIB_PACKED ( struct { icmp46_header_t icmp;u32 advertisement_flags;#define ICMP6_NEIGHBOR_ADVERTISEMENT_FLAG_ROUTER #define ICMP6_NEIGHBOR_ADVERTISEMENT_FLAG_SOLICITED #define ICMP6_NEIGHBOR_ADVERTISEMENT_FLAG_OVERRIDE ip6_address_t target_address;}  )

◆ CLIB_PACKED() [12/13]

typedef CLIB_PACKED ( struct { icmp46_header_t icmp;u32 reserved_must_be_zero;ip6_address_t better_next_hop_address;ip6_address_t dst_address;}  )

◆ CLIB_PACKED() [13/13]

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;}  )