xorp

fea_rawpkt4_xif.hh

00001 /*
00002  * obj/i386-pc-mingw32/xrl/interfaces/fea_rawpkt4_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_FEA_RAWPKT4_XIF_HH__
00015 #define __XRL_INTERFACES_FEA_RAWPKT4_XIF_HH__
00016 
00017 #undef XORP_LIBRARY_NAME
00018 #define XORP_LIBRARY_NAME "XifFeaRawpkt4"
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 XrlRawPacket4V0p1Client {
00030 public:
00031     XrlRawPacket4V0p1Client(XrlSender* s) : _sender(s) {}
00032     virtual ~XrlRawPacket4V0p1Client() {}
00033 
00034     typedef XorpCallback1<void, const XrlError&>::RefPtr SendCB;
00069     bool send_send(
00070     const char* dst_xrl_target_name,
00071     const string&   if_name,
00072     const string&   vif_name,
00073     const IPv4& src_address,
00074     const IPv4& dst_address,
00075     const uint32_t& ip_protocol,
00076     const int32_t&  ip_ttl,
00077     const int32_t&  ip_tos,
00078     const bool& ip_router_alert,
00079     const bool& ip_internet_control,
00080     const vector<uint8_t>&  payload,
00081     const SendCB&   cb
00082     );
00083 
00084     typedef XorpCallback1<void, const XrlError&>::RefPtr RegisterReceiverCB;
00108     bool send_register_receiver(
00109     const char* dst_xrl_target_name,
00110     const string&   xrl_target_instance_name,
00111     const string&   if_name,
00112     const string&   vif_name,
00113     const uint32_t& ip_protocol,
00114     const bool& enable_multicast_loopback,
00115     const RegisterReceiverCB&   cb
00116     );
00117 
00118     typedef XorpCallback1<void, const XrlError&>::RefPtr UnregisterReceiverCB;
00138     bool send_unregister_receiver(
00139     const char* dst_xrl_target_name,
00140     const string&   xrl_target_instance_name,
00141     const string&   if_name,
00142     const string&   vif_name,
00143     const uint32_t& ip_protocol,
00144     const UnregisterReceiverCB& cb
00145     );
00146 
00147     typedef XorpCallback1<void, const XrlError&>::RefPtr JoinMulticastGroupCB;
00168     bool send_join_multicast_group(
00169     const char* dst_xrl_target_name,
00170     const string&   xrl_target_instance_name,
00171     const string&   if_name,
00172     const string&   vif_name,
00173     const uint32_t& ip_protocol,
00174     const IPv4& group_address,
00175     const JoinMulticastGroupCB& cb
00176     );
00177 
00178     typedef XorpCallback1<void, const XrlError&>::RefPtr LeaveMulticastGroupCB;
00200     bool send_leave_multicast_group(
00201     const char* dst_xrl_target_name,
00202     const string&   xrl_target_instance_name,
00203     const string&   if_name,
00204     const string&   vif_name,
00205     const uint32_t& ip_protocol,
00206     const IPv4& group_address,
00207     const LeaveMulticastGroupCB&    cb
00208     );
00209 
00210 protected:
00211     XrlSender* _sender;
00212 
00213 private:
00214     static void unmarshall_send(
00215     const XrlError& e,
00216     XrlArgs*    a,
00217     SendCB      cb
00218     );
00219 
00220     static void unmarshall_register_receiver(
00221     const XrlError& e,
00222     XrlArgs*    a,
00223     RegisterReceiverCB      cb
00224     );
00225 
00226     static void unmarshall_unregister_receiver(
00227     const XrlError& e,
00228     XrlArgs*    a,
00229     UnregisterReceiverCB        cb
00230     );
00231 
00232     static void unmarshall_join_multicast_group(
00233     const XrlError& e,
00234     XrlArgs*    a,
00235     JoinMulticastGroupCB        cb
00236     );
00237 
00238     static void unmarshall_leave_multicast_group(
00239     const XrlError& e,
00240     XrlArgs*    a,
00241     LeaveMulticastGroupCB       cb
00242     );
00243 
00244 private:
00245     /* Declare cached Xrl pointers */
00246     auto_ptr<Xrl> ap_xrl_send;
00247     auto_ptr<Xrl> ap_xrl_register_receiver;
00248     auto_ptr<Xrl> ap_xrl_unregister_receiver;
00249     auto_ptr<Xrl> ap_xrl_join_multicast_group;
00250     auto_ptr<Xrl> ap_xrl_leave_multicast_group;
00251 };
00252 
00253 #endif /* __XRL_INTERFACES_FEA_RAWPKT4_XIF_HH__ */
 All Classes Namespaces Functions Variables Typedefs Enumerations