xorp

fea_rawlink_xif.hh

00001 /*
00002  * obj/i386-pc-mingw32/xrl/interfaces/fea_rawlink_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_RAWLINK_XIF_HH__
00015 #define __XRL_INTERFACES_FEA_RAWLINK_XIF_HH__
00016 
00017 #undef XORP_LIBRARY_NAME
00018 #define XORP_LIBRARY_NAME "XifFeaRawlink"
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 XrlRawLinkV0p1Client {
00030 public:
00031     XrlRawLinkV0p1Client(XrlSender* s) : _sender(s) {}
00032     virtual ~XrlRawLinkV0p1Client() {}
00033 
00034     typedef XorpCallback1<void, const XrlError&>::RefPtr SendCB;
00056     bool send_send(
00057     const char* dst_xrl_target_name,
00058     const string&   if_name,
00059     const string&   vif_name,
00060     const Mac&  src_address,
00061     const Mac&  dst_address,
00062     const uint32_t& ether_type,
00063     const vector<uint8_t>&  payload,
00064     const SendCB&   cb
00065     );
00066 
00067     typedef XorpCallback1<void, const XrlError&>::RefPtr RegisterReceiverCB;
00096     bool send_register_receiver(
00097     const char* dst_xrl_target_name,
00098     const string&   xrl_target_instance_name,
00099     const string&   if_name,
00100     const string&   vif_name,
00101     const uint32_t& ether_type,
00102     const string&   filter_program,
00103     const bool& enable_multicast_loopback,
00104     const RegisterReceiverCB&   cb
00105     );
00106 
00107     typedef XorpCallback1<void, const XrlError&>::RefPtr UnregisterReceiverCB;
00132     bool send_unregister_receiver(
00133     const char* dst_xrl_target_name,
00134     const string&   xrl_target_instance_name,
00135     const string&   if_name,
00136     const string&   vif_name,
00137     const uint32_t& ether_type,
00138     const string&   filter_program,
00139     const UnregisterReceiverCB& cb
00140     );
00141 
00142     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& ether_type,
00174     const string&   filter_program,
00175     const Mac&  group_address,
00176     const JoinMulticastGroupCB& cb
00177     );
00178 
00179     typedef XorpCallback1<void, const XrlError&>::RefPtr LeaveMulticastGroupCB;
00206     bool send_leave_multicast_group(
00207     const char* dst_xrl_target_name,
00208     const string&   xrl_target_instance_name,
00209     const string&   if_name,
00210     const string&   vif_name,
00211     const uint32_t& ether_type,
00212     const string&   filter_program,
00213     const Mac&  group_address,
00214     const LeaveMulticastGroupCB&    cb
00215     );
00216 
00217 protected:
00218     XrlSender* _sender;
00219 
00220 private:
00221     static void unmarshall_send(
00222     const XrlError& e,
00223     XrlArgs*    a,
00224     SendCB      cb
00225     );
00226 
00227     static void unmarshall_register_receiver(
00228     const XrlError& e,
00229     XrlArgs*    a,
00230     RegisterReceiverCB      cb
00231     );
00232 
00233     static void unmarshall_unregister_receiver(
00234     const XrlError& e,
00235     XrlArgs*    a,
00236     UnregisterReceiverCB        cb
00237     );
00238 
00239     static void unmarshall_join_multicast_group(
00240     const XrlError& e,
00241     XrlArgs*    a,
00242     JoinMulticastGroupCB        cb
00243     );
00244 
00245     static void unmarshall_leave_multicast_group(
00246     const XrlError& e,
00247     XrlArgs*    a,
00248     LeaveMulticastGroupCB       cb
00249     );
00250 
00251 private:
00252     /* Declare cached Xrl pointers */
00253     auto_ptr<Xrl> ap_xrl_send;
00254     auto_ptr<Xrl> ap_xrl_register_receiver;
00255     auto_ptr<Xrl> ap_xrl_unregister_receiver;
00256     auto_ptr<Xrl> ap_xrl_join_multicast_group;
00257     auto_ptr<Xrl> ap_xrl_leave_multicast_group;
00258 };
00259 
00260 #endif /* __XRL_INTERFACES_FEA_RAWLINK_XIF_HH__ */
 All Classes Namespaces Functions Variables Typedefs Enumerations