xorp

xrl_target_ripng.hh

00001 // -*- c-basic-offset: 4; tab-width: 8; indent-tabs-mode: t -*-
00002 
00003 // Copyright (c) 2001-2011 XORP, Inc and Others
00004 //
00005 // This program is free software; you can redistribute it and/or modify
00006 // it under the terms of the GNU General Public License, Version 2, June
00007 // 1991 as published by the Free Software Foundation. Redistribution
00008 // and/or modification of this program under the terms of any other
00009 // version of the GNU General Public License is not permitted.
00010 // 
00011 // This program is distributed in the hope that it will be useful, but
00012 // WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For more details,
00014 // see the GNU General Public License, Version 2, a copy of which can be
00015 // found in the XORP LICENSE.gpl file.
00016 // 
00017 // XORP Inc, 2953 Bunker Hill Lane, Suite 204, Santa Clara, CA 95054, USA;
00018 // http://xorp.net
00019 
00020 
00021 #ifndef __RIP_XRL_TARGET_RIPNG_HH__
00022 #define __RIP_XRL_TARGET_RIPNG_HH__
00023 
00024 #include "libxorp/status_codes.h"
00025 #include "xrl/targets/ripng_base.hh"
00026 
00027 class XrlRouter;
00028 class XrlProcessSpy;
00029 
00030 template <typename A> class System;
00031 template <typename A> class XrlPortManager;
00032 template <typename A> class XrlRipCommonTarget;
00033 template <typename A> class XrlRedistManager;
00034 
00035 class XrlRipngTarget : public XrlRipngTargetBase {
00036 public:
00037     XrlRipngTarget(EventLoop&           e,
00038            XrlRouter&           xr,
00039            XrlProcessSpy&       xps,
00040            XrlPortManager<IPv6>&    xpm,
00041            XrlRedistManager<IPv6>&  xrm,
00042            System<IPv6>&        rip_system);
00043     ~XrlRipngTarget();
00044 
00045     void set_status(ProcessStatus ps, const string& annotation = "");
00046 
00047     XrlCmdError common_0_1_get_target_name(string& name);
00048     XrlCmdError common_0_1_get_version(string& version);
00049     XrlCmdError common_0_1_get_status(uint32_t& status, string& reason);
00050     XrlCmdError common_0_1_shutdown();
00051     XrlCmdError common_0_1_startup();
00052 
00053     XrlCmdError
00054     finder_event_observer_0_1_xrl_target_birth(const string& class_name,
00055                            const string& instance_name);
00056 
00057     XrlCmdError
00058     finder_event_observer_0_1_xrl_target_death(const string& class_name,
00059                            const string& instance_name);
00060 
00061     XrlCmdError
00062     ripng_0_1_add_rip_address(const string& ifname,
00063                   const string& vifname,
00064                   const IPv6&   addr);
00065 
00066     XrlCmdError
00067     ripng_0_1_remove_rip_address(const string&  ifname,
00068                  const string&  vifname,
00069                  const IPv6&    addr);
00070 
00071     XrlCmdError
00072     ripng_0_1_set_rip_address_enabled(const string& ifname,
00073                       const string& vifname,
00074                       const IPv6&   addr,
00075                       const bool&   enabled);
00076 
00077     XrlCmdError
00078     ripng_0_1_rip_address_enabled(const string& ifname,
00079                   const string& vifname,
00080                   const IPv6&   addr,
00081                   bool&     enabled);
00082 
00083     XrlCmdError ripng_0_1_set_cost(const string&    ifname,
00084                    const string&    vifname,
00085                    const IPv6&      addr,
00086                    const uint32_t&  cost);
00087 
00088     XrlCmdError ripng_0_1_cost(const string&    ifname,
00089                    const string&    vifname,
00090                    const IPv6&  addr,
00091                    uint32_t&    cost);
00092 
00093     XrlCmdError ripng_0_1_set_horizon(const string& ifname,
00094                       const string& vifname,
00095                       const IPv6&   addr,
00096                       const string& horizon);
00097 
00098     XrlCmdError ripng_0_1_horizon(const string& ifname,
00099                   const string& vifname,
00100                   const IPv6&   addr,
00101                   string&   horizon);
00102 
00103     XrlCmdError ripng_0_1_set_passive(const string& ifname,
00104                       const string& vifname,
00105                       const IPv6&   addr,
00106                       const bool&   passive);
00107 
00108     XrlCmdError ripng_0_1_passive(const string& ifname,
00109                   const string& vifname,
00110                   const IPv6&   addr,
00111                   bool&     passive);
00112 
00113     XrlCmdError
00114     ripng_0_1_set_accept_non_rip_requests(const string& ifname,
00115                       const string& vifname,
00116                       const IPv6&   addr,
00117                       const bool&   accept);
00118 
00119     XrlCmdError ripng_0_1_accept_non_rip_requests(const string& ifname,
00120                           const string& vifname,
00121                           const IPv6&   addr,
00122                           bool&     accept);
00123 
00124     XrlCmdError ripng_0_1_set_accept_default_route(const string& ifname,
00125                            const string& vifname,
00126                            const IPv6&   addr,
00127                            const bool&   accept);
00128 
00129     XrlCmdError ripng_0_1_accept_default_route(const string&    ifname,
00130                            const string&    vifname,
00131                            const IPv6&  addr,
00132                            bool&        accept);
00133 
00134     XrlCmdError
00135     ripng_0_1_set_advertise_default_route(const string& ifname,
00136                       const string& vifname,
00137                       const IPv6&   addr,
00138                       const bool&   advertise);
00139 
00140     XrlCmdError ripng_0_1_advertise_default_route(const string& ifname,
00141                           const string& vifname,
00142                           const IPv6&   addr,
00143                           bool&     advertise);
00144 
00145     XrlCmdError
00146     ripng_0_1_set_route_timeout(const string&   ifname,
00147                 const string&   vifname,
00148                 const IPv6& addr,
00149                 const uint32_t& t_secs);
00150 
00151     XrlCmdError
00152     ripng_0_1_route_timeout(const string&   ifname,
00153                 const string&   vifname,
00154                 const IPv6&     addr,
00155                 uint32_t&       t_secs);
00156 
00157     XrlCmdError
00158     ripng_0_1_set_deletion_delay(const string&      ifname,
00159                  const string&      vifname,
00160                  const IPv6&        addr,
00161                  const uint32_t&    t_secs);
00162 
00163     XrlCmdError
00164     ripng_0_1_deletion_delay(const string&  ifname,
00165                  const string&  vifname,
00166                  const IPv6&    addr,
00167                  uint32_t&      t_secs);
00168 
00169     XrlCmdError
00170     ripng_0_1_set_request_interval(const string&    ifname,
00171                    const string&    vifname,
00172                    const IPv6&      addr,
00173                    const uint32_t&  t_secs);
00174 
00175     XrlCmdError
00176     ripng_0_1_request_interval(const string&    ifname,
00177                    const string&    vifname,
00178                    const IPv6&  addr,
00179                    uint32_t&    t_secs);
00180 
00181     XrlCmdError
00182     ripng_0_1_set_update_interval(const string&     ifname,
00183                   const string&     vifname,
00184                   const IPv6&       addr,
00185                   const uint32_t&   t_secs);
00186 
00187     XrlCmdError
00188     ripng_0_1_update_interval(const string& ifname,
00189                   const string& vifname,
00190                   const IPv6&   addr,
00191                   uint32_t&     t_secs);
00192 
00193     XrlCmdError
00194     ripng_0_1_set_update_jitter(const string&   ifname,
00195                 const string&   vifname,
00196                 const IPv6& addr,
00197                 const uint32_t& t_jitter);
00198 
00199     XrlCmdError
00200     ripng_0_1_update_jitter(const string&   ifname,
00201                 const string&   vifname,
00202                 const IPv6&     addr,
00203                 uint32_t&       t_jitter);
00204 
00205     XrlCmdError
00206     ripng_0_1_set_triggered_update_delay(const string&      ifname,
00207                      const string&      vifname,
00208                      const IPv6&        addr,
00209                      const uint32_t&    t_secs);
00210 
00211     XrlCmdError
00212     ripng_0_1_triggered_update_delay(const string&  ifname,
00213                      const string&  vifname,
00214                      const IPv6&    addr,
00215                      uint32_t&      t_secs);
00216 
00217     XrlCmdError
00218     ripng_0_1_set_triggered_update_jitter(const string&     ifname,
00219                       const string&     vifname,
00220                       const IPv6&       addr,
00221                       const uint32_t&   t_jitter);
00222 
00223     XrlCmdError
00224     ripng_0_1_triggered_update_jitter(const string& ifname,
00225                       const string& vifname,
00226                       const IPv6&   addr,
00227                       uint32_t&     t_jitter);
00228 
00229     XrlCmdError
00230     ripng_0_1_set_interpacket_delay(const string&   ifname,
00231                     const string&   vifname,
00232                     const IPv6&     addr,
00233                     const uint32_t& t_msecs);
00234 
00235     XrlCmdError
00236     ripng_0_1_interpacket_delay(const string&   ifname,
00237                 const string&   vifname,
00238                 const IPv6& addr,
00239                 uint32_t&   t_msecs);
00240 
00241     XrlCmdError ripng_0_1_rip_address_status(const string&  ifname,
00242                          const string&  vifname,
00243                          const IPv6&    addr,
00244                          string&        status);
00245 
00246     XrlCmdError ripng_0_1_get_all_addresses(XrlAtomList&    ifnames,
00247                         XrlAtomList&    vifnames,
00248                         XrlAtomList&    addrs);
00249 
00250     XrlCmdError ripng_0_1_get_peers(const string&       ifname,
00251                     const string&       vifname,
00252                     const IPv6&         addr,
00253                     XrlAtomList&        peers);
00254 
00255     XrlCmdError ripng_0_1_get_all_peers(XrlAtomList&    peers,
00256                     XrlAtomList&    ifnames,
00257                     XrlAtomList&    vifnames,
00258                     XrlAtomList&    addrs);
00259 
00260     XrlCmdError ripng_0_1_get_counters(const string&    ifname,
00261                        const string&    vifname,
00262                        const IPv6&  addr,
00263                        XrlAtomList& descriptions,
00264                        XrlAtomList& values);
00265 
00266     XrlCmdError ripng_0_1_get_peer_counters(
00267                 const string&   ifname,
00268                 const string&   vifname,
00269                 const IPv6& addr,
00270                 const IPv6& peer,
00271                 XrlAtomList&    descriptions,
00272                 XrlAtomList&    values,
00273                 uint32_t&   peer_last_active
00274                 );
00275 
00276     XrlCmdError ripng_0_1_trace(const string& tvar,
00277                 const bool& enable);
00278 
00279     XrlCmdError socket6_user_0_1_recv_event(const string&   sockid,
00280                         const string&   if_name,
00281                         const string&   vif_name,
00282                         const IPv6&     src_host,
00283                         const uint32_t& src_port,
00284                         const vector<uint8_t>& pdata);
00285 
00286     XrlCmdError socket6_user_0_1_inbound_connect_event(
00287     const string&   sockid,
00288     const IPv6& src_host,
00289     const uint32_t& src_port,
00290     const string&   new_sockid,
00291     bool&       accept);
00292 
00293     XrlCmdError socket6_user_0_1_outgoing_connect_event(
00294     const string&   sockid);
00295 
00296     XrlCmdError socket6_user_0_1_error_event(const string&  sockid,
00297                          const string&  reason,
00298                          const bool&    fatal);
00299 
00300     XrlCmdError socket6_user_0_1_disconnect_event(const string& sockid);
00301 
00302 
00303     XrlCmdError policy_backend_0_1_configure(
00304         // Input values,
00305         const uint32_t& filter,
00306         const string&   conf);
00307 
00308     XrlCmdError policy_backend_0_1_reset(
00309         // Input values,
00310         const uint32_t& filter);
00311 
00312     XrlCmdError policy_backend_0_1_push_routes();
00313 
00314     XrlCmdError policy_redist6_0_1_add_route6(
00315         // Input values,
00316         const IPv6Net&  network,
00317         const bool&     unicast,
00318         const bool&     multicast,
00319         const IPv6&     nexthop,
00320         const uint32_t& metric,
00321         const XrlAtomList&      policytags);
00322 
00323     XrlCmdError policy_redist6_0_1_delete_route6(
00324         // Input values,
00325         const IPv6Net&  network,
00326         const bool&     unicast,
00327         const bool&     multicast);
00328 
00329 protected:
00330     EventLoop&          _e;
00331     XrlRipCommonTarget<IPv6>*   _ct;
00332 };
00333 
00334 #endif // __RIP_XRL_TARGET_RIPNG_HH__
 All Classes Namespaces Functions Variables Typedefs Enumerations