1 #include <amitcp/socketbasetags.h>
2 #include <utility/hooks.h>
3 #include <sys/socket.h>
4 #include <netinet/in.h>
9 #include <proto/socket.h>
10 #define SYSTEM_PRIVATE
11 #include <proto/miami.h>
15 ULONG __kvm_errno
= NULL
;
17 kvm_t
*kvm_openfiles(const char *execfile
, const char *corefile
, const char *swapfile
, int flags
, char *errstr
)
20 /* We have only one core and kernel (currently running) */
21 if (execfile
|| corefile
) {
22 strcpy (errstr
, "Operation not supported");
25 SocketBaseTags(SBTM_GETREF(SBTC_RELEASESTRPTR
), (ULONG
)&StackVer
, TAG_DONE
);
26 if (strcmp(StackVer
,STACK_RELEASE
)) {
27 strcpy (errstr
, "Wrong bsdsocket.library version");
30 return (kvm_t
*)(flags
|0xdead0000); /* A clever trick */
33 int kvm_close(kvm_t
*kd
)
38 int kvm_nlist (kvm_t
*kd
, struct nlist
*nl
)
42 for (; nl
->n_name
&& nl
->n_name
[0]; nl
++) {
43 nl
->n_value
= (unsigned long)FindKernelVar (nl
->n_name
);