#include <assert.h>#include <stdio.h>#include <stdlib.h>#include <mock.h>#include <hipc/usoc.h>#include <hipc/usocutils.h>
Go to the source code of this file.
Data Structures | |
| struct | HIPC_usoc |
Macros | |
| #define | S HIPC_SUCCESS |
| #define | R 0 |
| #define | W 1 |
Functions | |
| enum HIPC_errno | hipcUsocRead (struct HIPC_usoc *so_p, void *buf, const size_t size) |
Reads exactly size bytes from so_p. More... | |
| enum HIPC_errno | hipcUsocWrite (struct HIPC_usoc *so_p, const void *buf, const size_t size) |
Writes exactly size bytes to so_p. More... | |
| static void | test_hipcUsocWriteMsgd (void) |
| static void | test_hipcUsocAccept (void) |
| static void | test_hipcUsocAcceptSimple (void) |
| int | main (int argc, char *argv[]) |
| #define S HIPC_SUCCESS |
Definition at line 10 of file test_usocutils.c.
Referenced by test_hipcUsocAccept(), test_hipcUsocAcceptSimple(), and test_hipcUsocWriteMsgd().
| #define R 0 |
Definition at line 11 of file test_usocutils.c.
Referenced by test_hipcUsocAccept(), and test_hipcUsocAcceptSimple().
| #define W 1 |
Definition at line 12 of file test_usocutils.c.
Referenced by test_hipcUsocAccept(), test_hipcUsocAcceptSimple(), and test_hipcUsocWriteMsgd().
| enum HIPC_errno hipcUsocRead | ( | struct HIPC_usoc * | so_p, |
| void * | buf, | ||
| const size_t | size | ||
| ) |
Reads exactly size bytes from so_p.
| so_p | Pointer to a universal socket |
| buf | Buffer into which bytes are read |
| size | Number of bytes to be read |
Definition at line 19 of file test_usocutils.c.
References HIPC_usoc::mio, and mockIORead().
Referenced by hipcsvsLedRun(), hipcsvsRtRun(), hipcUsocAccept(), and hipcUsocAcceptSimple().


| enum HIPC_errno hipcUsocWrite | ( | struct HIPC_usoc * | so_p, |
| const void * | buf, | ||
| const size_t | size | ||
| ) |
Writes exactly size bytes to so_p.
| so_p | Pointer to a universal socket |
| buf | Buffer from which bytes are written |
| size | Number of bytes to be written |
Definition at line 25 of file test_usocutils.c.
References HIPC_usoc::mio, and mockIOWrite().
Referenced by hipcUsocSendSysmsg(), hipcUsocWriteMsgd(), and send_cast().


|
static |
Definition at line 30 of file test_usocutils.c.
References HIPC_ERR_IO_WRITE, HIPC_MESSAGE_TYPE_QUIT, HIPC_MESSAGE_TYPE_SUCCESS, HIPC_SUCCESS, HIPC_UNSTRU, hipcGenmdQuit, hipcGenmdSuccess, hipcUsocWriteMsgd(), HIPC_usoc::mio, mockIOCheckCompletion(), mockIOInit(), S, and W.
Referenced by main().


|
static |
Definition at line 78 of file test_usocutils.c.
References HIPC_ERR_IO_READ, HIPC_ERR_IO_WRITE, HIPC_ERR_S_BUF_SHTG, HIPC_ERR_S_INV_CFG, HIPC_ERR_S_INV_NULL, HIPC_MESSAGE_TYPE_HELLO, HIPC_MESSAGE_TYPE_SYS, HIPC_MSGHDR_SIZE, HIPC_SUCCESS, HIPC_UNSTRU, HIPCUD_cfgmock1_CFGID_SIZE, HIPCUD_cfgmock1_SCFG, HIPCUD_cfgmock2_SCFG, hipcUsocAccept(), MOCK1S1::m1, MOCK1S1::m2, HIPC_usoc::mio, mockIOCheckCompletion(), mockIOInit(), R, S, and W.
Referenced by main().


|
static |
Definition at line 230 of file test_usocutils.c.
References HIPC_ERR_IO_READ, HIPC_ERR_IO_WRITE, HIPC_ERR_S_INV_CFG, HIPC_ERR_S_INV_NULL, HIPC_MESSAGE_TYPE_HELLO, HIPC_MESSAGE_TYPE_SYS, HIPC_SUCCESS, HIPC_UNSTRU, HIPCUD_cfgmock1_SCFG, hipcUsocAcceptSimple(), MOCK1S1::m1, MOCK1S1::m2, HIPC_usoc::mio, mockIOCheckCompletion(), mockIOInit(), R, S, and W.
Referenced by main().


| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 341 of file test_usocutils.c.
References test_hipcUsocAccept(), test_hipcUsocAcceptSimple(), and test_hipcUsocWriteMsgd().

1.8.6