xorp

vrrp_xif.hh

00001 /*
00002  * obj/i386-pc-mingw32/xrl/interfaces/vrrp_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_VRRP_XIF_HH__
00015 #define __XRL_INTERFACES_VRRP_XIF_HH__
00016 
00017 #undef XORP_LIBRARY_NAME
00018 #define XORP_LIBRARY_NAME "XifVrrp"
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 XrlVrrpV0p1Client {
00030 public:
00031     XrlVrrpV0p1Client(XrlSender* s) : _sender(s) {}
00032     virtual ~XrlVrrpV0p1Client() {}
00033 
00034     typedef XorpCallback1<void, const XrlError&>::RefPtr AddVridCB;
00048     bool send_add_vrid(
00049     const char* dst_xrl_target_name,
00050     const string&   ifname,
00051     const string&   vifname,
00052     const uint32_t& vrid,
00053     const AddVridCB&    cb
00054     );
00055 
00056     typedef XorpCallback1<void, const XrlError&>::RefPtr DeleteVridCB;
00070     bool send_delete_vrid(
00071     const char* dst_xrl_target_name,
00072     const string&   ifname,
00073     const string&   vifname,
00074     const uint32_t& vrid,
00075     const DeleteVridCB& cb
00076     );
00077 
00078     typedef XorpCallback1<void, const XrlError&>::RefPtr SetPriorityCB;
00094     bool send_set_priority(
00095     const char* dst_xrl_target_name,
00096     const string&   ifname,
00097     const string&   vifname,
00098     const uint32_t& vrid,
00099     const uint32_t& priority,
00100     const SetPriorityCB&    cb
00101     );
00102 
00103     typedef XorpCallback1<void, const XrlError&>::RefPtr SetIntervalCB;
00119     bool send_set_interval(
00120     const char* dst_xrl_target_name,
00121     const string&   ifname,
00122     const string&   vifname,
00123     const uint32_t& vrid,
00124     const uint32_t& interval,
00125     const SetIntervalCB&    cb
00126     );
00127 
00128     typedef XorpCallback1<void, const XrlError&>::RefPtr SetPreemptCB;
00145     bool send_set_preempt(
00146     const char* dst_xrl_target_name,
00147     const string&   ifname,
00148     const string&   vifname,
00149     const uint32_t& vrid,
00150     const bool& preempt,
00151     const SetPreemptCB& cb
00152     );
00153 
00154     typedef XorpCallback1<void, const XrlError&>::RefPtr SetDisableCB;
00170     bool send_set_disable(
00171     const char* dst_xrl_target_name,
00172     const string&   ifname,
00173     const string&   vifname,
00174     const uint32_t& vrid,
00175     const bool& disable,
00176     const SetDisableCB& cb
00177     );
00178 
00179     typedef XorpCallback1<void, const XrlError&>::RefPtr AddIpCB;
00195     bool send_add_ip(
00196     const char* dst_xrl_target_name,
00197     const string&   ifname,
00198     const string&   vifname,
00199     const uint32_t& vrid,
00200     const IPv4& ip,
00201     const AddIpCB&  cb
00202     );
00203 
00204     typedef XorpCallback1<void, const XrlError&>::RefPtr SetPrefixCB;
00205 
00206     bool send_set_prefix(
00207     const char* dst_xrl_target_name,
00208     const string&   ifname,
00209     const string&   vifname,
00210     const uint32_t& vrid,
00211     const IPv4& ip,
00212     const uint32_t& prefix_len,
00213     const SetPrefixCB&  cb
00214     );
00215 
00216     typedef XorpCallback1<void, const XrlError&>::RefPtr DeleteIpCB;
00232     bool send_delete_ip(
00233     const char* dst_xrl_target_name,
00234     const string&   ifname,
00235     const string&   vifname,
00236     const uint32_t& vrid,
00237     const IPv4& ip,
00238     const DeleteIpCB&   cb
00239     );
00240 
00241     typedef XorpCallback2<void, const XrlError&, const XrlAtomList*>::RefPtr GetIfsCB;
00249     bool send_get_ifs(
00250     const char* dst_xrl_target_name,
00251     const GetIfsCB& cb
00252     );
00253 
00254     typedef XorpCallback2<void, const XrlError&, const XrlAtomList*>::RefPtr GetVifsCB;
00265     bool send_get_vifs(
00266     const char* dst_xrl_target_name,
00267     const string&   ifname,
00268     const GetVifsCB&    cb
00269     );
00270 
00271     typedef XorpCallback2<void, const XrlError&, const XrlAtomList*>::RefPtr GetVridsCB;
00284     bool send_get_vrids(
00285     const char* dst_xrl_target_name,
00286     const string&   ifname,
00287     const string&   vifname,
00288     const GetVridsCB&   cb
00289     );
00290 
00291     typedef XorpCallback3<void, const XrlError&, const string*, const IPv4*>::RefPtr GetVridInfoCB;
00305     bool send_get_vrid_info(
00306     const char* dst_xrl_target_name,
00307     const string&   ifname,
00308     const string&   vifname,
00309     const uint32_t& vrid,
00310     const GetVridInfoCB&    cb
00311     );
00312 
00313 protected:
00314     XrlSender* _sender;
00315 
00316 private:
00317     static void unmarshall_add_vrid(
00318     const XrlError& e,
00319     XrlArgs*    a,
00320     AddVridCB       cb
00321     );
00322 
00323     static void unmarshall_delete_vrid(
00324     const XrlError& e,
00325     XrlArgs*    a,
00326     DeleteVridCB        cb
00327     );
00328 
00329     static void unmarshall_set_priority(
00330     const XrlError& e,
00331     XrlArgs*    a,
00332     SetPriorityCB       cb
00333     );
00334 
00335     static void unmarshall_set_interval(
00336     const XrlError& e,
00337     XrlArgs*    a,
00338     SetIntervalCB       cb
00339     );
00340 
00341     static void unmarshall_set_preempt(
00342     const XrlError& e,
00343     XrlArgs*    a,
00344     SetPreemptCB        cb
00345     );
00346 
00347     static void unmarshall_set_disable(
00348     const XrlError& e,
00349     XrlArgs*    a,
00350     SetDisableCB        cb
00351     );
00352 
00353     static void unmarshall_add_ip(
00354     const XrlError& e,
00355     XrlArgs*    a,
00356     AddIpCB     cb
00357     );
00358 
00359     static void unmarshall_set_prefix(
00360     const XrlError& e,
00361     XrlArgs*    a,
00362     SetPrefixCB     cb
00363     );
00364 
00365     static void unmarshall_delete_ip(
00366     const XrlError& e,
00367     XrlArgs*    a,
00368     DeleteIpCB      cb
00369     );
00370 
00371     static void unmarshall_get_ifs(
00372     const XrlError& e,
00373     XrlArgs*    a,
00374     GetIfsCB        cb
00375     );
00376 
00377     static void unmarshall_get_vifs(
00378     const XrlError& e,
00379     XrlArgs*    a,
00380     GetVifsCB       cb
00381     );
00382 
00383     static void unmarshall_get_vrids(
00384     const XrlError& e,
00385     XrlArgs*    a,
00386     GetVridsCB      cb
00387     );
00388 
00389     static void unmarshall_get_vrid_info(
00390     const XrlError& e,
00391     XrlArgs*    a,
00392     GetVridInfoCB       cb
00393     );
00394 
00395 private:
00396     /* Declare cached Xrl pointers */
00397     auto_ptr<Xrl> ap_xrl_add_vrid;
00398     auto_ptr<Xrl> ap_xrl_delete_vrid;
00399     auto_ptr<Xrl> ap_xrl_set_priority;
00400     auto_ptr<Xrl> ap_xrl_set_interval;
00401     auto_ptr<Xrl> ap_xrl_set_preempt;
00402     auto_ptr<Xrl> ap_xrl_set_disable;
00403     auto_ptr<Xrl> ap_xrl_add_ip;
00404     auto_ptr<Xrl> ap_xrl_set_prefix;
00405     auto_ptr<Xrl> ap_xrl_delete_ip;
00406     auto_ptr<Xrl> ap_xrl_get_ifs;
00407     auto_ptr<Xrl> ap_xrl_get_vifs;
00408     auto_ptr<Xrl> ap_xrl_get_vrids;
00409     auto_ptr<Xrl> ap_xrl_get_vrid_info;
00410 };
00411 
00412 #endif /* __XRL_INTERFACES_VRRP_XIF_HH__ */
 All Classes Namespaces Functions Variables Typedefs Enumerations