xorp

socket6_xif.hh

00001 /*
00002  * obj/i386-pc-mingw32/xrl/interfaces/socket6_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_SOCKET6_XIF_HH__
00015 #define __XRL_INTERFACES_SOCKET6_XIF_HH__
00016 
00017 #undef XORP_LIBRARY_NAME
00018 #define XORP_LIBRARY_NAME "XifSocket6"
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 XrlSocket6V0p1Client {
00030 public:
00031     XrlSocket6V0p1Client(XrlSender* s) : _sender(s) {}
00032     virtual ~XrlSocket6V0p1Client() {}
00033 
00034     typedef XorpCallback2<void, const XrlError&, const string*>::RefPtr TcpOpenCB;
00045     bool send_tcp_open(
00046     const char* dst_xrl_target_name,
00047     const string&   creator,
00048     const TcpOpenCB&    cb
00049     );
00050 
00051     typedef XorpCallback2<void, const XrlError&, const string*>::RefPtr UdpOpenCB;
00062     bool send_udp_open(
00063     const char* dst_xrl_target_name,
00064     const string&   creator,
00065     const UdpOpenCB&    cb
00066     );
00067 
00068     typedef XorpCallback2<void, const XrlError&, const string*>::RefPtr TcpOpenAndBindCB;
00083     bool send_tcp_open_and_bind(
00084     const char* dst_xrl_target_name,
00085     const string&   creator,
00086     const IPv6& local_addr,
00087     const uint32_t& local_port,
00088     const TcpOpenAndBindCB& cb
00089     );
00090 
00091     typedef XorpCallback2<void, const XrlError&, const string*>::RefPtr UdpOpenAndBindCB;
00106     bool send_udp_open_and_bind(
00107     const char* dst_xrl_target_name,
00108     const string&   creator,
00109     const IPv6& local_addr,
00110     const uint32_t& local_port,
00111     const string&   local_dev,
00112     const uint32_t& reuse,
00113     const UdpOpenAndBindCB& cb
00114     );
00115 
00116     typedef XorpCallback2<void, const XrlError&, const string*>::RefPtr UdpOpenBindJoinCB;
00137     bool send_udp_open_bind_join(
00138     const char* dst_xrl_target_name,
00139     const string&   creator,
00140     const IPv6& local_addr,
00141     const uint32_t& local_port,
00142     const IPv6& mcast_addr,
00143     const uint32_t& ttl,
00144     const bool& reuse,
00145     const UdpOpenBindJoinCB&    cb
00146     );
00147 
00148     typedef XorpCallback2<void, const XrlError&, const string*>::RefPtr TcpOpenBindConnectCB;
00167     bool send_tcp_open_bind_connect(
00168     const char* dst_xrl_target_name,
00169     const string&   creator,
00170     const IPv6& local_addr,
00171     const uint32_t& local_port,
00172     const IPv6& remote_addr,
00173     const uint32_t& remote_port,
00174     const TcpOpenBindConnectCB& cb
00175     );
00176 
00177     typedef XorpCallback2<void, const XrlError&, const string*>::RefPtr UdpOpenBindConnectCB;
00196     bool send_udp_open_bind_connect(
00197     const char* dst_xrl_target_name,
00198     const string&   creator,
00199     const IPv6& local_addr,
00200     const uint32_t& local_port,
00201     const IPv6& remote_addr,
00202     const uint32_t& remote_port,
00203     const UdpOpenBindConnectCB& cb
00204     );
00205 
00206     typedef XorpCallback1<void, const XrlError&>::RefPtr BindCB;
00220     bool send_bind(
00221     const char* dst_xrl_target_name,
00222     const string&   sockid,
00223     const IPv6& local_addr,
00224     const uint32_t& local_port,
00225     const BindCB&   cb
00226     );
00227 
00228     typedef XorpCallback1<void, const XrlError&>::RefPtr UdpJoinGroupCB;
00242     bool send_udp_join_group(
00243     const char* dst_xrl_target_name,
00244     const string&   sockid,
00245     const IPv6& mcast_addr,
00246     const IPv6& join_if_addr,
00247     const UdpJoinGroupCB&   cb
00248     );
00249 
00250     typedef XorpCallback1<void, const XrlError&>::RefPtr UdpLeaveGroupCB;
00264     bool send_udp_leave_group(
00265     const char* dst_xrl_target_name,
00266     const string&   sockid,
00267     const IPv6& mcast_addr,
00268     const IPv6& leave_if_addr,
00269     const UdpLeaveGroupCB&  cb
00270     );
00271 
00272     typedef XorpCallback1<void, const XrlError&>::RefPtr CloseCB;
00282     bool send_close(
00283     const char* dst_xrl_target_name,
00284     const string&   sockid,
00285     const CloseCB&  cb
00286     );
00287 
00288     typedef XorpCallback1<void, const XrlError&>::RefPtr TcpListenCB;
00302     bool send_tcp_listen(
00303     const char* dst_xrl_target_name,
00304     const string&   sockid,
00305     const uint32_t& backlog,
00306     const TcpListenCB&  cb
00307     );
00308 
00309     typedef XorpCallback1<void, const XrlError&>::RefPtr SendCB;
00321     bool send_send(
00322     const char* dst_xrl_target_name,
00323     const string&   sockid,
00324     const vector<uint8_t>&  data,
00325     const SendCB&   cb
00326     );
00327 
00328     typedef XorpCallback1<void, const XrlError&>::RefPtr SendToCB;
00346     bool send_send_to(
00347     const char* dst_xrl_target_name,
00348     const string&   sockid,
00349     const IPv6& remote_addr,
00350     const uint32_t& remote_port,
00351     const vector<uint8_t>&  data,
00352     const SendToCB& cb
00353     );
00354 
00355     typedef XorpCallback1<void, const XrlError&>::RefPtr SendFromMulticastIfCB;
00371     bool send_send_from_multicast_if(
00372     const char* dst_xrl_target_name,
00373     const string&   sockid,
00374     const IPv6& group_addr,
00375     const uint32_t& group_port,
00376     const IPv6& ifaddr,
00377     const vector<uint8_t>&  data,
00378     const SendFromMulticastIfCB&    cb
00379     );
00380 
00381     typedef XorpCallback1<void, const XrlError&>::RefPtr SetSocketOptionCB;
00397     bool send_set_socket_option(
00398     const char* dst_xrl_target_name,
00399     const string&   sockid,
00400     const string&   optname,
00401     const uint32_t& optval,
00402     const SetSocketOptionCB&    cb
00403     );
00404 
00405 protected:
00406     XrlSender* _sender;
00407 
00408 private:
00409     static void unmarshall_tcp_open(
00410     const XrlError& e,
00411     XrlArgs*    a,
00412     TcpOpenCB       cb
00413     );
00414 
00415     static void unmarshall_udp_open(
00416     const XrlError& e,
00417     XrlArgs*    a,
00418     UdpOpenCB       cb
00419     );
00420 
00421     static void unmarshall_tcp_open_and_bind(
00422     const XrlError& e,
00423     XrlArgs*    a,
00424     TcpOpenAndBindCB        cb
00425     );
00426 
00427     static void unmarshall_udp_open_and_bind(
00428     const XrlError& e,
00429     XrlArgs*    a,
00430     UdpOpenAndBindCB        cb
00431     );
00432 
00433     static void unmarshall_udp_open_bind_join(
00434     const XrlError& e,
00435     XrlArgs*    a,
00436     UdpOpenBindJoinCB       cb
00437     );
00438 
00439     static void unmarshall_tcp_open_bind_connect(
00440     const XrlError& e,
00441     XrlArgs*    a,
00442     TcpOpenBindConnectCB        cb
00443     );
00444 
00445     static void unmarshall_udp_open_bind_connect(
00446     const XrlError& e,
00447     XrlArgs*    a,
00448     UdpOpenBindConnectCB        cb
00449     );
00450 
00451     static void unmarshall_bind(
00452     const XrlError& e,
00453     XrlArgs*    a,
00454     BindCB      cb
00455     );
00456 
00457     static void unmarshall_udp_join_group(
00458     const XrlError& e,
00459     XrlArgs*    a,
00460     UdpJoinGroupCB      cb
00461     );
00462 
00463     static void unmarshall_udp_leave_group(
00464     const XrlError& e,
00465     XrlArgs*    a,
00466     UdpLeaveGroupCB     cb
00467     );
00468 
00469     static void unmarshall_close(
00470     const XrlError& e,
00471     XrlArgs*    a,
00472     CloseCB     cb
00473     );
00474 
00475     static void unmarshall_tcp_listen(
00476     const XrlError& e,
00477     XrlArgs*    a,
00478     TcpListenCB     cb
00479     );
00480 
00481     static void unmarshall_send(
00482     const XrlError& e,
00483     XrlArgs*    a,
00484     SendCB      cb
00485     );
00486 
00487     static void unmarshall_send_to(
00488     const XrlError& e,
00489     XrlArgs*    a,
00490     SendToCB        cb
00491     );
00492 
00493     static void unmarshall_send_from_multicast_if(
00494     const XrlError& e,
00495     XrlArgs*    a,
00496     SendFromMulticastIfCB       cb
00497     );
00498 
00499     static void unmarshall_set_socket_option(
00500     const XrlError& e,
00501     XrlArgs*    a,
00502     SetSocketOptionCB       cb
00503     );
00504 
00505 private:
00506     /* Declare cached Xrl pointers */
00507     auto_ptr<Xrl> ap_xrl_tcp_open;
00508     auto_ptr<Xrl> ap_xrl_udp_open;
00509     auto_ptr<Xrl> ap_xrl_tcp_open_and_bind;
00510     auto_ptr<Xrl> ap_xrl_udp_open_and_bind;
00511     auto_ptr<Xrl> ap_xrl_udp_open_bind_join;
00512     auto_ptr<Xrl> ap_xrl_tcp_open_bind_connect;
00513     auto_ptr<Xrl> ap_xrl_udp_open_bind_connect;
00514     auto_ptr<Xrl> ap_xrl_bind;
00515     auto_ptr<Xrl> ap_xrl_udp_join_group;
00516     auto_ptr<Xrl> ap_xrl_udp_leave_group;
00517     auto_ptr<Xrl> ap_xrl_close;
00518     auto_ptr<Xrl> ap_xrl_tcp_listen;
00519     auto_ptr<Xrl> ap_xrl_send;
00520     auto_ptr<Xrl> ap_xrl_send_to;
00521     auto_ptr<Xrl> ap_xrl_send_from_multicast_if;
00522     auto_ptr<Xrl> ap_xrl_set_socket_option;
00523 };
00524 
00525 #endif /* __XRL_INTERFACES_SOCKET6_XIF_HH__ */
 All Classes Namespaces Functions Variables Typedefs Enumerations