19 #include <netinet/in.h>
23 #if defined(__cplusplus)
26 #if defined(__dummy_close_bracket_to_cheat_emacs_auto_indent)
31 #ifndef __nsm2_typedef_context__
32 #define __nsm2_typedef_context__
37 #ifndef __nsm2_typedef_parse__
38 #define __nsm2_typedef_parse__
43 #define NSMSYS_NAME_SIZ 31
45 #define NSMLIB_MAX_RETRY 30
46 #define NSMLIB_WAIT_RETRY 2
47 #define NSMLIB_MAX_CALLBACK 1024
51 typedef enum NSMfunctype_enum {
69 struct NSMrecvqueue_struct;
87 struct sockaddr_in sa;
88 char nodename[NSMSYS_NAME_SIZ + 1];
112 struct NSMrecvqueue_struct* recvqueue;
123 void nsmlib_logflush();
124 FILE* nsmlib_logging(FILE* logfp);
125 void nsmlib_checkpoint(
NSMcontext* nsmc,
int val);
126 int nsmlib_debuglevel(
int val);
127 int nsmlib_addincpath(
const char* path);
128 const char* nsmlib_nodename(
NSMcontext* nsmc,
int nodeid);
129 int nsmlib_nodeid(
NSMcontext* nsmc,
const char* nodename);
130 int nsmlib_nodepid(
NSMcontext* nsmc,
const char* nodename);
131 int nsmlib_nodeproc(
NSMcontext* nsmc,
const char* nodename);
133 int nsmlib_reqid(
NSMcontext* nsmc,
const char* reqname);
134 const char* nsmlib_reqname(
NSMcontext* nsmc,
int reqid);
135 const char* nsmlib_strerror(
NSMcontext* nsmc);
136 int nsmlib_callback(
NSMcontext* nsmc,
const char* name,
137 NSMcallback_t callback, NSMfunctype functype);
138 int nsmlib_readmem(
NSMcontext* nsmc,
void* buf,
139 const char* dat,
const char* fmt,
int rev);
141 const char* dat,
char* fmtbuf,
int bufsiz);
143 const char* dat,
const char* fmt,
int rev);
145 const char* dat,
const char* fmt,
int rev,
float cycle);
147 const void* ptr,
int siz);
149 const char* node,
const char* req,
150 uint npar,
int* pars,
int len,
const char* datap);
151 int nsmlib_register_request(
NSMcontext* nsmc,
const char* name);
152 NSMcontext* nsmlib_init(
const char* nodename,
const char* host,
153 int port,
int shmkey);
155 void nsmlib_usesig(
NSMcontext* nsmc,
int usesig);
156 NSMcontext* nsmlib_selectc(
int usesig,
unsigned int msec);
158 NSMparse* nsmlib_parsefile(
const char* datname,
int revision,
159 const char* incpath,
char* fmtstr,
int* revisionp);
161 #if defined(__dummy_open_bracket_to_cheat_emacs_auto_indent)
162 __dummy_open_bracket_to_cheat_emacs_auto_indent {
164 #if defined(__cplusplus)