Neale Ranns | cbe25aa | 2019-09-30 10:53:31 +0000 | [diff] [blame] | 1 | /* |
| 2 | * |
| 3 | * ip6_neighboor.h: ip6 neighbor structures |
| 4 | * |
| 5 | * Copyright (c) 2016 Cisco and/or its affiliates. |
| 6 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | * you may not use this file except in compliance with the License. |
| 8 | * You may obtain a copy of the License at: |
| 9 | * |
| 10 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | * |
| 12 | * Unless required by applicable law or agreed to in writing, software |
| 13 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | * See the License for the specific language governing permissions and |
| 16 | * limitations under the License. |
| 17 | */ |
| 18 | |
| 19 | #ifndef __IP6_RA_H__ |
| 20 | #define __IP6_RA_H__ |
| 21 | |
| 22 | #include <vnet/fib/fib_types.h> |
| 23 | |
| 24 | extern int ip6_ra_config (vlib_main_t * vm, u32 sw_if_index, |
| 25 | u8 suppress, u8 managed, u8 other, |
| 26 | u8 ll_option, u8 send_unicast, u8 cease, |
| 27 | u8 use_lifetime, u32 lifetime, |
| 28 | u32 initial_count, u32 initial_interval, |
| 29 | u32 max_interval, u32 min_interval, u8 is_no); |
| 30 | |
| 31 | extern int ip6_ra_prefix (vlib_main_t * vm, u32 sw_if_index, |
| 32 | ip6_address_t * prefix_addr, u8 prefix_len, |
| 33 | u8 use_default, u32 val_lifetime, |
| 34 | u32 pref_lifetime, u8 no_advertise, |
| 35 | u8 off_link, u8 no_autoconfig, |
| 36 | u8 no_onlink, u8 is_no); |
| 37 | |
| 38 | typedef struct |
| 39 | { |
| 40 | u32 irt; |
| 41 | u32 mrt; |
| 42 | u32 mrc; |
| 43 | u32 mrd; |
| 44 | } icmp6_send_router_solicitation_params_t; |
| 45 | |
| 46 | extern void icmp6_send_router_solicitation (vlib_main_t * vm, |
| 47 | u32 sw_if_index, |
| 48 | u8 stop, |
| 49 | const |
| 50 | icmp6_send_router_solicitation_params_t |
| 51 | * params); |
| 52 | |
| 53 | typedef struct |
| 54 | { |
| 55 | fib_prefix_t prefix; |
| 56 | u8 flags; |
| 57 | u32 valid_time; |
| 58 | u32 preferred_time; |
| 59 | } ra_report_prefix_info_t; |
| 60 | |
| 61 | typedef struct |
| 62 | { |
| 63 | ip6_address_t router_address; |
| 64 | u32 sw_if_index; |
| 65 | u8 current_hop_limit; |
| 66 | u8 flags; |
| 67 | u16 router_lifetime_in_sec; |
| 68 | u32 neighbor_reachable_time_in_msec; |
| 69 | u32 time_in_msec_between_retransmitted_neighbor_solicitations; |
| 70 | u8 slla[6]; |
| 71 | u32 mtu; |
| 72 | ra_report_prefix_info_t *prefixes; |
| 73 | } ip6_ra_report_t; |
| 74 | |
| 75 | |
| 76 | typedef void (*ip6_ra_report_notify_t) (const ip6_ra_report_t * rap); |
| 77 | |
| 78 | extern void ip6_ra_report_register (ip6_ra_report_notify_t fn); |
| 79 | extern void ip6_ra_report_unregister (ip6_ra_report_notify_t fn); |
Dave Barach | d158696 | 2020-02-20 16:17:58 -0500 | [diff] [blame] | 80 | extern void ip6_ra_update_secondary_radv_info (ip6_address_t * address, |
| 81 | u8 prefix_len, |
| 82 | u32 primary_sw_if_index, |
| 83 | u32 valid_time, |
| 84 | u32 preferred_time); |
Neale Ranns | cbe25aa | 2019-09-30 10:53:31 +0000 | [diff] [blame] | 85 | |
| 86 | #endif /* included_ip6_neighbor_h */ |
| 87 | |
| 88 | /* |
| 89 | * fd.io coding-style-patch-verification: ON |
| 90 | * |
| 91 | * Local Variables: |
| 92 | * eval: (c-set-style "gnu") |
| 93 | * End: |
| 94 | */ |