xorp

xrl_fea_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) 2007-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 
00022 #ifndef __FEA_XRL_FEA_TARGET_HH__
00023 #define __FEA_XRL_FEA_TARGET_HH__
00024 
00025 
00026 //
00027 // FEA (Forwarding Engine Abstraction) XRL target implementation.
00028 //
00029 
00030 #include "xrl/targets/fea_base.hh"
00031 #include "xrl_fib_client_manager.hh"
00032 
00033 class EventLoop;
00034 #ifdef XORP_USE_CLICK
00035 class FeaDataPlaneManagerClick;
00036 #endif
00037 class FeaNode;
00038 class FibConfig;
00039 class FirewallManager;
00040 class IfConfig;
00041 class IoLinkManager;
00042 class IoIpManager;
00043 class IoTcpUdpManager;
00044 class LibFeaClientBridge;
00045 class XrlFibClientManager;
00046 #ifndef XORP_DISABLE_PROFILE
00047 class Profile;
00048 #endif
00049 
00053 class XrlFeaTarget : public XrlFeaTargetBase {
00054 public:
00060     XrlFeaTarget(EventLoop&     eventloop,
00061          FeaNode&       fea_node,
00062          XrlRouter&     xrl_router,
00063 #ifndef XORP_DISABLE_PROFILE
00064          Profile&       profile,
00065 #endif
00066          XrlFibClientManager&   xrl_fib_client_manager,
00067          LibFeaClientBridge&    lib_fea_client_bridge);
00068 
00072     virtual ~XrlFeaTarget();
00073 
00079     int     startup();
00080 
00086     int     shutdown();
00087 
00093     bool    is_running() const;
00094 
00100     bool    is_shutdown_received() const { return (_is_shutdown_received); }
00101 
00107     EventLoop&  eventloop() { return (_eventloop); }
00108 
00109     XrlCmdError common_0_1_get_target_name(
00110     // Output values,
00111     string& name);
00112 
00113     XrlCmdError common_0_1_get_version(
00114     // Output values,
00115     string& version);
00116 
00120     XrlCmdError common_0_1_get_status(
00121     // Output values,
00122         uint32_t& status,
00123     string& reason);
00124 
00128     XrlCmdError common_0_1_shutdown();
00129 
00130     XrlCmdError common_0_1_startup() { return XrlCmdError::OKAY(); }
00131 
00133     virtual XrlCmdError ifmgr_0_1_startup_ifmgr();
00134 
00142     XrlCmdError finder_event_observer_0_1_xrl_target_birth(
00143     // Input values,
00144     const string&   target_class,
00145     const string&   target_instance);
00146 
00154     XrlCmdError finder_event_observer_0_1_xrl_target_death(
00155     // Input values,
00156     const string&   target_class,
00157     const string&   target_instance);
00158 
00159 #ifdef XORP_USE_CLICK
00160 
00163     XrlCmdError fea_click_0_1_load_click();
00164 
00168     XrlCmdError fea_click_0_1_unload_click();
00169 
00176     XrlCmdError fea_click_0_1_enable_click(
00177     // Input values,
00178     const bool& enable);
00179 
00183     XrlCmdError fea_click_0_1_start_click();
00184 
00188     XrlCmdError fea_click_0_1_stop_click();
00189 
00196     XrlCmdError fea_click_0_1_enable_duplicate_routes_to_kernel(
00197     // Input values,
00198     const bool& enable);
00199 
00206     XrlCmdError fea_click_0_1_enable_kernel_click(
00207     // Input values,
00208     const bool& enable);
00209 
00215     XrlCmdError fea_click_0_1_enable_kernel_click_install_on_startup(
00216     // Input values,
00217     const bool& enable);
00218 
00227     XrlCmdError fea_click_0_1_set_kernel_click_modules(
00228     // Input values,
00229     const string&   modules);
00230 
00236     XrlCmdError fea_click_0_1_set_kernel_click_mount_directory(
00237     // Input values,
00238     const string&   directory);
00239 
00247     XrlCmdError fea_click_0_1_set_kernel_click_config_generator_file(
00248     // Input values,
00249     const string&   kernel_click_config_generator_file);
00250 
00257     XrlCmdError fea_click_0_1_enable_user_click(
00258     // Input values,
00259     const bool& enable);
00260 
00267     XrlCmdError fea_click_0_1_set_user_click_command_file(
00268     // Input values,
00269     const string&   user_click_command_file);
00270 
00277     XrlCmdError fea_click_0_1_set_user_click_command_extra_arguments(
00278     // Input values,
00279     const string&   user_click_command_extra_arguments);
00280 
00287     XrlCmdError fea_click_0_1_set_user_click_command_execute_on_startup(
00288     // Input values,
00289     const bool& user_click_command_execute_on_startup);
00290 
00298     XrlCmdError fea_click_0_1_set_user_click_control_socket_port(
00299     // Input values,
00300     const uint32_t& user_click_control_socket_port);
00301 
00309     XrlCmdError fea_click_0_1_set_user_click_control_address(
00310     // Input values,
00311     const IPv4& user_click_control_address);
00312 
00320     XrlCmdError fea_click_0_1_set_user_click_startup_config_file(
00321     // Input values,
00322     const string&   user_click_startup_config_file);
00323 
00331     XrlCmdError fea_click_0_1_set_user_click_config_generator_file(
00332     // Input values,
00333     const string&   user_click_config_generator_file);
00334 
00335 #endif // click
00336 
00344     XrlCmdError fea_fib_0_1_add_fib_client4(
00345     // Input values,
00346     const string&   client_target_name,
00347     const bool& send_updates,
00348     const bool& send_resolves);
00349 
00355     XrlCmdError fea_fib_0_1_delete_fib_client4(
00356     // Input values,
00357     const string&   client_target_name);
00358 
00359 
00360 #ifdef HAVE_IPV6
00361     XrlCmdError fea_fib_0_1_add_fib_client6(
00362     // Input values,
00363     const string&   client_target_name,
00364     const bool& send_updates,
00365     const bool& send_resolves);
00366 
00367     XrlCmdError fea_fib_0_1_delete_fib_client6(
00368     // Input values,
00369     const string&   client_target_name);
00370 #endif
00371 
00372 #ifndef XORP_DISABLE_FIREWALL
00373     //
00374     // FEA firewall interface
00375     //
00376 
00378     virtual XrlCmdError fea_firewall_0_1_startup_firewall();
00379 
00380 
00386     XrlCmdError fea_firewall_0_1_start_transaction(
00387     // Output values,
00388     uint32_t&   tid);
00389 
00395     XrlCmdError fea_firewall_0_1_commit_transaction(
00396     // Input values,
00397     const uint32_t& tid);
00398 
00404     XrlCmdError fea_firewall_0_1_abort_transaction(
00405     // Input values,
00406     const uint32_t& tid);
00407 
00437     XrlCmdError fea_firewall_0_1_add_entry4(
00438     // Input values,
00439     const uint32_t& tid,
00440     const uint32_t& rule_number,
00441     const string&   ifname,
00442     const string&   vifname,
00443     const IPv4Net&  src_network,
00444     const IPv4Net&  dst_network,
00445     const uint32_t& ip_protocol,
00446     const uint32_t& src_port_begin,
00447     const uint32_t& src_port_end,
00448     const uint32_t& dst_port_begin,
00449     const uint32_t& dst_port_end,
00450     const string&   action);
00451 
00481     XrlCmdError fea_firewall_0_1_replace_entry4(
00482     // Input values,
00483     const uint32_t& tid,
00484     const uint32_t& rule_number,
00485     const string&   ifname,
00486     const string&   vifname,
00487     const IPv4Net&  src_network,
00488     const IPv4Net&  dst_network,
00489     const uint32_t& ip_protocol,
00490     const uint32_t& src_port_begin,
00491     const uint32_t& src_port_end,
00492     const uint32_t& dst_port_begin,
00493     const uint32_t& dst_port_end,
00494     const string&   action);
00495 
00522     XrlCmdError fea_firewall_0_1_delete_entry4(
00523     // Input values,
00524     const uint32_t& tid,
00525     const uint32_t& rule_number,
00526     const string&   ifname,
00527     const string&   vifname,
00528     const IPv4Net&  src_network,
00529     const IPv4Net&  dst_network,
00530     const uint32_t& ip_protocol,
00531     const uint32_t& src_port_begin,
00532     const uint32_t& src_port_end,
00533     const uint32_t& dst_port_begin,
00534     const uint32_t& dst_port_end);
00535 
00541     XrlCmdError fea_firewall_0_1_delete_all_entries4(
00542     // Input values,
00543     const uint32_t& tid);
00544 
00552     XrlCmdError fea_firewall_0_1_get_entry_list_start4(
00553     // Output values,
00554     uint32_t&   token,
00555     bool&       more);
00556 
00587     XrlCmdError fea_firewall_0_1_get_entry_list_next4(
00588     // Input values,
00589     const uint32_t& token,
00590     // Output values,
00591     uint32_t&   rule_number,
00592     string&     ifname,
00593     string&     vifname,
00594     IPv4Net&    src_network,
00595     IPv4Net&    dst_network,
00596     uint32_t&   ip_protocol,
00597     uint32_t&   src_port_begin,
00598     uint32_t&   src_port_end,
00599     uint32_t&   dst_port_begin,
00600     uint32_t&   dst_port_end,
00601     string&     action,
00602     bool&       more);
00603 
00604 #ifdef HAVE_IPV6
00605 
00635     XrlCmdError fea_firewall_0_1_add_entry6(
00636     // Input values,
00637     const uint32_t& tid,
00638     const uint32_t& rule_number,
00639     const string&   ifname,
00640     const string&   vifname,
00641     const IPv6Net&  src_network,
00642     const IPv6Net&  dst_network,
00643     const uint32_t& ip_protocol,
00644     const uint32_t& src_port_begin,
00645     const uint32_t& src_port_end,
00646     const uint32_t& dst_port_begin,
00647     const uint32_t& dst_port_end,
00648     const string&   action);
00649 
00679     XrlCmdError fea_firewall_0_1_replace_entry6(
00680     // Input values,
00681     const uint32_t& tid,
00682     const uint32_t& rule_number,
00683     const string&   ifname,
00684     const string&   vifname,
00685     const IPv6Net&  src_network,
00686     const IPv6Net&  dst_network,
00687     const uint32_t& ip_protocol,
00688     const uint32_t& src_port_begin,
00689     const uint32_t& src_port_end,
00690     const uint32_t& dst_port_begin,
00691     const uint32_t& dst_port_end,
00692     const string&   action);
00693 
00720     XrlCmdError fea_firewall_0_1_delete_entry6(
00721     // Input values,
00722     const uint32_t& tid,
00723     const uint32_t& rule_number,
00724     const string&   ifname,
00725     const string&   vifname,
00726     const IPv6Net&  src_network,
00727     const IPv6Net&  dst_network,
00728     const uint32_t& ip_protocol,
00729     const uint32_t& src_port_begin,
00730     const uint32_t& src_port_end,
00731     const uint32_t& dst_port_begin,
00732     const uint32_t& dst_port_end);
00733 
00739     XrlCmdError fea_firewall_0_1_delete_all_entries6(
00740     // Input values,
00741     const uint32_t& tid);
00742 
00750     XrlCmdError fea_firewall_0_1_get_entry_list_start6(
00751     // Output values,
00752     uint32_t&   token,
00753     bool&       more);
00754 
00785     XrlCmdError fea_firewall_0_1_get_entry_list_next6(
00786     // Input values,
00787     const uint32_t& token,
00788     // Output values,
00789     uint32_t&   rule_number,
00790     string&     ifname,
00791     string&     vifname,
00792     IPv6Net&    src_network,
00793     IPv6Net&    dst_network,
00794     uint32_t&   ip_protocol,
00795     uint32_t&   src_port_begin,
00796     uint32_t&   src_port_end,
00797     uint32_t&   dst_port_begin,
00798     uint32_t&   dst_port_end,
00799     string&     action,
00800     bool&       more);
00801 #endif //ipv6
00802 #endif //firewall
00803 
00804 
00805     //
00806     // FEA network interface management interface
00807     //
00808 
00809     XrlCmdError ifmgr_0_1_set_restore_original_config_on_shutdown(
00810     // Input values,
00811     const bool& enable);
00812 
00813     XrlCmdError ifmgr_0_1_get_configured_interface_names(
00814     // Output values,
00815     XrlAtomList&    ifnames);
00816 
00817     XrlCmdError ifmgr_0_1_get_configured_vif_names(
00818     const string&   ifname,
00819     // Output values,
00820     XrlAtomList&        vifs);
00821 
00822     XrlCmdError ifmgr_0_1_get_configured_vif_flags(
00823     // Input values,
00824     const string&   ifname,
00825     const string&   vif,
00826     // Output values,
00827     bool&   enabled,
00828     bool&   broadcast,
00829     bool&   loopback,
00830     bool&   point_to_point,
00831     bool&   multicast);
00832 
00833     XrlCmdError ifmgr_0_1_get_configured_vif_pif_index(
00834     // Input values,
00835     const string&   ifname,
00836     const string&   vif,
00837     // Output values,
00838     uint32_t&   pif_index);
00839 
00840     XrlCmdError ifmgr_0_1_start_transaction(
00841     // Output values,
00842     uint32_t&   tid);
00843 
00844     XrlCmdError ifmgr_0_1_commit_transaction(
00845     // Input values,
00846     const uint32_t& tid);
00847 
00848     XrlCmdError ifmgr_0_1_abort_transaction(
00849     // Input values,
00850     const uint32_t& tid);
00851 
00852     XrlCmdError ifmgr_0_1_create_interface(
00853     // Input values,
00854     const uint32_t& tid,
00855     const string&   ifname);
00856 
00857     XrlCmdError ifmgr_0_1_delete_interface(
00858     // Input values,
00859     const uint32_t& tid,
00860     const string&   ifname);
00861 
00870     XrlCmdError ifmgr_0_1_configure_all_interfaces_from_system(
00871     // Input values,
00872     const uint32_t& tid,
00873     const bool& enable);
00874 
00884     XrlCmdError ifmgr_0_1_configure_interface_from_system(
00885     // Input values,
00886     const uint32_t& tid,
00887     const string&   ifname,
00888     const bool& enable);
00889 
00890     XrlCmdError ifmgr_0_1_set_interface_enabled(
00891     // Input values,
00892     const uint32_t& tid,
00893     const string&   ifname,
00894     const bool& enabled);
00895 
00896     XrlCmdError ifmgr_0_1_get_configured_interface_enabled(
00897     // Input values,
00898     const string&   ifname,
00899     // Output values,
00900     bool&       enabled);
00901 
00902     XrlCmdError ifmgr_0_1_set_interface_discard(
00903     // Input values,
00904     const uint32_t& tid,
00905     const string&   ifname,
00906     const bool& discard);
00907 
00908     XrlCmdError ifmgr_0_1_get_configured_interface_discard(
00909     // Input values,
00910     const string&   ifname,
00911     // Output values,
00912     bool&       discard);
00913 
00914     XrlCmdError ifmgr_0_1_set_interface_unreachable(
00915     // Input values,
00916     const uint32_t& tid,
00917     const string&   ifname,
00918     const bool& unreachable);
00919 
00920     XrlCmdError ifmgr_0_1_get_configured_interface_unreachable(
00921     // Input values,
00922     const string&   ifname,
00923     // Output values,
00924     bool&       unreachable);
00925 
00926     XrlCmdError ifmgr_0_1_set_interface_management(
00927     // Input values,
00928     const uint32_t& tid,
00929     const string&   ifname,
00930     const bool& management);
00931 
00932     XrlCmdError ifmgr_0_1_get_configured_interface_management(
00933     // Input values,
00934     const string&   ifname,
00935     // Output values,
00936     bool&       management);
00937 
00938     XrlCmdError ifmgr_0_1_set_mac(
00939     // Input values,
00940     const uint32_t& tid,
00941     const string&   ifname,
00942     const Mac&  mac);
00943 
00944     XrlCmdError ifmgr_0_1_create_mac(
00945         // Input values,
00946         const string&   ifname,
00947         const Mac&      mac);
00948 
00949     
00950     XrlCmdError ifmgr_0_1_create_address_atomic(
00951     // Input values,
00952     const string&   ifname,
00953     const string&   vifname,
00954     const IPv4& ip,
00955     const uint32_t& prefix_length);
00956 
00957     XrlCmdError ifmgr_0_1_delete_address_atomic(
00958     // Input values,
00959     const string&   ifname,
00960     const string&   vifname,
00961     const IPv4& ip);
00962 
00963     XrlCmdError ifmgr_0_1_delete_mac(
00964         // Input values,
00965         const string&   ifname,
00966         const Mac&      mac);
00967 
00968     XrlCmdError ifmgr_0_1_restore_original_mac(
00969     // Input values,
00970     const uint32_t& tid,
00971     const string&   ifname);
00972 
00973     XrlCmdError ifmgr_0_1_get_configured_mac(
00974     // Input values,
00975     const string&   ifname,
00976     // Output values,
00977     Mac&    mac);
00978 
00979     XrlCmdError ifmgr_0_1_set_mtu(
00980     // Input values,
00981     const uint32_t& tid,
00982     const string&   ifname,
00983     const uint32_t& mtu);
00984 
00985     XrlCmdError ifmgr_0_1_restore_original_mtu(
00986     // Input values,
00987     const uint32_t& tid,
00988     const string&   ifname);
00989 
00990     XrlCmdError ifmgr_0_1_get_configured_mtu(
00991     // Input values,
00992     const string&   ifname,
00993     // Output values,
00994     uint32_t&   mtu);
00995 
00996     XrlCmdError ifmgr_0_1_get_configured_no_carrier(
00997     // Input values,
00998     const string&   ifname,
00999     // Output values,
01000     bool&       no_carrier);
01001 
01002     XrlCmdError ifmgr_0_1_get_configured_baudrate(
01003     // Input values,
01004     const string&   ifname,
01005     // Output values,
01006     uint64_t&   baudrate);
01007 
01008     XrlCmdError ifmgr_0_1_get_configured_address_flags4(
01009     // Input values,
01010     const string& ifname,
01011     const string& vif,
01012     const IPv4&   address,
01013     // Output values,
01014     bool& up,
01015     bool& broadcast,
01016     bool& loopback,
01017     bool& point_to_point,
01018     bool& multicast);
01019 
01020     XrlCmdError ifmgr_0_1_create_vif(
01021     // Input values,
01022     const uint32_t& tid,
01023     const string&   ifname,
01024     const string&   vif);
01025 
01026     XrlCmdError ifmgr_0_1_delete_vif(
01027     // Input values,
01028     const uint32_t& tid,
01029     const string&   ifname,
01030     const string&   vif);
01031 
01032     XrlCmdError ifmgr_0_1_set_vif_enabled(
01033     // Input values,
01034     const uint32_t& tid,
01035     const string&   ifname,
01036     const string&   vif,
01037     const bool& enabled);
01038 
01039     XrlCmdError ifmgr_0_1_get_configured_vif_enabled(
01040     // Input values,
01041     const string&   ifname,
01042     const string&   vif,
01043     // Output values,
01044     bool&       enabled);
01045 
01046     XrlCmdError ifmgr_0_1_get_configured_vif_addresses4(
01047     // Input values,
01048     const string&   ifname,
01049     const string&   vif,
01050     // Output values,
01051     XrlAtomList&    addresses);
01052 
01053     XrlCmdError ifmgr_0_1_set_parent_ifname(
01054     // Input values,
01055     const uint32_t& tid,
01056     const string& ifname,
01057     const string& parent_ifname);
01058 
01059     XrlCmdError ifmgr_0_1_set_iface_type(
01060     // Input values,
01061     const uint32_t& tid,
01062     const string& ifname,
01063     const string& iface_type);
01064 
01065     XrlCmdError ifmgr_0_1_set_vid(
01066     // Input values,
01067     const uint32_t& tid,
01068     const string& ifname,
01069     const string& vid);
01070 
01071     XrlCmdError ifmgr_0_1_create_address4(
01072     // Input values,
01073     const uint32_t& tid,
01074     const string&   ifname,
01075     const string&   vif,
01076     const IPv4& address);
01077 
01078     XrlCmdError ifmgr_0_1_delete_address4(
01079     // Input values,
01080     const uint32_t& tid,
01081     const string&   ifname,
01082     const string&   vif,
01083     const IPv4& address);
01084 
01085     XrlCmdError ifmgr_0_1_set_address4(
01086     // Input values,
01087     const uint32_t& tid,
01088     const string&   ifname,
01089     const string&   vif,
01090     const IPv4& address);
01091 
01092     XrlCmdError ifmgr_0_1_set_address_enabled4(
01093     // Input values,
01094     const uint32_t& tid,
01095     const string&   ifname,
01096     const string&   vif,
01097     const IPv4& address,
01098     const bool& enabled);
01099 
01100     XrlCmdError ifmgr_0_1_get_configured_address_enabled4(
01101     // Input values,
01102     const string&   ifname,
01103     const string&   vif,
01104     const IPv4& address,
01105     bool&       enabled);
01106 
01107     XrlCmdError ifmgr_0_1_set_prefix4(
01108     // Input values,
01109     const uint32_t& tid,
01110     const string&   ifname,
01111     const string&   vif,
01112     const IPv4& address,
01113     const uint32_t& prefix_len);
01114 
01115     XrlCmdError ifmgr_0_1_get_configured_prefix4(
01116     // Input values,
01117     const string&   ifname,
01118     const string&   vif,
01119     const IPv4& address,
01120     // Output values,
01121     uint32_t&   prefix_len);
01122 
01123     XrlCmdError ifmgr_0_1_set_broadcast4(
01124     // Input values,
01125     const uint32_t& tid,
01126     const string&   ifname,
01127     const string&   vif,
01128     const IPv4& address,
01129     const IPv4& broadcast);
01130 
01131     XrlCmdError ifmgr_0_1_get_configured_broadcast4(
01132     // Input values,
01133     const string&   ifname,
01134     const string&   vif,
01135     const IPv4& address,
01136     // Output values,
01137     IPv4&       broadcast);
01138 
01139     XrlCmdError ifmgr_0_1_set_endpoint4(
01140     // Input values,
01141     const uint32_t& tid,
01142     const string&   ifname,
01143     const string&   vif,
01144     const IPv4& address,
01145     const IPv4& endpoint);
01146 
01147     XrlCmdError ifmgr_0_1_get_configured_endpoint4(
01148     // Input values,
01149     const string&   ifname,
01150     const string&   vif,
01151     const IPv4& address,
01152     // Output values,
01153     IPv4&   endpoint);
01154 
01155 #ifdef HAVE_IPV6
01156     XrlCmdError ifmgr_0_1_get_configured_address_flags6(
01157     // Input values,
01158     const string& ifname,
01159     const string& vif,
01160     const IPv6&   address,
01161     // Output values,
01162     bool& up,
01163     bool& loopback,
01164     bool& point_to_point,
01165     bool& multicast);
01166 
01167     XrlCmdError ifmgr_0_1_get_configured_vif_addresses6(
01168     // Input values,
01169     const string&   ifname,
01170     const string&   vif,
01171     // Output values,
01172     XrlAtomList&    addresses);
01173 
01174     XrlCmdError ifmgr_0_1_create_address6(
01175     // Input values,
01176     const uint32_t& tid,
01177     const string&   ifname,
01178     const string&   vif,
01179     const IPv6& address);
01180 
01181     XrlCmdError ifmgr_0_1_delete_address6(
01182     // Input values,
01183     const uint32_t& tid,
01184     const string&   ifname,
01185     const string&   vif,
01186     const IPv6& address);
01187 
01188     XrlCmdError ifmgr_0_1_set_address_enabled6(
01189     // Input values,
01190     const uint32_t& tid,
01191     const string&   ifname,
01192     const string&   vif,
01193     const IPv6& address,
01194     const bool& enabled);
01195 
01196     XrlCmdError ifmgr_0_1_get_configured_address_enabled6(
01197     // Input values,
01198     const string&   ifname,
01199     const string&   vif,
01200     const IPv6& address,
01201     bool&       enabled);
01202 
01203     XrlCmdError ifmgr_0_1_set_prefix6(
01204     // Input values,
01205     const uint32_t& tid,
01206     const string&   ifname,
01207     const string&   vif,
01208     const IPv6& address,
01209     const uint32_t& prefix_len);
01210 
01211     XrlCmdError ifmgr_0_1_get_configured_prefix6(
01212     // Input values,
01213     const string&   ifname,
01214     const string&   vif,
01215     const IPv6& address,
01216     // Output values,
01217     uint32_t&   prefix_len);
01218 
01219     XrlCmdError ifmgr_0_1_set_endpoint6(
01220     // Input values,
01221     const uint32_t& tid,
01222     const string&   ifname,
01223     const string&   vif,
01224     const IPv6& address,
01225     const IPv6& endpoint);
01226 
01227     XrlCmdError ifmgr_0_1_get_configured_endpoint6(
01228     // Input values,
01229     const string&   ifname,
01230     const string&   vif,
01231     const IPv6& address,
01232     // Output values,
01233     IPv6&       endpoint);
01234 #endif
01235 
01236     XrlCmdError ifmgr_replicator_0_1_register_ifmgr_mirror(
01237     // Input values,
01238     const string&   clientname);
01239 
01240     XrlCmdError ifmgr_replicator_0_1_unregister_ifmgr_mirror(
01241     // Input values,
01242     const string&   clientname);
01243 
01244     //
01245     // Forwarding Table Interface
01246     //
01247 
01248     XrlCmdError fti_0_2_lookup_route_by_dest4(
01249     // Input values,
01250     const IPv4& host,
01251     // Output values,
01252     IPv4Net&    netmask,
01253     IPv4&       nexthop,
01254     string&     ifname,
01255     string&     vifname,
01256     uint32_t&   metric,
01257     uint32_t&   admin_distance,
01258     string&     protocol_origin);
01259 
01260     XrlCmdError fti_0_2_lookup_route_by_network4(
01261     // Input values,
01262     const IPv4Net&  dst,
01263     // Output values,
01264     IPv4&       nexthop,
01265     string&     ifname,
01266     string&     vifname,
01267     uint32_t&   metric,
01268     uint32_t&   admin_distance,
01269     string&     protocol_origin);
01270 
01271     XrlCmdError fti_0_2_have_ipv4(
01272     // Output values, 
01273     bool&   result);
01274 
01275     XrlCmdError fti_0_2_get_unicast_forwarding_enabled4(
01276     // Output values,
01277     bool&   enabled);
01278 
01279     XrlCmdError fti_0_2_set_unicast_forwarding_enabled4(
01280     // Input values,
01281     const bool& enabled);
01282 
01290     XrlCmdError fti_0_2_set_unicast_forwarding_entries_retain_on_startup4(
01291     // Input values,
01292     const bool& retain);
01293 
01301     XrlCmdError fti_0_2_set_unicast_forwarding_entries_retain_on_shutdown4(
01302     // Input values,
01303     const bool& retain);
01304 
01313     XrlCmdError fti_0_2_set_unicast_forwarding_table_id4(
01314     // Input values,
01315     const bool& is_configured,
01316     const uint32_t& table_id);
01317 
01318 #ifdef HAVE_IPV6
01319     XrlCmdError fti_0_2_lookup_route_by_dest6(
01320     // Input values,
01321     const IPv6& host,
01322     // Output values,
01323     IPv6Net&    netmask,
01324     IPv6&       nexthop,
01325     string&     ifname,
01326     string&     vifname,
01327     uint32_t&   metric,
01328     uint32_t&   admin_distance,
01329     string&     protocol_origin);
01330 
01331     XrlCmdError fti_0_2_lookup_route_by_network6(
01332     // Input values,
01333     const IPv6Net&  dst,
01334     // Output values,
01335     IPv6&       nexthop,
01336     string&     ifname,
01337     string&     vifname,
01338     uint32_t&   metric,
01339     uint32_t&   admin_distance,
01340     string&     protocol_origin);
01341 
01342 
01343     XrlCmdError fti_0_2_have_ipv6(
01344     // Output values, 
01345     bool&   result);
01346 
01347     XrlCmdError fti_0_2_get_unicast_forwarding_enabled6(
01348     // Output values,
01349     bool&   enabled);
01350 
01351     XrlCmdError fti_0_2_set_unicast_forwarding_enabled6(
01352     // Input values,
01353     const bool& enabled);
01354 
01362     XrlCmdError fti_0_2_set_unicast_forwarding_entries_retain_on_startup6(
01363     // Input values,
01364     const bool& retain);
01365 
01373     XrlCmdError fti_0_2_set_unicast_forwarding_entries_retain_on_shutdown6(
01374     // Input values,
01375     const bool& retain);
01376 
01385     XrlCmdError fti_0_2_set_unicast_forwarding_table_id6(
01386     // Input values,
01387     const bool& is_configured,
01388     const uint32_t& table_id);
01389 #endif
01390 
01391     //
01392     // RIB routes redistribution transaction-based XRL interface
01393     //
01394 
01400     XrlCmdError redist_transaction4_0_1_start_transaction(
01401     // Output values,
01402     uint32_t&   tid);
01403 
01409     XrlCmdError redist_transaction4_0_1_commit_transaction(
01410     // Input values,
01411     const uint32_t& tid);
01412 
01418     XrlCmdError redist_transaction4_0_1_abort_transaction(
01419     // Input values,
01420     const uint32_t& tid);
01421 
01446     XrlCmdError redist_transaction4_0_1_add_route(
01447     // Input values,
01448     const uint32_t& tid,
01449     const IPv4Net&  dst,
01450     const IPv4& nexthop,
01451     const string&   ifname,
01452     const string&   vifname,
01453     const uint32_t& metric,
01454     const uint32_t& admin_distance,
01455     const string&   cookie,
01456     const string&   protocol_origin);
01457 
01458     XrlCmdError redist_transaction4_0_1_delete_route(
01459     // Input values,
01460     const uint32_t& tid,
01461     const IPv4Net&  dst,
01462     const IPv4& nexthop,
01463     const string&   ifname,
01464     const string&   vifname,
01465     const uint32_t& metric,
01466     const uint32_t& admin_distance,
01467     const string&   cookie,
01468     const string&   protocol_origin);
01469 
01478     XrlCmdError redist_transaction4_0_1_delete_all_routes(
01479     // Input values,
01480     const uint32_t& tid,
01481     const string&   cookie);
01482 
01483 
01484 #ifdef HAVE_IPV6
01485 
01490     XrlCmdError redist_transaction6_0_1_start_transaction(
01491     // Output values,
01492     uint32_t&   tid);
01493 
01499     XrlCmdError redist_transaction6_0_1_commit_transaction(
01500     // Input values,
01501     const uint32_t& tid);
01502 
01508     XrlCmdError redist_transaction6_0_1_abort_transaction(
01509     // Input values,
01510     const uint32_t& tid);
01511 
01536     XrlCmdError redist_transaction6_0_1_add_route(
01537     // Input values,
01538     const uint32_t& tid,
01539     const IPv6Net&  dst,
01540     const IPv6& nexthop,
01541     const string&   ifname,
01542     const string&   vifname,
01543     const uint32_t& metric,
01544     const uint32_t& admin_distance,
01545     const string&   cookie,
01546     const string&   protocol_origin);
01547 
01548     XrlCmdError redist_transaction6_0_1_delete_route(
01549     // Input values,
01550     const uint32_t& tid,
01551     const IPv6Net&  dst,
01552     const IPv6& nexthop,
01553     const string&   ifname,
01554     const string&   vifname,
01555     const uint32_t& metric,
01556     const uint32_t& admin_distance,
01557     const string&   cookie,
01558     const string&   protocol_origin);
01559 
01568     XrlCmdError redist_transaction6_0_1_delete_all_routes(
01569     // Input values,
01570     const uint32_t& tid,
01571     const string&   cookie);
01572 
01573 #endif //ipv6
01574 
01575 
01576     //
01577     // Raw Link-Level Server Interface
01578     //
01579 
01597     XrlCmdError raw_link_0_1_send(
01598     // Input values,
01599     const string&   if_name,
01600     const string&   vif_name,
01601     const Mac&  src_address,
01602     const Mac&  dst_address,
01603     const uint32_t& ether_type,
01604     const vector<uint8_t>&  payload);
01605 
01630     XrlCmdError raw_link_0_1_register_receiver(
01631     // Input values,
01632     const string&   xrl_target_instance_name,
01633     const string&   if_name,
01634     const string&   vif_name,
01635     const uint32_t& ether_type,
01636     const string&   filter_program,
01637     const bool& enable_multicast_loopback);
01638 
01659     XrlCmdError raw_link_0_1_unregister_receiver(
01660     // Input values,
01661     const string&   xrl_target_instance_name,
01662     const string&   if_name,
01663     const string&   vif_name,
01664     const uint32_t& ether_type,
01665     const string&   filter_program);
01666 
01688     XrlCmdError raw_link_0_1_join_multicast_group(
01689     // Input values,
01690     const string&   xrl_target_instance_name,
01691     const string&   if_name,
01692     const string&   vif_name,
01693     const uint32_t& ether_type,
01694     const string&   filter_program,
01695     const Mac&  group_address);
01696 
01719     XrlCmdError raw_link_0_1_leave_multicast_group(
01720     // Input values,
01721     const string&   xrl_target_instance_name,
01722     const string&   if_name,
01723     const string&   vif_name,
01724     const uint32_t& ether_type,
01725     const string&   filter_program,
01726     const Mac&  group_address);
01727 
01728 
01729     //
01730     // IPv4 Raw Socket Server Interface
01731     //
01732 
01763     XrlCmdError raw_packet4_0_1_send(
01764     // Input values,
01765     const string&   if_name,
01766     const string&   vif_name,
01767     const IPv4& src_address,
01768     const IPv4& dst_address,
01769     const uint32_t& ip_protocol,
01770     const int32_t&  ip_ttl,
01771     const int32_t&  ip_tos,
01772     const bool& ip_router_alert,
01773     const bool& ip_internet_control,
01774     const vector<uint8_t>&  payload);
01775 
01795     XrlCmdError raw_packet4_0_1_register_receiver(
01796     // Input values,
01797     const string&   xrl_target_instance_name,
01798     const string&   if_name,
01799     const string&   vif_name,
01800     const uint32_t& ip_protocol,
01801     const bool& enable_multicast_loopback);
01802 
01818     XrlCmdError raw_packet4_0_1_unregister_receiver(
01819     // Input values,
01820     const string&   xrl_target_instance_name,
01821     const string&   if_name,
01822     const string&   vif_name,
01823     const uint32_t& ip_protocol);
01824 
01841     XrlCmdError raw_packet4_0_1_join_multicast_group(
01842     // Input values,
01843     const string&   xrl_target_instance_name,
01844     const string&   if_name,
01845     const string&   vif_name,
01846     const uint32_t& ip_protocol,
01847     const IPv4& group_address);
01848 
01866     XrlCmdError raw_packet4_0_1_leave_multicast_group(
01867     // Input values,
01868     const string&   xrl_target_instance_name,
01869     const string&   if_name,
01870     const string&   vif_name,
01871     const uint32_t& ip_protocol,
01872     const IPv4& group_address);
01873 
01874 #ifdef HAVE_IPV6
01875     //
01876     // IPv6 Raw Socket Server Interface
01877     //
01878 
01916     XrlCmdError raw_packet6_0_1_send(
01917     // Input values,
01918     const string&   if_name,
01919     const string&   vif_name,
01920     const IPv6& src_address,
01921     const IPv6& dst_address,
01922     const uint32_t& ip_protocol,
01923     const int32_t&  ip_ttl,
01924     const int32_t&  ip_tos,
01925     const bool& ip_router_alert,
01926     const bool& ip_internet_control,
01927     const XrlAtomList&  ext_headers_type,
01928     const XrlAtomList&  ext_headers_payload,
01929     const vector<uint8_t>&  payload);
01930 
01950     XrlCmdError raw_packet6_0_1_register_receiver(
01951     // Input values,
01952     const string&   xrl_target_instance_name,
01953     const string&   if_name,
01954     const string&   vif_name,
01955     const uint32_t& ip_protocol,
01956     const bool& enable_multicast_loopback);
01957 
01973     XrlCmdError raw_packet6_0_1_unregister_receiver(
01974     // Input values,
01975     const string&   xrl_target_instance_name,
01976     const string&   if_name,
01977     const string&   vif_name,
01978     const uint32_t& ip_protocol);
01979 
01996     XrlCmdError raw_packet6_0_1_join_multicast_group(
01997     // Input values,
01998     const string&   xrl_target_instance_name,
01999     const string&   if_name,
02000     const string&   vif_name,
02001     const uint32_t& ip_protocol,
02002     const IPv6& group_address);
02003 
02021     XrlCmdError raw_packet6_0_1_leave_multicast_group(
02022     // Input values,
02023     const string&   xrl_target_instance_name,
02024     const string&   if_name,
02025     const string&   vif_name,
02026     const uint32_t& ip_protocol,
02027     const IPv6& group_address);
02028 #endif
02029 
02030     //
02031     // TCP/UDP I/O Socket Server Interface
02032     //
02033 
02043     XrlCmdError socket4_0_1_tcp_open(
02044     // Input values,
02045     const string&   creator,
02046     // Output values,
02047     string& sockid);
02048 
02058     XrlCmdError socket4_0_1_udp_open(
02059     // Input values,
02060     const string&   creator,
02061     // Output values,
02062     string& sockid);
02063 
02077     XrlCmdError socket4_0_1_tcp_open_and_bind(
02078     // Input values,
02079     const string&   creator,
02080     const IPv4& local_addr,
02081     const uint32_t& local_port,
02082     // Output values,
02083     string& sockid);
02084 
02098     XrlCmdError socket4_0_1_udp_open_and_bind(
02099     // Input values,
02100     const string&   creator,
02101     const IPv4& local_addr,
02102     const uint32_t& local_port,
02103     const string&   local_dev,
02104     const uint32_t& reuse,
02105     // Output values,
02106     string& sockid);
02107 
02127     XrlCmdError socket4_0_1_udp_open_bind_join(
02128     // Input values,
02129     const string&   creator,
02130     const IPv4& local_addr,
02131     const uint32_t& local_port,
02132     const IPv4& mcast_addr,
02133     const uint32_t& ttl,
02134     const bool& reuse,
02135     // Output values,
02136     string& sockid);
02137 
02155     XrlCmdError socket4_0_1_tcp_open_bind_connect(
02156     // Input values,
02157     const string&   creator,
02158     const IPv4& local_addr,
02159     const uint32_t& local_port,
02160     const IPv4& remote_addr,
02161     const uint32_t& remote_port,
02162     // Output values,
02163     string& sockid);
02164 
02182     XrlCmdError socket4_0_1_udp_open_bind_connect(
02183     // Input values,
02184     const string&   creator,
02185     const IPv4& local_addr,
02186     const uint32_t& local_port,
02187     const IPv4& remote_addr,
02188     const uint32_t& remote_port,
02189     // Output values,
02190     string& sockid);
02191 
02222     XrlCmdError socket4_0_1_udp_open_bind_broadcast(
02223     // Input values,
02224     const string&   creator,
02225     const string&   ifname,
02226     const string&   vifname,
02227     const uint32_t& local_port,
02228     const uint32_t& remote_port,
02229     const bool& reuse,
02230     const bool& limited,
02231     const bool& connected,
02232     // Output values,
02233     string& sockid);
02234 
02244     XrlCmdError socket4_0_1_bind(
02245     // Input values,
02246     const string&   sockid,
02247     const IPv4& local_addr,
02248     const uint32_t& local_port);
02249 
02259     XrlCmdError socket4_0_1_udp_join_group(
02260     // Input values,
02261     const string&   sockid,
02262     const IPv4& mcast_addr,
02263     const IPv4& join_if_addr);
02264 
02274     XrlCmdError socket4_0_1_udp_leave_group(
02275     // Input values,
02276     const string&   sockid,
02277     const IPv4& mcast_addr,
02278     const IPv4& leave_if_addr);
02279 
02285     XrlCmdError socket4_0_1_close(
02286     // Input values,
02287     const string&   sockid);
02288 
02298     XrlCmdError socket4_0_1_tcp_listen(
02299     // Input values,
02300     const string&   sockid,
02301     const uint32_t& backlog);
02302 
02314     XrlCmdError socket4_0_1_udp_enable_recv(
02315     // Input values,
02316     const string&   sockid);
02317 
02325     XrlCmdError socket4_0_1_send(
02326     // Input values,
02327     const string&   sockid,
02328     const vector<uint8_t>&  data);
02329 
02343     XrlCmdError socket4_0_1_send_to(
02344     // Input values,
02345     const string&   sockid,
02346     const IPv4& remote_addr,
02347     const uint32_t& remote_port,
02348     const vector<uint8_t>&  data);
02349 
02361     XrlCmdError socket4_0_1_send_from_multicast_if(
02362     // Input values,
02363     const string&   sockid,
02364     const IPv4& group_addr,
02365     const uint32_t& group_port,
02366     const IPv4& ifaddr,
02367     const vector<uint8_t>&  data);
02368 
02387     XrlCmdError socket4_0_1_set_socket_option(
02388     // Input values,
02389     const string&   sockid,
02390     const string&   optname,
02391     const uint32_t& optval);
02392 
02407     XrlCmdError socket4_0_1_set_socket_option_txt(
02408     // Input values,
02409     const string&   sockid,
02410     const string&   optname,
02411     const string&   optval);
02412 
02413 #ifdef HAVE_IPV6
02414 
02423     XrlCmdError socket6_0_1_tcp_open(
02424     // Input values,
02425     const string&   creator,
02426     // Output values,
02427     string& sockid);
02428 
02438     XrlCmdError socket6_0_1_udp_open(
02439     // Input values,
02440     const string&   creator,
02441     // Output values,
02442     string& sockid);
02443 
02457     XrlCmdError socket6_0_1_tcp_open_and_bind(
02458     // Input values,
02459     const string&   creator,
02460     const IPv6& local_addr,
02461     const uint32_t& local_port,
02462     // Output values,
02463     string& sockid);
02464 
02478     XrlCmdError socket6_0_1_udp_open_and_bind(
02479     // Input values,
02480     const string&   creator,
02481     const IPv6& local_addr,
02482     const uint32_t& local_port,
02483     const string&   local_dev,
02484     const uint32_t& reuse,
02485     // Output values,
02486     string& sockid);
02487 
02507     XrlCmdError socket6_0_1_udp_open_bind_join(
02508     // Input values,
02509     const string&   creator,
02510     const IPv6& local_addr,
02511     const uint32_t& local_port,
02512     const IPv6& mcast_addr,
02513     const uint32_t& ttl,
02514     const bool& reuse,
02515     // Output values,
02516     string& sockid);
02517 
02535     XrlCmdError socket6_0_1_tcp_open_bind_connect(
02536     // Input values,
02537     const string&   creator,
02538     const IPv6& local_addr,
02539     const uint32_t& local_port,
02540     const IPv6& remote_addr,
02541     const uint32_t& remote_port,
02542     // Output values,
02543     string& sockid);
02544 
02562     XrlCmdError socket6_0_1_udp_open_bind_connect(
02563     // Input values,
02564     const string&   creator,
02565     const IPv6& local_addr,
02566     const uint32_t& local_port,
02567     const IPv6& remote_addr,
02568     const uint32_t& remote_port,
02569     // Output values,
02570     string& sockid);
02571 
02581     XrlCmdError socket6_0_1_bind(
02582     // Input values,
02583     const string&   sockid,
02584     const IPv6& local_addr,
02585     const uint32_t& local_port);
02586 
02596     XrlCmdError socket6_0_1_udp_join_group(
02597     // Input values,
02598     const string&   sockid,
02599     const IPv6& mcast_addr,
02600     const IPv6& join_if_addr);
02601 
02611     XrlCmdError socket6_0_1_udp_leave_group(
02612     // Input values,
02613     const string&   sockid,
02614     const IPv6& mcast_addr,
02615     const IPv6& leave_if_addr);
02616 
02622     XrlCmdError socket6_0_1_close(
02623     // Input values,
02624     const string&   sockid);
02625 
02635     XrlCmdError socket6_0_1_tcp_listen(
02636     // Input values,
02637     const string&   sockid,
02638     const uint32_t& backlog);
02639 
02647     XrlCmdError socket6_0_1_send(
02648     // Input values,
02649     const string&   sockid,
02650     const vector<uint8_t>&  data);
02651 
02665     XrlCmdError socket6_0_1_send_to(
02666     // Input values,
02667     const string&   sockid,
02668     const IPv6& remote_addr,
02669     const uint32_t& remote_port,
02670     const vector<uint8_t>&  data);
02671 
02683     XrlCmdError socket6_0_1_send_from_multicast_if(
02684     // Input values,
02685     const string&   sockid,
02686     const IPv6& group_addr,
02687     const uint32_t& group_port,
02688     const IPv6& ifaddr,
02689     const vector<uint8_t>&  data);
02690 
02705     XrlCmdError socket6_0_1_set_socket_option(
02706     // Input values,
02707     const string&   sockid,
02708     const string&   optname,
02709     const uint32_t& optval);
02710 #endif
02711 
02712 #ifndef XORP_DISABLE_PROFILE
02713     //
02714     // Profile-related interface
02715     //
02716     XrlCmdError profile_0_1_enable(
02717     // Input values,
02718     const string&   pname);
02719 
02720     XrlCmdError profile_0_1_disable(
02721     // Input values,
02722     const string&   pname);
02723 
02724     XrlCmdError profile_0_1_get_entries(
02725     // Input values,
02726     const string&   pname,
02727     const string&   instance_name);
02728 
02729     XrlCmdError profile_0_1_clear(
02730     // Input values,
02731     const string&   pname);
02732 
02733     XrlCmdError profile_0_1_list(
02734     // Output values,
02735     string& info);
02736 #endif
02737 
02738 private:
02748     int add_remove_mac(bool add, const string& ifname, const Mac& mac,
02749                string& error_msg);
02750 
02759     int set_mac(const string& ifname, const Mac& mac, string& error_msg);
02760 
02761     int add_remove_address(bool add, const string& ifname, const string& vifname,
02762                const IPv4& ip, uint32_t prefix, string& error_msg);
02763 
02764 
02773     int send_gratuitous_arps(const string& ifname, const Mac& mac,
02774                 string& error_msg);
02775 
02776     EventLoop&      _eventloop; // The event loop to use
02777     FeaNode&        _fea_node;  // The corresponding FeaNode
02778 
02779     XrlRouter&              _xrl_router;
02780 #ifndef XORP_DISABLE_PROFILE
02781     Profile&            _profile;
02782 #endif
02783     XrlFibClientManager&    _xrl_fib_client_manager;
02784     IfConfig&           _ifconfig;
02785 #ifndef XORP_DISABLE_FIREWALL
02786     FirewallManager&        _firewall_manager;
02787 #endif
02788     FibConfig&          _fibconfig;
02789     IoLinkManager&      _io_link_manager;
02790     IoIpManager&        _io_ip_manager;
02791     IoTcpUdpManager&        _io_tcpudp_manager;
02792     LibFeaClientBridge&     _lib_fea_client_bridge;
02793 
02794     bool    _is_running;    // True if the service is running
02795     bool    _is_shutdown_received; // True if shutdown XRL request received
02796 
02797 #ifdef XORP_USE_CLICK
02798     //
02799     // The externally loadable managers
02800     //
02801     FeaDataPlaneManagerClick*   _fea_data_plane_manager_click;
02802 #endif
02803 };
02804 
02805 #endif // __FEA_XRL_FEA_TARGET_HH__
 All Classes Namespaces Functions Variables Typedefs Enumerations