Abstract: These are common functions which work only on the mbuf and
thus (because they do not touch an endpoint or context)
can be agnostic to the underlying transport, or the transport
- layer provides a transport specific function (e.g. payload
+ layer provides a transport specific function (e.g. payload
reallocation).
Author: E. Scott Daniels
#include "rmr.h" // things the users see
#include "rmr_agnostic.h" // agnostic things (must be included before private)
+#include "rmr_logging.h"
+
+//#define BUF_TOOLS_ONLY 1
+#include "tools_static.c"
// ---------- some wrappers need explicit copy-in functions, also header field setters -----
if( len > RMR_MAX_MEID ) {
len = RMR_MAX_MEID;
errno = EOVERFLOW;
- }
+ }
hdr = (uta_mhdr_t *) mbuf->header;
memcpy( hdr->meid, src, len );
if( dest != NULL ) {
hdr = msg->header;
- strcpy( dest, hdr->src );
+ zt_buf_fill( dest, hdr->src, RMR_MAX_SRC );
}
return dest;
hdr = msg->header;
if( HDR_VERSION( msg->header ) > 2 ) { // src ip was not present in hdr until ver 3
errno = 0;
- strcpy( dest, hdr->srcip );
+ zt_buf_fill( dest, hdr->srcip, RMR_MAX_SRC );
rstr = dest;
} else {
errno = 0;
- strcpy( dest, hdr->src ); // reutrn the name:port for old messages
+ zt_buf_fill( dest, hdr->src, RMR_MAX_SRC ); // reutrn the name:port for old messages
rstr = dest;
}
}