54 #include "rnr/rnrconfig.h" 56 #include "rnr/netmsgs.h" 73 .brief =
"The /dev/null proxied device.",
76 .maintainer =
"RaodNarrows LLC",
77 .license =
"(C) 2010 RoadNarrows LLC. All rights reserved.",
104 const NMMsgDef_T *pMsgDef;
108 return pMsgDef!=NULL? pMsgDef->m_sMsgName:
"unknown";
130 NULL, (
size_t)0, &bsNullAppInfo, bInitTrace);
151 return bsServerReqCloseDev(pClient, hndVConn);
188 "write_len=%zu > max_len=%zu",
189 uWriteLen, (
size_t)BSNULL_REQWRITE_WRITEBUF_LEN);
192 bTrace = bsClientAttrGetTraceState(pClient, hndVConn);
197 memcpy(msgReq.
m_writebuf.
u.m_buf, wbuf, uWriteLen);
211 n = bsClientTrans(pClient, hndVConn,
212 msgIdReq, buf, (
size_t)n,
213 msgIdRsp, buf,
sizeof(buf));
#define BS_NULL_DEV_NAME
DevNull device.
#define BSCLIENT_TRY_ECODE(pClient, ecode, efmt,...)
Check if <b><i>BotSense</i></b> return value is not an error ( < 0).
#define BS_ECODE_BAD_VAL
bad value
int bsNullReqWrite(BsClient_P pClient, BsVConnHnd_T hndVConn, byte_t wbuf[], size_t uWriteLen)
Proxied request to write to /dev/null.
union BsNullReqWrite_T::@8::@9 u
aligned vector items
const char * bsNullGetMsgName(BsClient_P pClient, BsVConnHnd_T hndVConn, uint_t uMsgId)
Get the DevNull message name.
int bsNullReqOpen(BsClient_P pClient, bool_t bInitTrace)
Request proxy server to establish a virtual connection to the /dev/null device.
The Client Structure Type.
<b><i>BotSense</i></b> bsProxy client library /dev/null interface.
const NMMsgDef_T * BsNullLookupMsgDef(BsNullMsgId_T eMsgId)
Look up the message definition associated with the message id.
INLINE_IN_H int BsNullUnpackRspWrite(byte_t buf[], size_t uMsgLen, BsNullRspWrite_T *pStruct, bool_t bTrace)
Unpack a BsNullRspWrite ITV message in big-endian byte order from the input buffer.
<b><i>BotSense</i></b> client library declarations.
#define BS_NULL_SERVER_MOD
server plugin dll module
<b><i>BotSense</i></b> client library information and callbacks to application-specific data...
#define BSCLIENT_TRY_EXPR(pClient, expr, ecode, efmt,...)
Check if expression evaluates to true.
#define BSNULL_REQWRITE_WRITEBUF_LEN
struct BsNullReqWrite_T::@8 m_writebuf
vector
byte_t m_byteswritten
byteswritten
#define BSPROXY_BUF_BODY(buf)
Convenience macro to produce a buffer (offset, size) 2-tuple.
int bsNullReqClose(BsClient_P pClient, BsVConnHnd_T hndVConn)
Request proxy server to close client's proxied DevNull device vitual connection.
#define BSCLIENT_HAS_VCONN(pClient, hnd)
Tests if the handle is valid and there is an established virtual connection.
#define BSCLIENT_TRY_NM_ECODE(pClient, nmecode, efmt,...)
Check if NetMsgs (un)packing return value is not an error ( < 0).
#define BSPROXY_MSG_MAX_LEN
total message maximum length
INLINE_IN_H int BsNullPackReqWrite(BsNullReqWrite_T *pStruct, byte_t buf[], size_t bufSize, bool_t bTrace)
Pack a BsNullReqWrite ITV message in big-endian byte order into the output buffer.
static BsClientAppInfo_T bsNullAppInfo
<b><i>BotSense</i></b> client application information.
const char * app_name
application name
<b><i>BotSense</i></b> package top-level, unifying header declarations.
size_t m_count
vector item count
BotSense bsProxy server - client /dev/null NetMsgs XML Definition.
int BsVConnHnd_T
virtual connection handle type