-static int return_value = 0;
-
-/*
- Test app can call this to have all emulated functions return failure instead
- of success.
-*/
-static void en_set_retur( int rv ) {
- return_value = rv;
-}
-
-
-
-static int em_nng_foo() {
- fprintf( stderr, "emulated functions in play" );
-}
-
-
-/*
- Simulated v1 message for receive to return. This needs to match the RMr header
- so that we can fill in length, type and xaction id things.
-#define MSG_VER 1
-struct em_msg {
- int32_t mtype; // message type ("long" network integer)
- int32_t plen; // payload length
- int32_t rmr_ver; // our internal message version number
- unsigned char xid[32]; // space for user transaction id or somesuch
- unsigned char sid[32]; // sender ID for return to sender needs
- unsigned char src[16]; // name of the sender (source)
- unsigned char meid[32]; // managed element id.
- struct timespec ts; // timestamp ???
-};
-*/
-
-/*
- v2 message; should be able to use it for everything that is set up here as
- we don't add a payload even if setting a v1 type.
-*/
-#define ALT_MSG_VER 1 // alternate every so often
-#define MSG_VER 2 // default version to insert
-struct em_msg {
- int32_t mtype; // message type ("long" network integer)
- int32_t plen; // payload length
- int32_t rmr_ver; // our internal message version number
- unsigned char xid[32]; // space for user transaction id or somesuch
- unsigned char sid[32]; // sender ID for return to sender needs
- unsigned char src[64]; // name of the sender (source)
- unsigned char meid[32]; // managed element id.
- struct timespec ts; // timestamp ???
-
- // V2 extension
- int32_t flags; // HFL_* constants
- int32_t len0; // length of the RMr header data
- int32_t len1; // length of the tracing data
- int32_t len2; // length of data 1 (d1)
- int32_t len3; // length of data 2 (d2)
-
-};