xorp

xrl_target.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_TARGET_HH__
00024 #define __OSPF_XRL_TARGET_HH__
00025 
00026 #include "xrl/targets/ospfv2_base.hh"
00027 
00028 #include "ospf.hh"
00029 
00030 class XrlOspfV2Target : XrlOspfv2TargetBase {
00031  public:
00032     XrlOspfV2Target(XrlRouter *r, Ospf<IPv4>& ospf, XrlIO<IPv4>& io);
00033 
00037     XrlCmdError common_0_1_get_target_name(
00038     // Output values,
00039     string& name);
00040 
00044     XrlCmdError common_0_1_get_version(
00045     // Output values,
00046     string& version);
00047 
00051     XrlCmdError common_0_1_get_status(
00052     // Output values,
00053     uint32_t&   status,
00054     string& reason);
00055 
00059     XrlCmdError common_0_1_shutdown();
00060 
00061     XrlCmdError common_0_1_startup();
00062 
00087     XrlCmdError raw_packet4_client_0_1_recv(
00088     // Input values,
00089     const string&   if_name,
00090     const string&   vif_name,
00091     const IPv4& src_address,
00092     const IPv4& dst_address,
00093     const uint32_t& ip_protocol,
00094     const int32_t&  ip_ttl,
00095     const int32_t&  ip_tos,
00096     const bool& ip_router_alert,
00097     const bool& ip_internet_control,
00098     const vector<uint8_t>&  payload);
00099 
00107     XrlCmdError policy_backend_0_1_configure(
00108     // Input values,
00109     const uint32_t& filter,
00110     const string&   conf);
00111 
00117     XrlCmdError policy_backend_0_1_reset(
00118     // Input values,
00119     const uint32_t& filter);
00120 
00124     XrlCmdError policy_backend_0_1_push_routes();
00125 
00141     XrlCmdError policy_redist4_0_1_add_route4(
00142     // Input values,
00143     const IPv4Net&  network,
00144     const bool& unicast,
00145     const bool& multicast,
00146     const IPv4& nexthop,
00147     const uint32_t& metric,
00148     const XrlAtomList&  policytags);
00149 
00159     XrlCmdError policy_redist4_0_1_delete_route4(
00160     // Input values,
00161     const IPv4Net&  network,
00162     const bool& unicast,
00163     const bool& multicast);
00164 
00168     XrlCmdError ospfv2_0_1_set_router_id(
00169     // Input values,
00170     const IPv4& id);
00171 
00175     XrlCmdError ospfv2_0_1_set_rfc1583_compatibility(
00176     // Input values,
00177     const bool& compatibility);
00178 
00182     XrlCmdError ospfv2_0_1_set_ip_router_alert(
00183     // Input values,
00184     const bool& ip_router_alert);
00185 
00189     XrlCmdError ospfv2_0_1_create_area_router(
00190     // Input values,
00191     const IPv4& area,
00192     const string&   type);
00193 
00201     XrlCmdError ospfv2_0_1_change_area_router_type(
00202     // Input values,
00203     const IPv4& area,
00204     const string&   type);
00205 
00209     XrlCmdError ospfv2_0_1_destroy_area_router(
00210     // Input values,
00211     const IPv4& area);
00212 
00224     XrlCmdError ospfv2_0_1_create_peer(
00225     // Input values,
00226     const string&   ifname,
00227     const string&   vifname,
00228     const IPv4& addr,
00229     const string&   type,
00230     const IPv4& area);
00231 
00235     XrlCmdError ospfv2_0_1_delete_peer(
00236     // Input values,
00237     const string&   ifname,
00238     const string&   vifname);
00239 
00243     XrlCmdError ospfv2_0_1_set_peer_state(
00244     // Input values,
00245     const string&   ifname,
00246     const string&   vifname,
00247     const bool& enable);
00248 
00252     XrlCmdError ospfv2_0_1_add_neighbour(
00253     // Input values,
00254     const string&   ifname,
00255     const string&   vifname,
00256     const IPv4& area,
00257     const IPv4& neighbour_address,
00258     const IPv4& neighbour_id);
00259 
00263     XrlCmdError ospfv2_0_1_remove_neighbour(
00264     // Input values,
00265     const string&   ifname,
00266     const string&   vifname,
00267     const IPv4& area,
00268     const IPv4& neighbour_address,
00269     const IPv4& neighbour_id);
00270 
00280     XrlCmdError ospfv2_0_1_create_virtual_link(
00281     // Input values,
00282     const IPv4& neighbour_id,
00283     const IPv4& area);
00284 
00290     XrlCmdError ospfv2_0_1_delete_virtual_link(
00291     // Input values,
00292     const IPv4& neighbour_id);
00293 
00301     XrlCmdError ospfv2_0_1_transit_area_virtual_link(
00302     // Input values,
00303     const IPv4& neighbour_id,
00304     const IPv4& transit_area);
00305 
00309     XrlCmdError ospfv2_0_1_set_interface_cost(
00310     // Input values,
00311     const string&   ifname,
00312     const string&   vifname,
00313     const IPv4& area,
00314     const uint32_t& cost);
00315 
00319     XrlCmdError ospfv2_0_1_set_retransmit_interval(
00320     // Input values,
00321     const string&   ifname,
00322     const string&   vifname,
00323     const IPv4& area,
00324     const uint32_t& interval);
00325 
00331     XrlCmdError ospfv2_0_1_set_inftransdelay(
00332     // Input values,
00333     const string&   ifname,
00334     const string&   vifname,
00335     const IPv4& area,
00336     const uint32_t& delay);
00337 
00341     XrlCmdError ospfv2_0_1_set_router_priority(
00342     // Input values,
00343     const string&   ifname,
00344     const string&   vifname,
00345     const IPv4& area,
00346     const uint32_t& interval);
00347 
00351     XrlCmdError ospfv2_0_1_set_hello_interval(
00352     // Input values,
00353     const string&   ifname,
00354     const string&   vifname,
00355     const IPv4& area,
00356     const uint32_t& interval);
00357 
00361     XrlCmdError ospfv2_0_1_set_router_dead_interval(
00362     // Input values,
00363     const string&   ifname,
00364     const string&   vifname,
00365     const IPv4& area,
00366     const uint32_t& interval);
00367 
00379     XrlCmdError ospfv2_0_1_set_simple_authentication_key(
00380     // Input values,
00381     const string&   ifname,
00382     const string&   vifname,
00383     const IPv4& area,
00384     const string&   password);
00385 
00395     XrlCmdError ospfv2_0_1_delete_simple_authentication_key(
00396     // Input values,
00397     const string&   ifname,
00398     const string&   vifname,
00399     const IPv4& area);
00400 
00422     XrlCmdError ospfv2_0_1_set_md5_authentication_key(
00423     // Input values,
00424     const string&   ifname,
00425     const string&   vifname,
00426     const IPv4& area,
00427     const uint32_t& key_id,
00428     const string&   password,
00429     const string&   start_time,
00430     const string&   end_time,
00431     const uint32_t& max_time_drift);
00432 
00444     XrlCmdError ospfv2_0_1_delete_md5_authentication_key(
00445     // Input values,
00446     const string&   ifname,
00447     const string&   vifname,
00448     const IPv4& area,
00449     const uint32_t& key_id);
00450 
00454     XrlCmdError ospfv2_0_1_set_passive(
00455     // Input values,
00456     const string&   ifname,
00457     const string&   vifname,
00458     const IPv4& area,
00459     const bool& passive,
00460     const bool& host);
00461 
00466     XrlCmdError ospfv2_0_1_originate_default_route(
00467     // Input values,
00468     const IPv4& area,
00469     const bool& enable);
00470 
00475     XrlCmdError ospfv2_0_1_stub_default_cost(
00476     // Input values,
00477     const IPv4& area,
00478     const uint32_t& cost);
00479 
00483     XrlCmdError ospfv2_0_1_summaries(
00484     // Input values,
00485     const IPv4& area,
00486     const bool& enable);
00487 
00491     XrlCmdError ospfv2_0_1_area_range_add(
00492     // Input values,
00493     const IPv4& area,
00494     const IPv4Net&  net,
00495     const bool& advertise);
00496 
00500     XrlCmdError ospfv2_0_1_area_range_delete(
00501     // Input values,
00502     const IPv4& area,
00503     const IPv4Net&  net);
00504 
00508     XrlCmdError ospfv2_0_1_area_range_change_state(
00509     // Input values,
00510     const IPv4& area,
00511     const IPv4Net&  net,
00512     const bool& advertise);
00513 
00521     XrlCmdError ospfv2_0_1_trace(
00522     // Input values,
00523     const string&   tvar,
00524     const bool& enable);
00525 
00544     XrlCmdError ospfv2_0_1_get_lsa(
00545     // Input values,
00546     const IPv4& area,
00547     const uint32_t& index,
00548     // Output values,
00549     bool&   valid,
00550     bool&   toohigh,
00551     bool&   self,
00552     vector<uint8_t>&    lsa);
00553 
00557     XrlCmdError ospfv2_0_1_get_area_list(XrlAtomList& areas);
00558 
00562     XrlCmdError ospfv2_0_1_get_neighbour_list(
00563     // Output values,
00564     XrlAtomList&    areas);
00565 
00595     XrlCmdError ospfv2_0_1_get_neighbour_info(
00596     // Input values,
00597     const uint32_t& nid,
00598     // Output values,
00599     string& address,
00600     string& interface,
00601     string& state,
00602     IPv4&   rid,
00603     uint32_t& priority,
00604     uint32_t& deadtime,
00605     IPv4&   area,
00606     uint32_t&   opt,
00607     IPv4&   dr,
00608     IPv4&   bdr,
00609     uint32_t&   up,
00610     uint32_t&   adjacent);
00611 
00615     XrlCmdError ospfv2_0_1_clear_database();
00616 
00617  private:
00618     Ospf<IPv4>& _ospf;
00619     XrlIO<IPv4>& _xrl_io;
00620 };
00621 
00622 #endif // __OSPF_XRL_TARGET_HH__
 All Classes Namespaces Functions Variables Typedefs Enumerations