Go to the source code of this file.
Functions | |
enum HIPC_errno | hipcUsocWriteMsgd (struct HIPC_usoc *const so_p, hipc_msgd const *const md_p) |
Writes md_p to so_p . More... | |
enum HIPC_errno | hipcUsocAccept (struct HIPC_usoc *const so_p, const struct HIPC_scfg **const cfg_pp, const struct HIPC_scfg *const *const cfg_ary, const unsigned int n_cfg, unsigned char *const buf, size_t buf_size) |
Accepts a HIPC session if cfg_ary includes a configuration of coming HELLO message. More... | |
enum HIPC_errno | hipcUsocAcceptSimple (struct HIPC_usoc *const so_p, const struct HIPC_scfg *const cfg_p) |
Accepts a HIPC session of cfg_p . More... | |
enum HIPC_errno hipcUsocWriteMsgd | ( | struct HIPC_usoc *const | so_p, |
hipc_msgd const *const | md_p | ||
) |
Writes md_p
to so_p
.
so_p | Pointer to a universal socket |
md_p | Pointer to HIPC message data |
Definition at line 14 of file usocutils.c.
References HIPC_MSGHDR_SIZE, HIPC_SUCCESS, hipcMsgdBdyPtr, hipcMsgdBdySize(), hipcMsgdHdrPtr, and hipcUsocWrite().
enum HIPC_errno hipcUsocAccept | ( | struct HIPC_usoc *const | so_p, |
const struct HIPC_scfg **const | cfg_pp, | ||
const struct HIPC_scfg *const *const | cfg_ary, | ||
const unsigned int | n_cfg, | ||
unsigned char *const | buf, | ||
const size_t | buf_size | ||
) |
Accepts a HIPC session if cfg_ary
includes a configuration of coming HELLO message.
Accepted configuration is set to cfg_pp
.
so_p | Pointer to a universal socket |
cfg_pp | Configuration accepted |
cfg_ary | Acceptable configurations |
n_cfg | Number of acceptable configurations |
buf | buffer for HELLO message |
buf_size | size of the buffer |
Definition at line 71 of file usocutils.c.
References HIPC_ERR_S_BUF_SHTG, HIPC_ERR_S_INV_CFG, HIPC_ERR_S_INV_NULL, HIPC_MSGHDR_SIZE, HIPC_SUCCESS, hipcMsghdrBdysize(), hipcScfgCheckStrusize(), hipcScfgInit(), and hipcUsocRead().
enum HIPC_errno hipcUsocAcceptSimple | ( | struct HIPC_usoc *const | so_p, |
const struct HIPC_scfg *const | cfg_p | ||
) |
Accepts a HIPC session of cfg_p
.
This function use the stack for a buffer, so the stack size must be large enough.
so_p | Pointer to a universal socket |
cfg_p | Acceptable configuration |
Definition at line 141 of file usocutils.c.
References HIPC_scfg::cfgid, HIPC_scfg::cfgid_header, HIPC_ERR_S_INV_CFG, HIPC_ERR_S_INV_NULL, HIPC_MSGHDR_SIZE, HIPC_SUCCESS, hipcMsghdrBdysize(), hipcScfgCheckStrusize(), hipcScfgInit(), and hipcUsocRead().