#include <SRPC.H>
Public Types | |
enum | { unknown_host = -1, unknown_interface = -2, version_skew = -3, protocol_violation = -4, buffer_too_small = -5, transport_failure = -6, internal_trouble = -7, invalid_parameter = -8, partner_went_away = -9, not_implemented = -10, read_timeout = -11 } |
enum | which_end { caller, callee } |
enum | { default_intf_version = -1 } |
enum | { default_proc_id = -1 } |
enum | { any = -1 } |
Public Member Functions | |
throw (failure) | |
SRPC (which_end me, TCP_sock *sock) throw (failure) | |
~SRPC () throw (failure) | |
void | start_call (int proc_id=default_proc_id, int intf_version=default_intf_version) throw (failure) |
void | await_call (int &proc_id, int &intf_version) throw (failure) |
bool | previous_failure (SRPC::failure *f=NULL) throw () |
bool | alive (SRPC::failure *f=NULL) throw () |
TCP_sock * | socket () throw (failure) |
Text | local_socket () throw (failure) |
Text | remote_socket () throw (failure) |
void | enable_read_timeout (unsigned int seconds, bool use_between_calls=false) throw () |
void | disable_read_timeout () throw () |
bool | get_read_timeout (unsigned int &seconds, bool &use_between_calls) throw () |
void | send_int32 (int i) throw (failure) |
int | recv_int32 (bool *got_end=NULL) throw (failure) |
void | send_int (int i) throw (failure) |
int | recv_int (bool *got_end=NULL) throw (failure) |
void | send_int16 (Basics::int16 i) throw (failure) |
Basics::int16 | recv_int16 (bool *got_end=NULL) throw (failure) |
void | send_short (Basics::int16 i) throw (failure) |
Basics::int16 | recv_short (bool *got_end=NULL) throw (failure) |
void | send_int64 (Basics::int64 i) throw (failure) |
Basics::int64 | recv_int64 (bool *got_end=NULL) throw (failure) |
void | send_float (float f) throw (failure) |
float | recv_float (bool *got_end=NULL) throw (failure) |
void | send_bool (bool b) throw (failure) |
bool | recv_bool (bool *got_end=NULL) throw (failure) |
void | send_chars (const char *s) throw (failure) |
char * | recv_chars (bool *got_end=NULL) throw (failure) |
char * | recv_chars (char *buff, int buff_len, bool *got_end=NULL) throw (failure) |
void | recv_chars_here (char *buffer, int &len, bool *got_end=NULL) throw (failure) |
void | send_Text (const Text &t) throw (failure) |
void | recv_Text (Text &t, bool *got_end=NULL) throw (failure) |
void | send_bytes (const char *buffer, int len) throw (failure) |
char * | recv_bytes (int &len, bool *got_end=NULL) throw (failure) |
void | recv_bytes_here (char *buffer, int &len, bool *got_end=NULL) throw (failure) |
void | send_socket (sockaddr_in &sock) throw (failure) |
sockaddr_in | recv_socket (bool *got_end=NULL) throw (failure) |
void | send_int16_array (const Basics::int16 *seq, int len) throw (SRPC::failure) |
Basics::int16 * | recv_int16_array (int &len) throw (SRPC::failure) |
void | send_short_array (const Basics::int16 *seq, int len) throw (SRPC::failure) |
Basics::int16 * | recv_short_array (int &len) throw (SRPC::failure) |
void | send_int32_array (const Basics::int32 *seq, int len) throw (SRPC::failure) |
Basics::int32 * | recv_int32_array (int &len) throw (SRPC::failure) |
void | send_int64_array (const Basics::int64 *seq, int len) throw (SRPC::failure) |
Basics::int64 * | recv_int64_array (int &len) throw (SRPC::failure) |
void | send_int_seq (int_seq &is) throw (failure) |
void | recv_int_seq (int_seq &is) throw (failure) |
void | send_chars_seq (chars_seq &cs) throw (failure) |
void | recv_chars_seq (chars_seq &cs) throw (failure) |
void | send_bytes_seq (bytes_seq &bs) throw (failure) |
void | recv_bytes_seq (bytes_seq &bs) throw (failure) |
void | send_seq_start (int len=any, int bytes=any) throw (failure) |
void | recv_seq_start (int *len=NULL, int *bytes=NULL) throw (failure) |
void | send_seq_end () throw (failure) |
void | recv_seq_end () throw (failure) |
void | send_end () throw (failure) |
void | recv_end () throw (failure) |
void | send_failure (int r, const Text &msg, bool remote_only=false) throw (failure) |
Static Public Member Functions | |
static Text | this_host () throw (failure) |
static void | split_name (const Text &host_and_port, Text &host, Text &port) |
static failure | convert_TCP_failure (TCP_sock::failure tf) |
Private Member Functions | |
SRPC (SRPC &) | |
void | operator= (SRPC &) |
Static Private Member Functions | |
static void | init () throw (failure) |
Private Attributes | |
SRPC_impl * | p |
Static Private Attributes | |
static pthread_once_t | init_block |
Friends | |
class | SRPC_impl |
Classes | |
struct | failure |
|
|
|
|
|
|
|
|
|
|
|
Definition at line 68 of file SRPC.C. References SRPC_listener::create(), and NEW_CONSTR. |
|
Definition at line 89 of file SRPC.C. References SRPC_impl::failed, and SRPC_impl::initial. |
|
|
|
Definition at line 126 of file SRPC.C. References convert_TCP_failure(). Referenced by VDirEvaluator::alive(), C_Conn4(), C_Fail1(), and children::killer_body(). |
|
Definition at line 217 of file SRPC.C. References SRPC_impl::ic_start_call, SRPC_impl::op_await_call, and SRPC_impl::ready. Referenced by LimService::Run(), S_Conn2(), S_Conn3(), S_Conn4(), S_Conn5(), S_Conn6(), S_Conn7(), and S_Multi1(). |
|
Definition at line 1072 of file SRPC.C. References TCP_sock::environment_problem, internal_trouble, partner_went_away, TCP_sock::partner_went_away, read_timeout, TCP_sock::read_timeout, transport_failure, unknown_host, TCP_sock::unknown_host, unknown_interface, and TCP_sock::unknown_port. Referenced by alive(), RunTool::do_it(), SRPC_impl::report_TCP_failure(), and this_host(). |
|
Definition at line 184 of file SRPC.C. References p, and SRPC_impl::use_read_timeout. |
|
Definition at line 175 of file SRPC.C. Referenced by RunTool::get_info(), DebugC::GetCacheId(), DebugC::GetCacheInstance(), DebugC::GetCacheState(), VDirEvaluator::list(), VDirEvaluator::lookup(), DebugC::NullCall(), and ShortIdReceptionist(). |
|
|
|
|
|
Definition at line 141 of file SRPC.C. References Text::cchars(), TCP_sock::get_local_addr(), inet_ntoa_r(), p, and socket(). Referenced by print_connection(). |
|
|
|
Definition at line 119 of file SRPC.C. References SRPC_impl::failed. |
|
Definition at line 352 of file SRPC.C. References SRPC_impl::ic_bool_false, SRPC_impl::ic_bool_true, and SRPC_impl::op_recv_bool. Referenced by C_Bool(), RunTool::do_it(), and S_Bool(). |
|
Definition at line 534 of file SRPC.C. References SRPC_impl::ic_bytes, NEW_PTRFREE_ARRAY, and SRPC_impl::op_recv_chars. Referenced by VSWrite(). |
|
Definition at line 558 of file SRPC.C. References SRPC_impl::ic_bytes, and SRPC_impl::op_recv_bytes_here. Referenced by DeclStep::DeclStep(), VDirSurrogate::getNFSInfo(), VDirEvaluator::lookup(), VDirSurrogate::lookupIndex(), and VSWrite(). |
|
Definition at line 897 of file SRPC.C. References bytes_seq_impl::allocate_buffer(), bytes_seq_impl::expand(), bytes_seq_impl::full, SRPC_impl::ic_bytes_seq, byte_str::l, bytes_seq_impl::manual, SRPC_impl::op_recv_bytes_seq, and byte_str::p. |
|
Definition at line 423 of file SRPC.C. References SRPC_impl::ic_chars, NEW_PTRFREE_ARRAY, and SRPC_impl::op_recv_chars. |
|
Definition at line 396 of file SRPC.C. References SRPC_impl::ic_chars, NEW_PTRFREE_ARRAY, and SRPC_impl::op_recv_chars. Referenced by C_Catna(), C_CatnT(), VDirSurrogate::getAttrib(), VDirSurrogate::getAttribHistory(), VDirSurrogate::getNFSInfo(), InAttribsStep::InAttribsStep(), VDirSurrogate::listAttribs(), MergeAttribStep::MergeAttribStep(), S_Cat2(), and WriteAttribStep::WriteAttribStep(). |
|
Definition at line 455 of file SRPC.C. References SRPC_impl::ic_chars, and SRPC_impl::op_recv_chars_here. Referenced by C_Cat2(), VDirEvaluator::list(), and LookupStep::LookupStep(). |
|
Definition at line 825 of file SRPC.C. References chars_seq_impl::allocate_buffer(), chars_seq_impl::expand(), chars_seq_impl::full, SRPC_impl::ic_chars_seq, chars_seq_impl::manual, and SRPC_impl::op_recv_chars_seq. Referenced by S_Catna(), S_Catnf(), S_CatnT(), and S_Seq2(). |
|
|
Definition at line 239 of file SRPC.H. References recv_int32(). Referenced by C_Add2f(), C_Addnfp(), RunTool::get_info(), S_Add2f(), and S_Addnfp(). |
|
|
Definition at line 299 of file SRPC.C. References SRPC_impl::ic_int16, and SRPC_impl::op_recv_int16. Referenced by C_Add_Int16Array(), and recv_short(). |
|
Definition at line 704 of file SRPC.C. References SRPC_impl::ic_int16_array, NEW_PTRFREE_ARRAY, and SRPC_impl::op_recv_int16_array. Referenced by recv_short_array(), and S_Add_Int16Array(). |
|
Definition at line 272 of file SRPC.C. References SRPC_impl::ic_int32, and SRPC_impl::op_recv_int32. Referenced by C_Add_Int32Array(), recv_float(), and recv_int(). |
|
Definition at line 739 of file SRPC.C. References SRPC_impl::ic_int32_array, NEW_PTRFREE_ARRAY, and SRPC_impl::op_recv_int32_array. Referenced by S_Add_Int32Array(). |
|
Definition at line 326 of file SRPC.C. References SRPC_impl::ic_int64, and SRPC_impl::op_recv_int64. Referenced by C_Add2_64(), C_Add_Int64Array(), and S_Add2_64(). |
|
Definition at line 774 of file SRPC.C. References SRPC_impl::ic_int64_array, NEW_PTRFREE_ARRAY, and SRPC_impl::op_recv_int64_array. Referenced by S_Add_Int64Array(). |
|
Definition at line 663 of file SRPC.C. References int_seq_impl::allocate_buffer(), SRPC_impl::ic_int32_seq, and SRPC_impl::op_recv_int32_seq. |
|
Definition at line 984 of file SRPC.C. References SRPC_impl::data_in, SRPC_impl::ic_seq_end, and SRPC_impl::op_recv_seq_end. Referenced by VDirSurrogate::getAttrib(), VDirSurrogate::getAttribHistory(), VDirEvaluator::list(), VDirSurrogate::listAttribs(), S_Seq1(), and S_Seq2(). |
|
Definition at line 958 of file SRPC.C. References SRPC_impl::ic_seq_start, SRPC_impl::op_recv_seq_start, and SRPC_impl::seq_in. Referenced by VDirSurrogate::getAttrib(), VDirSurrogate::getAttribHistory(), VDirEvaluator::list(), VDirSurrogate::listAttribs(), S_Seq1(), and S_Seq2(). |
|
Definition at line 222 of file SRPC.H. References recv_int16(). |
|
Definition at line 324 of file SRPC.H. References recv_int16_array(). |
|
Definition at line 612 of file SRPC.C. References SRPC_impl::ic_socket, and SRPC_impl::op_recv_socket. |
|
Definition at line 496 of file SRPC.C. References SRPC_impl::ic_text, NEW_PTRFREE_ARRAY, and SRPC_impl::op_recv_text. Referenced by C_Cat2T(), C_Catnf(), RunTool::get_info(), and S_Cat2T(). |
|
Definition at line 156 of file SRPC.C. References Text::cchars(), TCP_sock::get_remote_addr(), inet_ntoa_r(), p, and socket(). Referenced by print_connection(), ShortIdFailure(), ShortIdReceptionist(), and VestaSourceFailure(). |
|
Definition at line 341 of file SRPC.C. References SRPC_impl::ic_bool_false, SRPC_impl::ic_bool_true, and SRPC_impl::op_send_bool. |
|
|
Definition at line 867 of file SRPC.C. References bytes_seq_impl::allocate_buffer(), SRPC_impl::ic_bytes_seq, SRPC_impl::op_send_bytes_seq, and byte_str::p. |
|
|
Definition at line 795 of file SRPC.C. References chars_seq_impl::allocate_buffer(), SRPC_impl::ic_chars_seq, and SRPC_impl::op_send_chars_seq. Referenced by C_Catna(), C_Catnf(), C_CatnT(), C_Seq2(), and RunTool::do_it(). |
|
|
Definition at line 1054 of file SRPC.C. References SRPC_impl::failed, SRPC_impl::ic_failure, and SRPC_impl::op_send_failure. Referenced by C_Fail1(), and ShortIdReceptionist(). |
|
Definition at line 234 of file SRPC.H. References send_int32(). Referenced by C_Add2f(), C_Addnfp(), S_Add2f(), and S_Addnfp(). |
|
|
Definition at line 287 of file SRPC.C. References SRPC_impl::ic_int16, and SRPC_impl::op_send_int16. Referenced by S_Add_Int16Array(), and send_short(). |
|
Definition at line 690 of file SRPC.C. References SRPC_impl::ic_int16_array, and SRPC_impl::op_send_int16_array. Referenced by C_Add_Int16Array(), and send_short_array(). |
|
Definition at line 260 of file SRPC.C. References SRPC_impl::ic_int32, and SRPC_impl::op_send_int32. Referenced by S_Add_Int32Array(), send_float(), and send_int(). |
|
Definition at line 725 of file SRPC.C. References SRPC_impl::ic_int32_array, and SRPC_impl::op_send_int32_array. Referenced by C_Add_Int32Array(). |
|
Definition at line 314 of file SRPC.C. References SRPC_impl::ic_int64, and SRPC_impl::op_send_int64. Referenced by C_Add2_64(), S_Add2_64(), and S_Add_Int64Array(). |
|
Definition at line 760 of file SRPC.C. References SRPC_impl::ic_int64_array, and SRPC_impl::op_send_int64_array. Referenced by C_Add_Int64Array(). |
|
Definition at line 646 of file SRPC.C. References int_seq_impl::allocate_buffer(), SRPC_impl::ic_int32_seq, and SRPC_impl::op_send_int32_seq. |
|
Definition at line 973 of file SRPC.C. References SRPC_impl::data_out, SRPC_impl::ic_seq_end, and SRPC_impl::op_send_seq_end. |
|
Definition at line 945 of file SRPC.C. References SRPC_impl::ic_seq_start, SRPC_impl::op_send_seq_start, and SRPC_impl::seq_out. |
|
Definition at line 218 of file SRPC.H. References send_int16(). |
|
Definition at line 319 of file SRPC.H. References send_int16_array(). |
|
Definition at line 596 of file SRPC.C. References SRPC_impl::ic_socket, and SRPC_impl::op_send_socket. Referenced by RunTool::send_relay_socket(), and RunTool::send_vdir(). |
|
Definition at line 483 of file SRPC.C. References SRPC_impl::ic_text, and SRPC_impl::op_send_text. Referenced by C_Cat2T(), RunTool::do_it(), S_Cat2T(), and S_Catnf(). |
|
Definition at line 137 of file SRPC.C. References p, and SRPC_impl::s. Referenced by local_socket(), and remote_socket(). |
|
Definition at line 107 of file SRPC.C. References Text::FindCharR(), and Text::Sub(). |
|
|
Definition at line 99 of file SRPC.C. References convert_TCP_failure(), and TCP_sock::this_host(). Referenced by CreateRootForDeriveds(), and RunTool(). |
|
|
|
|
|
|
|
Definition at line 499 of file SRPC.H. Referenced by disable_read_timeout(), local_socket(), remote_socket(), and socket(). |