xorp

redist_transaction6_xif.hh

00001 /*
00002  * obj/i386-pc-mingw32/xrl/interfaces/redist_transaction6_xif.hh
00003  * vim:set sts=4 ts=8 ft=cpp:
00004  *
00005  * Copyright (c) 2001-2010 XORP, Inc and Others
00006  * See the XORP LICENSE.lgpl file for licensing, conditions, and warranties
00007  * on use.
00008  *
00009  * DO NOT EDIT THIS FILE - IT IS PROGRAMMATICALLY GENERATED
00010  *
00011  * Generated by 'clnt-gen'.
00012  */
00013 
00014 #ifndef __XRL_INTERFACES_REDIST_TRANSACTION6_XIF_HH__
00015 #define __XRL_INTERFACES_REDIST_TRANSACTION6_XIF_HH__
00016 
00017 #undef XORP_LIBRARY_NAME
00018 #define XORP_LIBRARY_NAME "XifRedistTransaction6"
00019 
00020 #include "libxorp/xlog.h"
00021 #include "libxorp/callback.hh"
00022 
00023 #include "libxipc/xrl.hh"
00024 #include "libxipc/xrl_error.hh"
00025 #include "libxipc/xrl_sender.hh"
00026 
00027 //#include <memory>
00028 
00029 class XrlRedistTransaction6V0p1Client {
00030 public:
00031     XrlRedistTransaction6V0p1Client(XrlSender* s) : _sender(s) {}
00032     virtual ~XrlRedistTransaction6V0p1Client() {}
00033 
00034     typedef XorpCallback2<void, const XrlError&, const uint32_t*>::RefPtr StartTransactionCB;
00042     bool send_start_transaction(
00043     const char* dst_xrl_target_name,
00044     const StartTransactionCB&   cb
00045     );
00046 
00047     typedef XorpCallback1<void, const XrlError&>::RefPtr CommitTransactionCB;
00057     bool send_commit_transaction(
00058     const char* dst_xrl_target_name,
00059     const uint32_t& tid,
00060     const CommitTransactionCB&  cb
00061     );
00062 
00063     typedef XorpCallback1<void, const XrlError&>::RefPtr AbortTransactionCB;
00073     bool send_abort_transaction(
00074     const char* dst_xrl_target_name,
00075     const uint32_t& tid,
00076     const AbortTransactionCB&   cb
00077     );
00078 
00079     typedef XorpCallback1<void, const XrlError&>::RefPtr AddRouteCB;
00108     bool send_add_route(
00109     const char* dst_xrl_target_name,
00110     const uint32_t& tid,
00111     const IPv6Net&  dst,
00112     const IPv6& nexthop,
00113     const string&   ifname,
00114     const string&   vifname,
00115     const uint32_t& metric,
00116     const uint32_t& admin_distance,
00117     const string&   cookie,
00118     const string&   protocol_origin,
00119     const AddRouteCB&   cb
00120     );
00121 
00122     typedef XorpCallback1<void, const XrlError&>::RefPtr DeleteRouteCB;
00123 
00124     bool send_delete_route(
00125     const char* dst_xrl_target_name,
00126     const uint32_t& tid,
00127     const IPv6Net&  dst,
00128     const IPv6& nexthop,
00129     const string&   ifname,
00130     const string&   vifname,
00131     const uint32_t& metric,
00132     const uint32_t& admin_distance,
00133     const string&   cookie,
00134     const string&   protocol_origin,
00135     const DeleteRouteCB&    cb
00136     );
00137 
00138     typedef XorpCallback1<void, const XrlError&>::RefPtr DeleteAllRoutesCB;
00151     bool send_delete_all_routes(
00152     const char* dst_xrl_target_name,
00153     const uint32_t& tid,
00154     const string&   cookie,
00155     const DeleteAllRoutesCB&    cb
00156     );
00157 
00158 protected:
00159     XrlSender* _sender;
00160 
00161 private:
00162     static void unmarshall_start_transaction(
00163     const XrlError& e,
00164     XrlArgs*    a,
00165     StartTransactionCB      cb
00166     );
00167 
00168     static void unmarshall_commit_transaction(
00169     const XrlError& e,
00170     XrlArgs*    a,
00171     CommitTransactionCB     cb
00172     );
00173 
00174     static void unmarshall_abort_transaction(
00175     const XrlError& e,
00176     XrlArgs*    a,
00177     AbortTransactionCB      cb
00178     );
00179 
00180     static void unmarshall_add_route(
00181     const XrlError& e,
00182     XrlArgs*    a,
00183     AddRouteCB      cb
00184     );
00185 
00186     static void unmarshall_delete_route(
00187     const XrlError& e,
00188     XrlArgs*    a,
00189     DeleteRouteCB       cb
00190     );
00191 
00192     static void unmarshall_delete_all_routes(
00193     const XrlError& e,
00194     XrlArgs*    a,
00195     DeleteAllRoutesCB       cb
00196     );
00197 
00198 private:
00199     /* Declare cached Xrl pointers */
00200     auto_ptr<Xrl> ap_xrl_start_transaction;
00201     auto_ptr<Xrl> ap_xrl_commit_transaction;
00202     auto_ptr<Xrl> ap_xrl_abort_transaction;
00203     auto_ptr<Xrl> ap_xrl_add_route;
00204     auto_ptr<Xrl> ap_xrl_delete_route;
00205     auto_ptr<Xrl> ap_xrl_delete_all_routes;
00206 };
00207 
00208 #endif /* __XRL_INTERFACES_REDIST_TRANSACTION6_XIF_HH__ */
 All Classes Namespaces Functions Variables Typedefs Enumerations