xorp

xrl_target3.hh

00001 // -*- c-basic-offset: 4; tab-width: 8; indent-tabs-mode: t -*-
00002 // vim:set sts=4 ts=8:
00003 
00004 // Copyright (c) 2001-2011 XORP, Inc and Others
00005 //
00006 // This program is free software; you can redistribute it and/or modify
00007 // it under the terms of the GNU General Public License, Version 2, June
00008 // 1991 as published by the Free Software Foundation. Redistribution
00009 // and/or modification of this program under the terms of any other
00010 // version of the GNU General Public License is not permitted.
00011 // 
00012 // This program is distributed in the hope that it will be useful, but
00013 // WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For more details,
00015 // see the GNU General Public License, Version 2, a copy of which can be
00016 // found in the XORP LICENSE.gpl file.
00017 // 
00018 // XORP Inc, 2953 Bunker Hill Lane, Suite 204, Santa Clara, CA 95054, USA;
00019 // http://xorp.net
00020 
00021 // $XORP: xorp/ospf/xrl_target.hh,v 1.46 2008/10/02 21:57:50 bms Exp $
00022 
00023 #ifndef __OSPF_XRL_TARGET3_HH__
00024 #define __OSPF_XRL_TARGET3_HH__
00025 
00026 #ifdef HAVE_IPV6
00027 #include "xrl/targets/ospfv3_base.hh"
00028 
00029 #include "ospf.hh"
00030 
00031 class XrlOspfV3Target : XrlOspfv3TargetBase {
00032  public:
00033     XrlOspfV3Target(XrlRouter *r,
00034             /* Ospf<IPv4>& ospf_ipv4, */
00035             Ospf<IPv6>& ospf_ipv6,
00036             /* XrlIO<IPv4>& io_ipv4, */
00037             XrlIO<IPv6>& io_ipv6);
00038 
00042     XrlCmdError common_0_1_get_target_name(
00043     // Output values,
00044     string& name);
00045 
00049     XrlCmdError common_0_1_get_version(
00050     // Output values,
00051     string& version);
00052 
00056     XrlCmdError common_0_1_get_status(
00057     // Output values,
00058     uint32_t&   status,
00059     string& reason);
00060 
00064     XrlCmdError common_0_1_shutdown();
00065 
00066     XrlCmdError common_0_1_startup();
00067 
00092     XrlCmdError raw_packet4_client_0_1_recv(
00093     // Input values,
00094     const string&   if_name,
00095     const string&   vif_name,
00096     const IPv4& src_address,
00097     const IPv4& dst_address,
00098     const uint32_t& ip_protocol,
00099     const int32_t&  ip_ttl,
00100     const int32_t&  ip_tos,
00101     const bool& ip_router_alert,
00102     const bool& ip_internet_control,
00103     const vector<uint8_t>&  payload);
00104 
00136     XrlCmdError raw_packet6_client_0_1_recv(
00137     // Input values,
00138     const string&   if_name,
00139     const string&   vif_name,
00140     const IPv6& src_address,
00141     const IPv6& dst_address,
00142     const uint32_t& ip_protocol,
00143     const int32_t&  ip_ttl,
00144     const int32_t&  ip_tos,
00145     const bool& ip_router_alert,
00146     const bool& ip_internet_control,
00147     const XrlAtomList&  ext_headers_type,
00148     const XrlAtomList&  ext_headers_payload,
00149     const vector<uint8_t>&  payload);
00150 
00160     XrlCmdError policy_backend_0_1_configure(
00161     // Input values,
00162     const uint32_t& filter,
00163     const string&   conf);
00164 
00168     XrlCmdError policy_backend_0_1_reset(
00169     // Input values,
00170     const uint32_t& filter);
00171 
00175     XrlCmdError policy_backend_0_1_push_routes();
00176 
00192     XrlCmdError policy_redist6_0_1_add_route6(
00193     // Input values,
00194     const IPv6Net&  network,
00195     const bool& unicast,
00196     const bool& multicast,
00197     const IPv6& nexthop,
00198     const uint32_t& metric,
00199     const XrlAtomList&  policytags);
00200 
00210     XrlCmdError policy_redist6_0_1_delete_route6(
00211     // Input values,
00212     const IPv6Net&  network,
00213     const bool& unicast,
00214     const bool& multicast);
00215 
00219     XrlCmdError ospfv3_0_1_set_instance_id(
00220     // Input values,
00221     const uint32_t& id);
00222 
00226     XrlCmdError ospfv3_0_1_set_router_id(
00227     // Input values,
00228     const IPv4& id);
00229 
00233     XrlCmdError ospfv3_0_1_set_ip_router_alert(
00234     // Input values,
00235     const bool& ip_router_alert);
00236 
00240     XrlCmdError ospfv3_0_1_create_area_router(
00241     // Input values,
00242     const IPv4& area,
00243     const string&   type);
00244 
00252     XrlCmdError ospfv3_0_1_change_area_router_type(
00253     // Input values,
00254     const IPv4& area,
00255     const string&   type);
00256 
00260     XrlCmdError ospfv3_0_1_destroy_area_router(
00261     // Input values,
00262     const IPv4& area);
00263 
00273     XrlCmdError ospfv3_0_1_create_peer(
00274     // Input values,
00275     const string&   ifname,
00276     const string&   vifname,
00277     const string&   type,
00278     const IPv4& area);
00279 
00283     XrlCmdError ospfv3_0_1_delete_peer(
00284     // Input values,
00285     const string&   ifname,
00286     const string&   vifname);
00287 
00291     XrlCmdError ospfv3_0_1_set_peer_state(
00292     // Input values,
00293     const string&   ifname,
00294     const string&   vifname,
00295     const bool& enable);
00296 
00300     XrlCmdError ospfv3_0_1_add_address_peer(
00301     // Input values,
00302     const string&   ifname,
00303     const string&   vifname,
00304     const IPv4& area,
00305     const IPv6& addr);
00306 
00310     XrlCmdError ospfv3_0_1_remove_address_peer(
00311     // Input values,
00312     const string&   ifname,
00313     const string&   vifname,
00314     const IPv4& area,
00315     const IPv6& addr);
00316 
00320     XrlCmdError ospfv3_0_1_set_address_state_peer(
00321     // Input values,
00322     const string&   ifname,
00323     const string&   vifname,
00324     const IPv4& area,
00325     const IPv6& addr,
00326     const bool& enable);
00327 
00332     XrlCmdError ospfv3_0_1_activate_peer(
00333     // Input values,
00334     const string&   ifname,
00335     const string&   vifname,
00336     const IPv4& area);
00337 
00341     XrlCmdError ospfv3_0_1_update_peer(
00342     // Input values,
00343     const string&   ifname,
00344     const string&   vifname,
00345     const IPv4& area);
00346 
00350     XrlCmdError ospfv3_0_1_add_neighbour(
00351     // Input values,
00352     const string&   ifname,
00353     const string&   vifname,
00354     const IPv4& area,
00355     const IPv6& neighbour_address,
00356     const IPv4& neighbour_id);
00357 
00361     XrlCmdError ospfv3_0_1_remove_neighbour(
00362     // Input values,
00363     const string&   ifname,
00364     const string&   vifname,
00365     const IPv4& area,
00366     const IPv6& neighbour_address,
00367     const IPv4& neighbour_id);
00368 
00378     XrlCmdError ospfv3_0_1_create_virtual_link(
00379     // Input values,
00380     const IPv4& neighbour_id,
00381     const IPv4& area);
00382 
00388     XrlCmdError ospfv3_0_1_delete_virtual_link(
00389     // Input values,
00390     const IPv4& neighbour_id);
00391 
00399     XrlCmdError ospfv3_0_1_transit_area_virtual_link(
00400     // Input values,
00401     const IPv4& neighbour_id,
00402     const IPv4& transit_area);
00403 
00407     XrlCmdError ospfv3_0_1_set_interface_cost(
00408     // Input values,
00409     const string&   ifname,
00410     const string&   vifname,
00411     const IPv4& area,
00412     const uint32_t& cost);
00413 
00417     XrlCmdError ospfv3_0_1_set_retransmit_interval(
00418     // Input values,
00419     const string&   ifname,
00420     const string&   vifname,
00421     const IPv4& area,
00422     const uint32_t& interval);
00423 
00429     XrlCmdError ospfv3_0_1_set_inftransdelay(
00430     // Input values,
00431     const string&   ifname,
00432     const string&   vifname,
00433     const IPv4& area,
00434     const uint32_t& delay);
00435 
00439     XrlCmdError ospfv3_0_1_set_router_priority(
00440     // Input values,
00441     const string&   ifname,
00442     const string&   vifname,
00443     const IPv4& area,
00444     const uint32_t& interval);
00445 
00449     XrlCmdError ospfv3_0_1_set_hello_interval(
00450     // Input values,
00451     const string&   ifname,
00452     const string&   vifname,
00453     const IPv4& area,
00454     const uint32_t& interval);
00455 
00459     XrlCmdError ospfv3_0_1_set_router_dead_interval(
00460     // Input values,
00461     const string&   ifname,
00462     const string&   vifname,
00463     const IPv4& area,
00464     const uint32_t& interval);
00465 
00469     XrlCmdError ospfv3_0_1_set_passive(
00470     // Input values,
00471     const string&   ifname,
00472     const string&   vifname,
00473     const IPv4& area,
00474     const bool& passive);
00475 
00480     XrlCmdError ospfv3_0_1_originate_default_route(
00481     // Input values,
00482     const IPv4& area,
00483     const bool& enable);
00484 
00489     XrlCmdError ospfv3_0_1_stub_default_cost(
00490     // Input values,
00491     const IPv4& area,
00492     const uint32_t& cost);
00493 
00497     XrlCmdError ospfv3_0_1_summaries(
00498     // Input values,
00499     const IPv4& area,
00500     const bool& enable);
00501 
00505     XrlCmdError ospfv3_0_1_area_range_add(
00506     // Input values,
00507     const IPv4& area,
00508     const IPv6Net&  net,
00509     const bool& advertise);
00510 
00514     XrlCmdError ospfv3_0_1_area_range_delete(
00515     // Input values,
00516     const IPv4& area,
00517     const IPv6Net&  net);
00518 
00522     XrlCmdError ospfv3_0_1_area_range_change_state(
00523     // Input values,
00524     const IPv4& area,
00525     const IPv6Net&  net,
00526     const bool& advertise);
00527 
00535     XrlCmdError ospfv3_0_1_trace(
00536     // Input values,
00537     const string&   tvar,
00538     const bool& enable);
00539 
00558     XrlCmdError ospfv3_0_1_get_lsa(
00559     // Input values,
00560     const IPv4& area,
00561     const uint32_t& index,
00562     // Output values,
00563     bool&   valid,
00564     bool&   toohigh,
00565     bool&   self,
00566     vector<uint8_t>&    lsa);
00567 
00571     XrlCmdError ospfv3_0_1_get_area_list(XrlAtomList& areas);
00572 
00576     XrlCmdError ospfv3_0_1_get_neighbour_list(
00577     // Output values,
00578     XrlAtomList&    areas);
00579 
00609     XrlCmdError ospfv3_0_1_get_neighbour_info(
00610     // Input values,
00611     const uint32_t& nid,
00612     // Output values,
00613     string& address,
00614     string& interface,
00615     string& state,
00616     IPv4&   rid,
00617     uint32_t& priority,
00618     uint32_t& deadtime,
00619     IPv4&   area,
00620     uint32_t&   opt,
00621     IPv4&   dr,
00622     IPv4&   bdr,
00623     uint32_t&   up,
00624     uint32_t&   adjacent);
00625 
00629     XrlCmdError ospfv3_0_1_clear_database();
00630 
00631  private:
00632 //     Ospf<IPv4>& _ospf_ipv4;
00633     Ospf<IPv6>& _ospf_ipv6;
00634 //     XrlIO<IPv4>& _xrl_io_ipv4;
00635     XrlIO<IPv6>& _xrl_io_ipv6;
00636 };
00637 
00638 
00639 #endif // ipv6
00640 #endif // target3
 All Classes Namespaces Functions Variables Typedefs Enumerations