![]() |
botsense
3.2.0
RoadNarrows Client-Server Proxied Services Framework
|
Library utilities. More...
#include <stdio.h>#include <stdlib.h>#include <libgen.h>#include <string.h>#include "rnr/rnrconfig.h"#include "rnr/log.h"#include "rnr/netmsgs.h"#include "botsense/BotSense.h"#include "botsense/libBotSense.h"#include "botsense/bsProxyMsgs.h"#include "bsLibInternal.h"Go to the source code of this file.
Functions | |
| int | bsPackMsgHdr (BsProxyMsgHdr_T *pMsgHdr, byte_t buf[], size_t bufSize) |
| Pack BotSense bsProxy message header. More... | |
| int | bsUnpackMsgHdr (byte_t buf[], size_t bufSize, BsProxyMsgHdr_T *pMsgHdr) |
| Unpack BotSense bsProxy message header. More... | |
| void | bsLogBuf (const char *sBufName, byte_t buf[], size_t uCount) |
| Log data bytes. More... | |
| void | bsLogAsciiBuf (const char *sBufName, byte_t buf[], size_t uCount) |
| Log ascii data bytes. More... | |
Library utilities.
Definition in file bsLibUtils.c.
| void bsLogAsciiBuf | ( | const char * | sBufName, |
| byte_t | buf[], | ||
| size_t | uCount | ||
| ) |
Log ascii data bytes.
Print diagnostic logging of the contents of a buffer of ASCII bytes.
| sBufName | Name of buffer. |
| buf | Buffer. |
| uCount | Number of bytes to log. |
Definition at line 175 of file bsLibUtils.c.
| void bsLogBuf | ( | const char * | sBufName, |
| byte_t | buf[], | ||
| size_t | uCount | ||
| ) |
Log data bytes.
Print diagnostic logging of the contents of a buffer of bytes.
| sBufName | Name of buffer. |
| buf | Buffer. |
| uCount | Number of bytes to log. |
Definition at line 145 of file bsLibUtils.c.
| int bsPackMsgHdr | ( | BsProxyMsgHdr_T * | pMsgHdr, |
| byte_t | buf[], | ||
| size_t | bufSize | ||
| ) |
Pack BotSense bsProxy message header.
| [in] | pMsgHdr | Pointer to message header structure. |
| [out] | buf | Output message buffer. |
| bufSize | Size of output buffer. |
On error, the appropriate < 0 negated BotSense Error Code is returned.
Definition at line 85 of file bsLibUtils.c.
References BS_ECODE_INTERNAL, BSPROXY_MSG_HDR_LEN, BsProxyMsgHdr_T::m_hdrBodyLen, BsProxyMsgHdr_T::m_hdrMagic, BsProxyMsgHdr_T::m_hdrMsgId, BsProxyMsgHdr_T::m_hdrTid, and BsProxyMsgHdr_T::m_hdrVConn.
| int bsUnpackMsgHdr | ( | byte_t | buf[], |
| size_t | bufSize, | ||
| BsProxyMsgHdr_T * | pMsgHdr | ||
| ) |
Unpack BotSense bsProxy message header.
| [in] | buf | Input message buffer. |
| bufSize | Size of input buffer. | |
| [out] | pMsgHdr | Pointer to message header structure. |
On error, the appropriate < 0 negated BotSense Error Code is returned.
Definition at line 115 of file bsLibUtils.c.
References BS_ECODE_INTERNAL, BSPROXY_MSG_HDR_LEN, BsProxyMsgHdr_T::m_hdrBodyLen, BsProxyMsgHdr_T::m_hdrMagic, BsProxyMsgHdr_T::m_hdrMsgId, BsProxyMsgHdr_T::m_hdrTid, and BsProxyMsgHdr_T::m_hdrVConn.