20#include <netinet/in.h>
24#if defined(__cplusplus)
29#ifndef __nsm2_typedef_context__
30#define __nsm2_typedef_context__
35#ifndef __nsm2_typedef_parse__
36#define __nsm2_typedef_parse__
41#define NSMSYS_NAME_SIZ 31
43#define NSMLIB_MAX_RETRY 30
44#define NSMLIB_WAIT_RETRY 2
45#define NSMLIB_MAX_CALLBACK 1024
49typedef enum NSMfunctype_enum {
67struct NSMrecvqueue_struct;
85 struct sockaddr_in sa;
86 char nodename[NSMSYS_NAME_SIZ + 1];
110 struct NSMrecvqueue_struct* recvqueue;
121void nsmlib_logflush();
122FILE* nsmlib_logging(FILE* logfp);
123void nsmlib_checkpoint(
NSMcontext* nsmc,
int val);
124int nsmlib_debuglevel(
int val);
125int nsmlib_addincpath(
const char* path);
126const char* nsmlib_nodename(
NSMcontext* nsmc,
int nodeid);
127int nsmlib_nodeid(
NSMcontext* nsmc,
const char* nodename);
128int nsmlib_nodepid(
NSMcontext* nsmc,
const char* nodename);
129int nsmlib_nodeproc(
NSMcontext* nsmc,
const char* nodename);
131int nsmlib_reqid(
NSMcontext* nsmc,
const char* reqname);
132const char* nsmlib_reqname(
NSMcontext* nsmc,
int reqid);
134int nsmlib_callback(
NSMcontext* nsmc,
const char* name,
135 NSMcallback_t callback, NSMfunctype functype);
136int nsmlib_readmem(
NSMcontext* nsmc,
void* buf,
137 const char* dat,
const char* fmt,
int rev);
139 const char* dat,
char* fmtbuf,
int bufsiz);
141 const char* dat,
const char* fmt,
int rev);
143 const char* dat,
const char* fmt,
int rev,
float cycle);
145 const void* ptr,
int siz);
147 const char* node,
const char* req,
148 uint npar,
int* pars,
int len,
const char* datap);
149int nsmlib_register_request(
NSMcontext* nsmc,
const char* name);
150NSMcontext* nsmlib_init(
const char* nodename,
const char* host,
151 int port,
int shmkey);
153void nsmlib_usesig(
NSMcontext* nsmc,
int usesig);
154NSMcontext* nsmlib_selectc(
int usesig,
unsigned int msec);
156NSMparse* nsmlib_parsefile(
const char* datname,
int revision,
157 const char* incpath,
char* fmtstr,
int* revisionp);
159#if defined(__cplusplus)