IPv6 ND Router discovery data plane (VPP-1095)
[vpp.git] / src / vnet / ip / ip.api
index 6ed5a9d..d6c5f6b 100644 (file)
@@ -19,7 +19,8 @@
     called through a shared memory interface. 
 */
 
-option version = "1.0.1";
+option version = "1.2.0";
+import "vnet/fib/fib_types.api";
 
 /** \brief Add / del table request
            A table can be added multiple times, but need be deleted only once.
@@ -52,33 +53,6 @@ define ip_fib_dump
   u32 context;
 };
 
-/** \brief FIB path
-    @param sw_if_index - index of the interface
-    @param weight - The weight, for UCMP
-    @param preference - The preference of the path. lowest preference is prefered
-    @param is_local - local if non-zero, else remote
-    @param is_drop - Drop the packet
-    @param is_unreach - Drop the packet and rate limit send ICMP unreachable
-    @param is_prohibit - Drop the packet and rate limit send ICMP prohibited
-    @param afi - the afi of the next hop, IP46_TYPE_IP4=1, IP46_TYPE_IP6=2
-    @param next_hop[16] - the next hop address
-
-    WARNING: this type is replicated, pending cleanup completion
-*/
-typeonly manual_print manual_endian define fib_path
-{
-  u32 sw_if_index;
-  u32 table_id;
-  u8 weight;
-  u8 preference;
-  u8 is_local;
-  u8 is_drop;
-  u8 is_unreach;
-  u8 is_prohibit;
-  u8 afi;
-  u8 next_hop[16];
-};
-
 /** \brief IP FIB table response
     @param table_id - IP fib table id
     @address_length - mask length
@@ -330,6 +304,30 @@ define ip6nd_proxy_dump
   u32 context;
 };
 
+/** \brief Start / stop sending router solicitation
+    @param client_index - opaque cookie to identify the sender
+    @param context - sender context, to match reply w/ request
+    @param irt - initial retransmission time
+    @param mrt - maximum retransmission time
+    @param mrc - maximum retransmission count
+    @param mrd - maximum retransmission duration
+    @param sw_if_index - software interface index of interface
+                         for sending router solicitation
+    @param stop - if non-zero then stop sending router solicitation,
+                  otherwise start sending router solicitation
+*/
+autoreply define ip6nd_send_router_solicitation
+{
+  u32 client_index;
+  u32 context;
+  u32 irt;
+  u32 mrt;
+  u32 mrc;
+  u32 mrd;
+  u32 sw_if_index;
+  u8 stop;
+};
+
 /** \brief IPv6 interface enable / disable request
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request
@@ -420,7 +418,7 @@ autoreply define ip_add_del_route
   u8 next_hop_address[16];
   u8 next_hop_n_out_labels;
   u32 next_hop_via_label;
-  u32 next_hop_out_label_stack[next_hop_n_out_labels];
+  vl_api_fib_mpls_label_t next_hop_out_label_stack[next_hop_n_out_labels];
 };
 
 /** \brief Add / del route request
@@ -686,6 +684,11 @@ define ip4_arp_event
   u8 mac_ip;
 };
 
+service {
+  rpc want_ip4_arp_events returns want_ip4_arp_events_reply
+    events ip4_arp_event;
+};
+
 /** \brief Register for ip6 nd resolution events
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request
@@ -720,6 +723,73 @@ define ip6_nd_event
   u8 mac_ip;
 };
 
+service {
+  rpc want_ip6_ra_events returns want_ip6_ra_events_reply
+    events ip6_ra_event;
+};
+
+/** \brief Register for ip6 router advertisement events
+    @param client_index - opaque cookie to identify the sender
+    @param context - sender context, to match reply w/ request
+    @param enable_disable - 1 => register for events, 0 => cancel registration
+    @param pid - sender's pid
+*/
+autoreply define want_ip6_ra_events
+{
+  u32 client_index;
+  u32 context;
+  u8 enable_disable;
+  u32 pid;
+};
+
+/** \brief Struct representing RA prefix info
+    @param dst_address - RA prefix info destination address
+    @param dst_address_length - RA prefix info destination address length
+    @param flags - RA prefix info flags
+    @param valid_time - RA prefix info valid time
+    @param preferred_time - RA prefix info preferred time
+*/
+typeonly define ip6_ra_prefix_info
+{
+  u8 dst_address[16];
+  u8 dst_address_length;
+  u8 flags;
+  u32 valid_time;
+  u32 preferred_time;
+};
+
+/** \brief Tell client about a router advertisement event
+    @param client_index - opaque cookie to identify the sender
+    @param pid - client pid registered to receive notification
+    @param current_hop_limit - RA current hop limit
+    @param flags - RA flags
+    @param router_lifetime_in_sec - RA lifetime in seconds
+    @param neighbor_reachable_time_in_msec - RA neighbor reachable time in msec
+    @param time_in_msec_between_retransmitted_neighbor_solicitations -
+               time in msec between retransmitted neighbor solicitations
+    @param n_prefixes -
+    @param prefixes -
+*/
+define ip6_ra_event
+{
+  u32 client_index;
+  u32 pid;
+  u32 sw_if_index;
+  u8 router_address[16];
+  u8 current_hop_limit;
+  u8 flags;
+  u16 router_lifetime_in_sec;
+  u32 neighbor_reachable_time_in_msec;
+  u32 time_in_msec_between_retransmitted_neighbor_solicitations;
+  u32 n_prefixes;
+  vl_api_ip6_ra_prefix_info_t prefixes[n_prefixes];
+};
+
+service {
+  rpc want_ip6_nd_events returns want_ip6_nd_events_reply
+    events ip6_nd_event;
+};
+
 /** \brief Proxy ARP add / del request
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request