18 const char *
const filename,
const int lineno)
21 const char *errdtlstr;
24 fprintf(stderr,
"%s:%d:sess_p is NULL.\n", filename, lineno);
29 fprintf(stderr,
"%s:%d:%s\n",
34 fprintf(stderr,
"std_errno:%d:%s\n", std_errno,
39 if (
'\0' != errdtlstr[0]) {
40 fprintf(stderr,
"ErrorDetail:%s\n", errdtlstr);
64 "Failed to receive a message");
84 "Failed to send a message");
106 "Not established session");
147 "Handler returned an error.");
155 "INVALID_MSG_TYPE: Type must be SUCEESS, CAST, or QUIT");
157 }
while (0 == f_end);
175 char const *
const str,
181 unsigned char struno;
189 "Not established session");
193 &struno, &offset, &size);
313 char const *
const str,
void *
const cimg)
317 unsigned char struno;
325 "Not established session");
329 &struno, &offset, &size);
362 char const *
const str,
void *
const cimg)
366 unsigned char struno;
374 "Not established session");
378 &struno, &offset, &size);
enum HIPC_errno hipcClientInit(struct HIPC_client *const cl_p, struct HIPC_client const *const clbase_p)
Initializes a HIPC client with allocating memory space if necessary.
void hipcClientSetStdErrno(struct HIPC_client *const cl_p)
Sets errno value to a HIPC client.
unsigned char hipc_msg[HIPC_MSG_ALLOCSIZE]
void hipcGenmsgHello(hipc_msg msg, const struct HIPC_client *const cl_p)
Generates HELLO message.
enum HIPC_errno hipcClientFeedSysmsg(struct HIPC_client *const cl_p, const hipc_msg msgR)
Feeds a system message and incorporates it to the internal data of the client.
enum HIPC_errno hipcClientCallHandler(struct HIPC_client *const cl_p, const unsigned char struno, const hipc_msg msgR)
Calls a handler that corresponds to struno.
enum HIPC_errno hipcRecvMsg(hipc_session *const sess_p, hipc_msg msgR)
Receives a HIPC message.
enum HIPC_errno hipcSendMsg(hipc_session *const sess_p, hipc_msg msgS)
Sends a HIPC message.
enum HIPC_errno hipcClientCheckMbrSize(struct HIPC_client *const cl_p)
Checks whether sizes of members in structures in a server are the same as sizes in a client...
enum HIPC_errno hipcOpen(hipc_session *const sess_p, struct HIPC_client const *const clbase_p, enum HIPC_errno(*rfnc_p)(void *, hipc_msg), void *rarg, enum HIPC_errno(*wfnc_p)(void *, const hipc_msg), void *warg)
Open a session to a HIPC server.
enum HIPC_errno hipcClientGetStrutpl(struct HIPC_client *const cl_p, char const *const str, unsigned char *struno_p, size_t *offset_p, size_t *size_p)
Gets structure number, offset, and size from ID string.
enum HIPC_errno(* wfnc_p)(void *, const hipc_msg)
enum HIPC_errno hipcGet(hipc_session *const sess_p, char const *const str, void *const cimg)
Gets data specified by str from a HIPC server.
enum HIPC_errno hipcGenmsgPut(hipc_msg msg, struct HIPC_client *const cl_p, const unsigned char struno, const size_t offset, const size_t size)
Generates PUT message.
int hipcClientGetStdErrno(const struct HIPC_client *const cl_p)
Gets an errno value saved by hipcClientSetStdErrno().
enum HIPC_errno hipcPut(hipc_session *const sess_p, char const *const str, void *const cimg)
Puts data specified by str from a HIPC server.
void hipcGenmsgBye(hipc_msg msg)
Initializes a HIPC message as a BYE message.
unsigned char hipcMsgOffset(const hipc_msg msg)
Returns offset of a HIPC message.
enum HIPC_errno hipcClose(hipc_session *const sess_p)
Closes a session.
void hipcClientSetHandler(struct HIPC_client *const cl_p, const unsigned char struno, enum HIPC_errno(*hndlr_p)(struct HIPC_client *, const hipc_msg, void *, void *), void *const arg)
Sets an handler hndlr_p to a structure number struno.
enum HIPC_errno hipcClientFeedStrumsg(struct HIPC_client *const cl_p, const hipc_msg msgR)
Feeds a message and incorporates it to the internal data of a client.
enum HIPC_errno hipcClientSetError(struct HIPC_client *const cl_p, enum HIPC_errno hipc_errno, char const *const str)
Sets an error to a client with error detail.
enum HIPC_errno hipcGenmsgGet(hipc_msg msg, struct HIPC_client *const cl_p, const unsigned char struno, const size_t offset, const size_t size)
Generates GET message.
enum HIPC_errno hipcClientUnpack(struct HIPC_client *const cl_p, const unsigned char struno, const size_t offset, const size_t size, void *simg, void *cimg)
Unpacks a range of contents of simg into cimg.
void hipcClientSetCimg(struct HIPC_client *const cl_p, const unsigned char struno, void *cimg_p)
Sets a client-side image that is a structure instance of a structure.
enum HIPC_errno hipcWaitReturn(hipc_session *const sess_p, hipc_msg msgR)
Waits a return message from a HIPC server.
enum HIPC_errno hipcSetHandler(hipc_session *const sess_p, char const *const str, void *const cimg, enum HIPC_errno(*hndlr_p)(struct HIPC_client *, const hipc_msg, void *, void *), void *const arg)
Set a handler to a structure type.
unsigned char hipcMsgStruno(const hipc_msg msg)
Returns structure number of a HIPC message.
void hipcERRCHECK(const hipc_session *const sess_p, const char *const filename, const int lineno)
Checks whether an error has occurred.
enum HIPC_session_state state
const char * hipcClientGetErrStr(const struct HIPC_client *const cl_p)
Gets a string describing a HIPC error number that has been set to a HIPC client.
unsigned char hipcClientGetNsysmsg(struct HIPC_client const *const cl_p)
Gets the number of system messages.
enum HIPC_errno hipcClientPack(struct HIPC_client *const cl_p, const unsigned char struno, const size_t offset, const size_t size, void *simg, void *cimg)
Packs a range of contents of cimg into simg.
enum HIPC_errno hipcClientFeedUnstrumsgAsError(struct HIPC_client *const cl_p, const hipc_msg msgR)
Feeds a message and sets an error specified by the message.
void hipcClientTerminate(struct HIPC_client *const cl_p)
Terminates a HIPC client with releasing the memory space that the client has.
enum HIPC_errno hipcClientGetHipcErrno(const struct HIPC_client *const cl_p)
Gets a HIPC error number that has been set.
enum HIPC_errno(* rfnc_p)(void *, hipc_msg)
const char * hipcClientGetErrDtlStr(const struct HIPC_client *const cl_p)
Gets a string describing details of an error that has been set to a HIPC client.
unsigned char hipcMsgType(const hipc_msg msg)
Returns type of a HIPC message.
unsigned char hipcMsgRngsize(const hipc_msg msg)
Returns range size of a HIPC message.