1 /* $NetBSD: dllstub.c,v 1.4 2014/12/10 04:37:56 christos Exp $ */
3 /* Id: dllstub.c,v 1.1 2003/06/04 00:27:45 marka Exp */
6 accept(SOCKET a0
, struct sockaddr
* a1
, int* a2
)
8 static SOCKET (PASCAL
*fp
)(SOCKET a0
, struct sockaddr
* a1
, int* a2
);
11 idnLogPrintf(idn_log_level_trace
, "stub accept() called\n");
15 if ((p
= GetProcAddress(DLLHANDLE
, "accept")) == NULL
) {
16 FATAL("cannot find entry accept (%d)\n", GetLastError());
21 return (*fp
)(a0
, a1
, a2
);
25 bind(SOCKET a0
, const struct sockaddr
* a1
, int a2
)
27 static int (PASCAL
*fp
)(SOCKET a0
, const struct sockaddr
* a1
, int a2
);
30 idnLogPrintf(idn_log_level_trace
, "stub bind() called\n");
34 if ((p
= GetProcAddress(DLLHANDLE
, "bind")) == NULL
) {
35 FATAL("cannot find entry bind (%d)\n", GetLastError());
40 return (*fp
)(a0
, a1
, a2
);
44 closesocket(SOCKET a0
)
46 static int (PASCAL
*fp
)(SOCKET a0
);
49 idnLogPrintf(idn_log_level_trace
, "stub closesocket() called\n");
53 if ((p
= GetProcAddress(DLLHANDLE
, "closesocket")) == NULL
) {
54 FATAL("cannot find entry closesocket (%d)\n", GetLastError());
63 connect(SOCKET a0
, const struct sockaddr
* a1
, int a2
)
65 static int (PASCAL
*fp
)(SOCKET a0
, const struct sockaddr
* a1
, int a2
);
68 idnLogPrintf(idn_log_level_trace
, "stub connect() called\n");
72 if ((p
= GetProcAddress(DLLHANDLE
, "connect")) == NULL
) {
73 FATAL("cannot find entry connect (%d)\n", GetLastError());
78 return (*fp
)(a0
, a1
, a2
);
82 getpeername(SOCKET a0
, struct sockaddr
* a1
, int* a2
)
84 static int (PASCAL
*fp
)(SOCKET a0
, struct sockaddr
* a1
, int* a2
);
87 idnLogPrintf(idn_log_level_trace
, "stub getpeername() called\n");
91 if ((p
= GetProcAddress(DLLHANDLE
, "getpeername")) == NULL
) {
92 FATAL("cannot find entry getpeername (%d)\n", GetLastError());
97 return (*fp
)(a0
, a1
, a2
);
101 getsockname(SOCKET a0
, struct sockaddr
* a1
, int* a2
)
103 static int (PASCAL
*fp
)(SOCKET a0
, struct sockaddr
* a1
, int* a2
);
106 idnLogPrintf(idn_log_level_trace
, "stub getsockname() called\n");
110 if ((p
= GetProcAddress(DLLHANDLE
, "getsockname")) == NULL
) {
111 FATAL("cannot find entry getsockname (%d)\n", GetLastError());
116 return (*fp
)(a0
, a1
, a2
);
120 getsockopt(SOCKET a0
, int a1
, int a2
, char* a3
, int* a4
)
122 static int (PASCAL
*fp
)(SOCKET a0
, int a1
, int a2
, char* a3
, int* a4
);
125 idnLogPrintf(idn_log_level_trace
, "stub getsockopt() called\n");
129 if ((p
= GetProcAddress(DLLHANDLE
, "getsockopt")) == NULL
) {
130 FATAL("cannot find entry getsockopt (%d)\n", GetLastError());
135 return (*fp
)(a0
, a1
, a2
, a3
, a4
);
141 static u_long (PASCAL
*fp
)(u_long a0
);
144 idnLogPrintf(idn_log_level_trace
, "stub htonl() called\n");
148 if ((p
= GetProcAddress(DLLHANDLE
, "htonl")) == NULL
) {
149 FATAL("cannot find entry htonl (%d)\n", GetLastError());
160 static u_short (PASCAL
*fp
)(u_short a0
);
163 idnLogPrintf(idn_log_level_trace
, "stub htons() called\n");
167 if ((p
= GetProcAddress(DLLHANDLE
, "htons")) == NULL
) {
168 FATAL("cannot find entry htons (%d)\n", GetLastError());
177 inet_addr(const char* a0
)
179 static unsigned long (PASCAL
*fp
)(const char* a0
);
182 idnLogPrintf(idn_log_level_trace
, "stub inet_addr() called\n");
186 if ((p
= GetProcAddress(DLLHANDLE
, "inet_addr")) == NULL
) {
187 FATAL("cannot find entry inet_addr (%d)\n", GetLastError());
196 inet_ntoa(struct in_addr a0
)
198 static char * (PASCAL
*fp
)(struct in_addr a0
);
201 idnLogPrintf(idn_log_level_trace
, "stub inet_ntoa() called\n");
205 if ((p
= GetProcAddress(DLLHANDLE
, "inet_ntoa")) == NULL
) {
206 FATAL("cannot find entry inet_ntoa (%d)\n", GetLastError());
215 ioctlsocket(SOCKET a0
, long a1
, u_long
* a2
)
217 static int (PASCAL
*fp
)(SOCKET a0
, long a1
, u_long
* a2
);
220 idnLogPrintf(idn_log_level_trace
, "stub ioctlsocket() called\n");
224 if ((p
= GetProcAddress(DLLHANDLE
, "ioctlsocket")) == NULL
) {
225 FATAL("cannot find entry ioctlsocket (%d)\n", GetLastError());
230 return (*fp
)(a0
, a1
, a2
);
234 listen(SOCKET a0
, int a1
)
236 static int (PASCAL
*fp
)(SOCKET a0
, int a1
);
239 idnLogPrintf(idn_log_level_trace
, "stub listen() called\n");
243 if ((p
= GetProcAddress(DLLHANDLE
, "listen")) == NULL
) {
244 FATAL("cannot find entry listen (%d)\n", GetLastError());
249 return (*fp
)(a0
, a1
);
255 static u_long (PASCAL
*fp
)(u_long a0
);
258 idnLogPrintf(idn_log_level_trace
, "stub ntohl() called\n");
262 if ((p
= GetProcAddress(DLLHANDLE
, "ntohl")) == NULL
) {
263 FATAL("cannot find entry ntohl (%d)\n", GetLastError());
274 static u_short (PASCAL
*fp
)(u_short a0
);
277 idnLogPrintf(idn_log_level_trace
, "stub ntohs() called\n");
281 if ((p
= GetProcAddress(DLLHANDLE
, "ntohs")) == NULL
) {
282 FATAL("cannot find entry ntohs (%d)\n", GetLastError());
291 recv(SOCKET a0
, char* a1
, int a2
, int a3
)
293 static int (PASCAL
*fp
)(SOCKET a0
, char* a1
, int a2
, int a3
);
296 idnLogPrintf(idn_log_level_trace
, "stub recv() called\n");
300 if ((p
= GetProcAddress(DLLHANDLE
, "recv")) == NULL
) {
301 FATAL("cannot find entry recv (%d)\n", GetLastError());
306 return (*fp
)(a0
, a1
, a2
, a3
);
310 recvfrom(SOCKET a0
, char* a1
, int a2
, int a3
, struct sockaddr
* a4
, int* a5
)
312 static int (PASCAL
*fp
)(SOCKET a0
, char* a1
, int a2
, int a3
, struct sockaddr
* a4
, int* a5
);
315 idnLogPrintf(idn_log_level_trace
, "stub recvfrom() called\n");
319 if ((p
= GetProcAddress(DLLHANDLE
, "recvfrom")) == NULL
) {
320 FATAL("cannot find entry recvfrom (%d)\n", GetLastError());
325 return (*fp
)(a0
, a1
, a2
, a3
, a4
, a5
);
329 select(int a0
, fd_set
* a1
, fd_set
* a2
, fd_set
* a3
, const struct timeval
* a4
)
331 static int (PASCAL
*fp
)(int a0
, fd_set
* a1
, fd_set
* a2
, fd_set
* a3
, const struct timeval
* a4
);
334 idnLogPrintf(idn_log_level_trace
, "stub select() called\n");
338 if ((p
= GetProcAddress(DLLHANDLE
, "select")) == NULL
) {
339 FATAL("cannot find entry select (%d)\n", GetLastError());
344 return (*fp
)(a0
, a1
, a2
, a3
, a4
);
348 send(SOCKET a0
, const char* a1
, int a2
, int a3
)
350 static int (PASCAL
*fp
)(SOCKET a0
, const char* a1
, int a2
, int a3
);
353 idnLogPrintf(idn_log_level_trace
, "stub send() called\n");
357 if ((p
= GetProcAddress(DLLHANDLE
, "send")) == NULL
) {
358 FATAL("cannot find entry send (%d)\n", GetLastError());
363 return (*fp
)(a0
, a1
, a2
, a3
);
367 sendto(SOCKET a0
, const char* a1
, int a2
, int a3
, const struct sockaddr
* a4
, int a5
)
369 static int (PASCAL
*fp
)(SOCKET a0
, const char* a1
, int a2
, int a3
, const struct sockaddr
* a4
, int a5
);
372 idnLogPrintf(idn_log_level_trace
, "stub sendto() called\n");
376 if ((p
= GetProcAddress(DLLHANDLE
, "sendto")) == NULL
) {
377 FATAL("cannot find entry sendto (%d)\n", GetLastError());
382 return (*fp
)(a0
, a1
, a2
, a3
, a4
, a5
);
386 setsockopt(SOCKET a0
, int a1
, int a2
, const char* a3
, int a4
)
388 static int (PASCAL
*fp
)(SOCKET a0
, int a1
, int a2
, const char* a3
, int a4
);
391 idnLogPrintf(idn_log_level_trace
, "stub setsockopt() called\n");
395 if ((p
= GetProcAddress(DLLHANDLE
, "setsockopt")) == NULL
) {
396 FATAL("cannot find entry setsockopt (%d)\n", GetLastError());
401 return (*fp
)(a0
, a1
, a2
, a3
, a4
);
405 shutdown(SOCKET a0
, int a1
)
407 static int (PASCAL
*fp
)(SOCKET a0
, int a1
);
410 idnLogPrintf(idn_log_level_trace
, "stub shutdown() called\n");
414 if ((p
= GetProcAddress(DLLHANDLE
, "shutdown")) == NULL
) {
415 FATAL("cannot find entry shutdown (%d)\n", GetLastError());
420 return (*fp
)(a0
, a1
);
424 socket(int a0
, int a1
, int a2
)
426 static SOCKET (PASCAL
*fp
)(int a0
, int a1
, int a2
);
429 idnLogPrintf(idn_log_level_trace
, "stub socket() called\n");
433 if ((p
= GetProcAddress(DLLHANDLE
, "socket")) == NULL
) {
434 FATAL("cannot find entry socket (%d)\n", GetLastError());
439 return (*fp
)(a0
, a1
, a2
);
443 MigrateWinsockConfiguration(int a0
, int a1
, int a2
)
445 static int (PASCAL
*fp
)(int a0
, int a1
, int a2
);
448 idnLogPrintf(idn_log_level_trace
, "stub MigrateWinsockConfiguration() called\n");
452 if ((p
= GetProcAddress(DLLHANDLE
, "MigrateWinsockConfiguration")) == NULL
) {
453 FATAL("cannot find entry MigrateWinsockConfiguration (%d)\n", GetLastError());
458 return (*fp
)(a0
, a1
, a2
);
461 struct hostent
* PASCAL
462 _org_gethostbyaddr(const char* a0
, int a1
, int a2
)
464 static struct hostent
* (PASCAL
*fp
)(const char* a0
, int a1
, int a2
);
467 idnLogPrintf(idn_log_level_trace
, "stub _org_gethostbyaddr() called\n");
471 if ((p
= GetProcAddress(DLLHANDLE
, "gethostbyaddr")) == NULL
) {
472 FATAL("cannot find entry gethostbyaddr (%d)\n", GetLastError());
477 return (*fp
)(a0
, a1
, a2
);
480 struct hostent
* PASCAL
481 _org_gethostbyname(const char* a0
)
483 static struct hostent
* (PASCAL
*fp
)(const char* a0
);
486 idnLogPrintf(idn_log_level_trace
, "stub _org_gethostbyname() called\n");
490 if ((p
= GetProcAddress(DLLHANDLE
, "gethostbyname")) == NULL
) {
491 FATAL("cannot find entry gethostbyname (%d)\n", GetLastError());
499 struct protoent
* PASCAL
500 getprotobyname(const char* a0
)
502 static struct protoent
* (PASCAL
*fp
)(const char* a0
);
505 idnLogPrintf(idn_log_level_trace
, "stub getprotobyname() called\n");
509 if ((p
= GetProcAddress(DLLHANDLE
, "getprotobyname")) == NULL
) {
510 FATAL("cannot find entry getprotobyname (%d)\n", GetLastError());
518 struct protoent
* PASCAL
519 getprotobynumber(int a0
)
521 static struct protoent
* (PASCAL
*fp
)(int a0
);
524 idnLogPrintf(idn_log_level_trace
, "stub getprotobynumber() called\n");
528 if ((p
= GetProcAddress(DLLHANDLE
, "getprotobynumber")) == NULL
) {
529 FATAL("cannot find entry getprotobynumber (%d)\n", GetLastError());
537 struct servent
* PASCAL
538 getservbyname(const char* a0
, const char* a1
)
540 static struct servent
* (PASCAL
*fp
)(const char* a0
, const char* a1
);
543 idnLogPrintf(idn_log_level_trace
, "stub getservbyname() called\n");
547 if ((p
= GetProcAddress(DLLHANDLE
, "getservbyname")) == NULL
) {
548 FATAL("cannot find entry getservbyname (%d)\n", GetLastError());
553 return (*fp
)(a0
, a1
);
556 struct servent
* PASCAL
557 getservbyport(int a0
, const char* a1
)
559 static struct servent
* (PASCAL
*fp
)(int a0
, const char* a1
);
562 idnLogPrintf(idn_log_level_trace
, "stub getservbyport() called\n");
566 if ((p
= GetProcAddress(DLLHANDLE
, "getservbyport")) == NULL
) {
567 FATAL("cannot find entry getservbyport (%d)\n", GetLastError());
572 return (*fp
)(a0
, a1
);
576 _org_gethostname(char* a0
, int a1
)
578 static int (PASCAL
*fp
)(char* a0
, int a1
);
581 idnLogPrintf(idn_log_level_trace
, "stub _org_gethostname() called\n");
585 if ((p
= GetProcAddress(DLLHANDLE
, "gethostname")) == NULL
) {
586 FATAL("cannot find entry gethostname (%d)\n", GetLastError());
591 return (*fp
)(a0
, a1
);
595 WSAAsyncSelect(SOCKET a0
, HWND a1
, u_int a2
, long a3
)
597 static int (PASCAL
*fp
)(SOCKET a0
, HWND a1
, u_int a2
, long a3
);
600 idnLogPrintf(idn_log_level_trace
, "stub WSAAsyncSelect() called\n");
604 if ((p
= GetProcAddress(DLLHANDLE
, "WSAAsyncSelect")) == NULL
) {
605 FATAL("cannot find entry WSAAsyncSelect (%d)\n", GetLastError());
610 return (*fp
)(a0
, a1
, a2
, a3
);
614 _org_WSAAsyncGetHostByAddr(HWND a0
, u_int a1
, const char* a2
, int a3
, int a4
, char* a5
, int a6
)
616 static HANDLE (PASCAL
*fp
)(HWND a0
, u_int a1
, const char* a2
, int a3
, int a4
, char* a5
, int a6
);
619 idnLogPrintf(idn_log_level_trace
, "stub _org_WSAAsyncGetHostByAddr() called\n");
623 if ((p
= GetProcAddress(DLLHANDLE
, "WSAAsyncGetHostByAddr")) == NULL
) {
624 FATAL("cannot find entry WSAAsyncGetHostByAddr (%d)\n", GetLastError());
629 return (*fp
)(a0
, a1
, a2
, a3
, a4
, a5
, a6
);
633 _org_WSAAsyncGetHostByName(HWND a0
, u_int a1
, const char* a2
, char* a3
, int a4
)
635 static HANDLE (PASCAL
*fp
)(HWND a0
, u_int a1
, const char* a2
, char* a3
, int a4
);
638 idnLogPrintf(idn_log_level_trace
, "stub _org_WSAAsyncGetHostByName() called\n");
642 if ((p
= GetProcAddress(DLLHANDLE
, "WSAAsyncGetHostByName")) == NULL
) {
643 FATAL("cannot find entry WSAAsyncGetHostByName (%d)\n", GetLastError());
648 return (*fp
)(a0
, a1
, a2
, a3
, a4
);
652 WSAAsyncGetProtoByNumber(HWND a0
, u_int a1
, int a2
, char* a3
, int a4
)
654 static HANDLE (PASCAL
*fp
)(HWND a0
, u_int a1
, int a2
, char* a3
, int a4
);
657 idnLogPrintf(idn_log_level_trace
, "stub WSAAsyncGetProtoByNumber() called\n");
661 if ((p
= GetProcAddress(DLLHANDLE
, "WSAAsyncGetProtoByNumber")) == NULL
) {
662 FATAL("cannot find entry WSAAsyncGetProtoByNumber (%d)\n", GetLastError());
667 return (*fp
)(a0
, a1
, a2
, a3
, a4
);
671 WSAAsyncGetProtoByName(HWND a0
, u_int a1
, const char* a2
, char* a3
, int a4
)
673 static HANDLE (PASCAL
*fp
)(HWND a0
, u_int a1
, const char* a2
, char* a3
, int a4
);
676 idnLogPrintf(idn_log_level_trace
, "stub WSAAsyncGetProtoByName() called\n");
680 if ((p
= GetProcAddress(DLLHANDLE
, "WSAAsyncGetProtoByName")) == NULL
) {
681 FATAL("cannot find entry WSAAsyncGetProtoByName (%d)\n", GetLastError());
686 return (*fp
)(a0
, a1
, a2
, a3
, a4
);
690 WSAAsyncGetServByPort(HWND a0
, u_int a1
, int a2
, const char* a3
, char* a4
, int a5
)
692 static HANDLE (PASCAL
*fp
)(HWND a0
, u_int a1
, int a2
, const char* a3
, char* a4
, int a5
);
695 idnLogPrintf(idn_log_level_trace
, "stub WSAAsyncGetServByPort() called\n");
699 if ((p
= GetProcAddress(DLLHANDLE
, "WSAAsyncGetServByPort")) == NULL
) {
700 FATAL("cannot find entry WSAAsyncGetServByPort (%d)\n", GetLastError());
705 return (*fp
)(a0
, a1
, a2
, a3
, a4
, a5
);
709 WSAAsyncGetServByName(HWND a0
, u_int a1
, const char* a2
, const char* a3
, char* a4
, int a5
)
711 static HANDLE (PASCAL
*fp
)(HWND a0
, u_int a1
, const char* a2
, const char* a3
, char* a4
, int a5
);
714 idnLogPrintf(idn_log_level_trace
, "stub WSAAsyncGetServByName() called\n");
718 if ((p
= GetProcAddress(DLLHANDLE
, "WSAAsyncGetServByName")) == NULL
) {
719 FATAL("cannot find entry WSAAsyncGetServByName (%d)\n", GetLastError());
724 return (*fp
)(a0
, a1
, a2
, a3
, a4
, a5
);
728 WSACancelAsyncRequest(HANDLE a0
)
730 static int (PASCAL
*fp
)(HANDLE a0
);
733 idnLogPrintf(idn_log_level_trace
, "stub WSACancelAsyncRequest() called\n");
737 if ((p
= GetProcAddress(DLLHANDLE
, "WSACancelAsyncRequest")) == NULL
) {
738 FATAL("cannot find entry WSACancelAsyncRequest (%d)\n", GetLastError());
747 WSASetBlockingHook(FARPROC a0
)
749 static FARPROC (PASCAL
*fp
)(FARPROC a0
);
752 idnLogPrintf(idn_log_level_trace
, "stub WSASetBlockingHook() called\n");
756 if ((p
= GetProcAddress(DLLHANDLE
, "WSASetBlockingHook")) == NULL
) {
757 FATAL("cannot find entry WSASetBlockingHook (%d)\n", GetLastError());
766 WSAUnhookBlockingHook(void)
768 static int (PASCAL
*fp
)(void);
771 idnLogPrintf(idn_log_level_trace
, "stub WSAUnhookBlockingHook() called\n");
775 if ((p
= GetProcAddress(DLLHANDLE
, "WSAUnhookBlockingHook")) == NULL
) {
776 FATAL("cannot find entry WSAUnhookBlockingHook (%d)\n", GetLastError());
785 WSAGetLastError(void)
787 static int (PASCAL
*fp
)(void);
790 idnLogPrintf(idn_log_level_trace
, "stub WSAGetLastError() called\n");
794 if ((p
= GetProcAddress(DLLHANDLE
, "WSAGetLastError")) == NULL
) {
795 FATAL("cannot find entry WSAGetLastError (%d)\n", GetLastError());
804 WSASetLastError(int a0
)
806 static void (PASCAL
*fp
)(int a0
);
809 idnLogPrintf(idn_log_level_trace
, "stub WSASetLastError() called\n");
813 if ((p
= GetProcAddress(DLLHANDLE
, "WSASetLastError")) == NULL
) {
814 FATAL("cannot find entry WSASetLastError (%d)\n", GetLastError());
823 WSACancelBlockingCall(void)
825 static int (PASCAL
*fp
)(void);
828 idnLogPrintf(idn_log_level_trace
, "stub WSACancelBlockingCall() called\n");
832 if ((p
= GetProcAddress(DLLHANDLE
, "WSACancelBlockingCall")) == NULL
) {
833 FATAL("cannot find entry WSACancelBlockingCall (%d)\n", GetLastError());
844 static BOOL (PASCAL
*fp
)(void);
847 idnLogPrintf(idn_log_level_trace
, "stub WSAIsBlocking() called\n");
851 if ((p
= GetProcAddress(DLLHANDLE
, "WSAIsBlocking")) == NULL
) {
852 FATAL("cannot find entry WSAIsBlocking (%d)\n", GetLastError());
861 WSAStartup(WORD a0
, LPWSADATA a1
)
863 static int (PASCAL
*fp
)(WORD a0
, LPWSADATA a1
);
866 idnLogPrintf(idn_log_level_trace
, "stub WSAStartup() called\n");
870 if ((p
= GetProcAddress(DLLHANDLE
, "WSAStartup")) == NULL
) {
871 FATAL("cannot find entry WSAStartup (%d)\n", GetLastError());
876 return (*fp
)(a0
, a1
);
882 static int (PASCAL
*fp
)(void);
885 idnLogPrintf(idn_log_level_trace
, "stub WSACleanup() called\n");
889 if ((p
= GetProcAddress(DLLHANDLE
, "WSACleanup")) == NULL
) {
890 FATAL("cannot find entry WSACleanup (%d)\n", GetLastError());
899 __WSAFDIsSet(SOCKET a0
, fd_set
* a1
)
901 static int (PASCAL
*fp
)(SOCKET a0
, fd_set
* a1
);
904 idnLogPrintf(idn_log_level_trace
, "stub __WSAFDIsSet() called\n");
908 if ((p
= GetProcAddress(DLLHANDLE
, "__WSAFDIsSet")) == NULL
) {
909 FATAL("cannot find entry __WSAFDIsSet (%d)\n", GetLastError());
914 return (*fp
)(a0
, a1
);
920 static int (PASCAL
*fp
)(void);
923 idnLogPrintf(idn_log_level_trace
, "stub WEP() called\n");
927 if ((p
= GetProcAddress(DLLHANDLE
, "WEP")) == NULL
) {
928 FATAL("cannot find entry WEP (%d)\n", GetLastError());
937 WSApSetPostRoutine(int a0
)
939 static int (PASCAL
*fp
)(int a0
);
942 idnLogPrintf(idn_log_level_trace
, "stub WSApSetPostRoutine() called\n");
946 if ((p
= GetProcAddress(DLLHANDLE
, "WSApSetPostRoutine")) == NULL
) {
947 FATAL("cannot find entry WSApSetPostRoutine (%d)\n", GetLastError());
956 WsControl(int a0
, int a1
, int a2
, int a3
, int a4
, int a5
)
958 static int (PASCAL
*fp
)(int a0
, int a1
, int a2
, int a3
, int a4
, int a5
);
961 idnLogPrintf(idn_log_level_trace
, "stub WsControl() called\n");
965 if ((p
= GetProcAddress(DLLHANDLE
, "WsControl")) == NULL
) {
966 FATAL("cannot find entry WsControl (%d)\n", GetLastError());
971 return (*fp
)(a0
, a1
, a2
, a3
, a4
, a5
);
975 closesockinfo(int a0
)
977 static int (PASCAL
*fp
)(int a0
);
980 idnLogPrintf(idn_log_level_trace
, "stub closesockinfo() called\n");
984 if ((p
= GetProcAddress(DLLHANDLE
, "closesockinfo")) == NULL
) {
985 FATAL("cannot find entry closesockinfo (%d)\n", GetLastError());
994 Arecv(int a0
, int a1
, int a2
, int a3
)
996 static int (PASCAL
*fp
)(int a0
, int a1
, int a2
, int a3
);
999 idnLogPrintf(idn_log_level_trace
, "stub Arecv() called\n");
1003 if ((p
= GetProcAddress(DLLHANDLE
, "Arecv")) == NULL
) {
1004 FATAL("cannot find entry Arecv (%d)\n", GetLastError());
1009 return (*fp
)(a0
, a1
, a2
, a3
);
1013 Asend(int a0
, int a1
, int a2
, int a3
)
1015 static int (PASCAL
*fp
)(int a0
, int a1
, int a2
, int a3
);
1018 idnLogPrintf(idn_log_level_trace
, "stub Asend() called\n");
1022 if ((p
= GetProcAddress(DLLHANDLE
, "Asend")) == NULL
) {
1023 FATAL("cannot find entry Asend (%d)\n", GetLastError());
1028 return (*fp
)(a0
, a1
, a2
, a3
);
1032 WSHEnumProtocols(void)
1034 static int (PASCAL
*fp
)(void);
1037 idnLogPrintf(idn_log_level_trace
, "stub WSHEnumProtocols() called\n");
1041 if ((p
= GetProcAddress(DLLHANDLE
, "WSHEnumProtocols")) == NULL
) {
1042 FATAL("cannot find entry WSHEnumProtocols (%d)\n", GetLastError());
1051 inet_network(int a0
)
1053 static int (PASCAL
*fp
)(int a0
);
1056 idnLogPrintf(idn_log_level_trace
, "stub inet_network() called\n");
1060 if ((p
= GetProcAddress(DLLHANDLE
, "inet_network")) == NULL
) {
1061 FATAL("cannot find entry inet_network (%d)\n", GetLastError());
1070 getnetbyname(int a0
)
1072 static int (PASCAL
*fp
)(int a0
);
1075 idnLogPrintf(idn_log_level_trace
, "stub getnetbyname() called\n");
1079 if ((p
= GetProcAddress(DLLHANDLE
, "getnetbyname")) == NULL
) {
1080 FATAL("cannot find entry getnetbyname (%d)\n", GetLastError());
1089 rcmd(int a0
, int a1
, int a2
, int a3
, int a4
, int a5
)
1091 static int (PASCAL
*fp
)(int a0
, int a1
, int a2
, int a3
, int a4
, int a5
);
1094 idnLogPrintf(idn_log_level_trace
, "stub rcmd() called\n");
1098 if ((p
= GetProcAddress(DLLHANDLE
, "rcmd")) == NULL
) {
1099 FATAL("cannot find entry rcmd (%d)\n", GetLastError());
1104 return (*fp
)(a0
, a1
, a2
, a3
, a4
, a5
);
1108 rexec(int a0
, int a1
, int a2
, int a3
, int a4
, int a5
)
1110 static int (PASCAL
*fp
)(int a0
, int a1
, int a2
, int a3
, int a4
, int a5
);
1113 idnLogPrintf(idn_log_level_trace
, "stub rexec() called\n");
1117 if ((p
= GetProcAddress(DLLHANDLE
, "rexec")) == NULL
) {
1118 FATAL("cannot find entry rexec (%d)\n", GetLastError());
1123 return (*fp
)(a0
, a1
, a2
, a3
, a4
, a5
);
1129 static int (PASCAL
*fp
)(int a0
);
1132 idnLogPrintf(idn_log_level_trace
, "stub rresvport() called\n");
1136 if ((p
= GetProcAddress(DLLHANDLE
, "rresvport")) == NULL
) {
1137 FATAL("cannot find entry rresvport (%d)\n", GetLastError());
1146 sethostname(int a0
, int a1
)
1148 static int (PASCAL
*fp
)(int a0
, int a1
);
1151 idnLogPrintf(idn_log_level_trace
, "stub sethostname() called\n");
1155 if ((p
= GetProcAddress(DLLHANDLE
, "sethostname")) == NULL
) {
1156 FATAL("cannot find entry sethostname (%d)\n", GetLastError());
1161 return (*fp
)(a0
, a1
);
1165 dn_expand(int a0
, int a1
, int a2
, int a3
, int a4
)
1167 static int (PASCAL
*fp
)(int a0
, int a1
, int a2
, int a3
, int a4
);
1170 idnLogPrintf(idn_log_level_trace
, "stub dn_expand() called\n");
1174 if ((p
= GetProcAddress(DLLHANDLE
, "dn_expand")) == NULL
) {
1175 FATAL("cannot find entry dn_expand (%d)\n", GetLastError());
1180 return (*fp
)(a0
, a1
, a2
, a3
, a4
);
1184 WSARecvEx(SOCKET a0
, char* a1
, int a2
, int* a3
)
1186 static int (PASCAL
*fp
)(SOCKET a0
, char* a1
, int a2
, int* a3
);
1189 idnLogPrintf(idn_log_level_trace
, "stub WSARecvEx() called\n");
1193 if ((p
= GetProcAddress(DLLHANDLE
, "WSARecvEx")) == NULL
) {
1194 FATAL("cannot find entry WSARecvEx (%d)\n", GetLastError());
1199 return (*fp
)(a0
, a1
, a2
, a3
);
1203 s_perror(int a0
, int a1
)
1205 static int (PASCAL
*fp
)(int a0
, int a1
);
1208 idnLogPrintf(idn_log_level_trace
, "stub s_perror() called\n");
1212 if ((p
= GetProcAddress(DLLHANDLE
, "s_perror")) == NULL
) {
1213 FATAL("cannot find entry s_perror (%d)\n", GetLastError());
1218 return (*fp
)(a0
, a1
);
1222 GetAddressByNameA(DWORD a0
, LPGUID a1
, LPSTR a2
, LPINT a3
, DWORD a4
, LPSERVICE_ASYNC_INFO a5
, LPVOID a6
, LPDWORD a7
, LPSTR a8
, LPDWORD a9
)
1224 static INT (PASCAL
*fp
)(DWORD a0
, LPGUID a1
, LPSTR a2
, LPINT a3
, DWORD a4
, LPSERVICE_ASYNC_INFO a5
, LPVOID a6
, LPDWORD a7
, LPSTR a8
, LPDWORD a9
);
1227 idnLogPrintf(idn_log_level_trace
, "stub GetAddressByNameA() called\n");
1231 if ((p
= GetProcAddress(DLLHANDLE
, "GetAddressByNameA")) == NULL
) {
1232 FATAL("cannot find entry GetAddressByNameA (%d)\n", GetLastError());
1237 return (*fp
)(a0
, a1
, a2
, a3
, a4
, a5
, a6
, a7
, a8
, a9
);
1241 GetAddressByNameW(DWORD a0
, LPGUID a1
, LPWSTR a2
, LPINT a3
, DWORD a4
, LPSERVICE_ASYNC_INFO a5
, LPVOID a6
, LPDWORD a7
, LPWSTR a8
, LPDWORD a9
)
1243 static INT (PASCAL
*fp
)(DWORD a0
, LPGUID a1
, LPWSTR a2
, LPINT a3
, DWORD a4
, LPSERVICE_ASYNC_INFO a5
, LPVOID a6
, LPDWORD a7
, LPWSTR a8
, LPDWORD a9
);
1246 idnLogPrintf(idn_log_level_trace
, "stub GetAddressByNameW() called\n");
1250 if ((p
= GetProcAddress(DLLHANDLE
, "GetAddressByNameW")) == NULL
) {
1251 FATAL("cannot find entry GetAddressByNameW (%d)\n", GetLastError());
1256 return (*fp
)(a0
, a1
, a2
, a3
, a4
, a5
, a6
, a7
, a8
, a9
);
1260 EnumProtocolsA(LPINT a0
, LPVOID a1
, LPDWORD a2
)
1262 static INT (PASCAL
*fp
)(LPINT a0
, LPVOID a1
, LPDWORD a2
);
1265 idnLogPrintf(idn_log_level_trace
, "stub EnumProtocolsA() called\n");
1269 if ((p
= GetProcAddress(DLLHANDLE
, "EnumProtocolsA")) == NULL
) {
1270 FATAL("cannot find entry EnumProtocolsA (%d)\n", GetLastError());
1275 return (*fp
)(a0
, a1
, a2
);
1279 EnumProtocolsW(LPINT a0
, LPVOID a1
, LPDWORD a2
)
1281 static INT (PASCAL
*fp
)(LPINT a0
, LPVOID a1
, LPDWORD a2
);
1284 idnLogPrintf(idn_log_level_trace
, "stub EnumProtocolsW() called\n");
1288 if ((p
= GetProcAddress(DLLHANDLE
, "EnumProtocolsW")) == NULL
) {
1289 FATAL("cannot find entry EnumProtocolsW (%d)\n", GetLastError());
1294 return (*fp
)(a0
, a1
, a2
);
1298 GetTypeByNameA(LPSTR a0
, LPGUID a1
)
1300 static INT (PASCAL
*fp
)(LPSTR a0
, LPGUID a1
);
1303 idnLogPrintf(idn_log_level_trace
, "stub GetTypeByNameA() called\n");
1307 if ((p
= GetProcAddress(DLLHANDLE
, "GetTypeByNameA")) == NULL
) {
1308 FATAL("cannot find entry GetTypeByNameA (%d)\n", GetLastError());
1313 return (*fp
)(a0
, a1
);
1317 GetTypeByNameW(LPWSTR a0
, LPGUID a1
)
1319 static INT (PASCAL
*fp
)(LPWSTR a0
, LPGUID a1
);
1322 idnLogPrintf(idn_log_level_trace
, "stub GetTypeByNameW() called\n");
1326 if ((p
= GetProcAddress(DLLHANDLE
, "GetTypeByNameW")) == NULL
) {
1327 FATAL("cannot find entry GetTypeByNameW (%d)\n", GetLastError());
1332 return (*fp
)(a0
, a1
);
1336 GetNameByTypeA(LPGUID a0
, LPSTR a1
, DWORD a2
)
1338 static INT (PASCAL
*fp
)(LPGUID a0
, LPSTR a1
, DWORD a2
);
1341 idnLogPrintf(idn_log_level_trace
, "stub GetNameByTypeA() called\n");
1345 if ((p
= GetProcAddress(DLLHANDLE
, "GetNameByTypeA")) == NULL
) {
1346 FATAL("cannot find entry GetNameByTypeA (%d)\n", GetLastError());
1351 return (*fp
)(a0
, a1
, a2
);
1355 GetNameByTypeW(LPGUID a0
, LPWSTR a1
, DWORD a2
)
1357 static INT (PASCAL
*fp
)(LPGUID a0
, LPWSTR a1
, DWORD a2
);
1360 idnLogPrintf(idn_log_level_trace
, "stub GetNameByTypeW() called\n");
1364 if ((p
= GetProcAddress(DLLHANDLE
, "GetNameByTypeW")) == NULL
) {
1365 FATAL("cannot find entry GetNameByTypeW (%d)\n", GetLastError());
1370 return (*fp
)(a0
, a1
, a2
);
1374 SetServiceA(DWORD a0
, DWORD a1
, DWORD a2
, LPSERVICE_INFOA a3
, LPSERVICE_ASYNC_INFO a4
, LPDWORD a5
)
1376 static INT (PASCAL
*fp
)(DWORD a0
, DWORD a1
, DWORD a2
, LPSERVICE_INFOA a3
, LPSERVICE_ASYNC_INFO a4
, LPDWORD a5
);
1379 idnLogPrintf(idn_log_level_trace
, "stub SetServiceA() called\n");
1383 if ((p
= GetProcAddress(DLLHANDLE
, "SetServiceA")) == NULL
) {
1384 FATAL("cannot find entry SetServiceA (%d)\n", GetLastError());
1389 return (*fp
)(a0
, a1
, a2
, a3
, a4
, a5
);
1393 SetServiceW(DWORD a0
, DWORD a1
, DWORD a2
, LPSERVICE_INFOW a3
, LPSERVICE_ASYNC_INFO a4
, LPDWORD a5
)
1395 static INT (PASCAL
*fp
)(DWORD a0
, DWORD a1
, DWORD a2
, LPSERVICE_INFOW a3
, LPSERVICE_ASYNC_INFO a4
, LPDWORD a5
);
1398 idnLogPrintf(idn_log_level_trace
, "stub SetServiceW() called\n");
1402 if ((p
= GetProcAddress(DLLHANDLE
, "SetServiceW")) == NULL
) {
1403 FATAL("cannot find entry SetServiceW (%d)\n", GetLastError());
1408 return (*fp
)(a0
, a1
, a2
, a3
, a4
, a5
);
1412 GetServiceA(DWORD a0
, LPGUID a1
, LPSTR a2
, DWORD a3
, LPVOID a4
, LPDWORD a5
, LPSERVICE_ASYNC_INFO a6
)
1414 static INT (PASCAL
*fp
)(DWORD a0
, LPGUID a1
, LPSTR a2
, DWORD a3
, LPVOID a4
, LPDWORD a5
, LPSERVICE_ASYNC_INFO a6
);
1417 idnLogPrintf(idn_log_level_trace
, "stub GetServiceA() called\n");
1421 if ((p
= GetProcAddress(DLLHANDLE
, "GetServiceA")) == NULL
) {
1422 FATAL("cannot find entry GetServiceA (%d)\n", GetLastError());
1427 return (*fp
)(a0
, a1
, a2
, a3
, a4
, a5
, a6
);
1431 GetServiceW(DWORD a0
, LPGUID a1
, LPWSTR a2
, DWORD a3
, LPVOID a4
, LPDWORD a5
, LPSERVICE_ASYNC_INFO a6
)
1433 static INT (PASCAL
*fp
)(DWORD a0
, LPGUID a1
, LPWSTR a2
, DWORD a3
, LPVOID a4
, LPDWORD a5
, LPSERVICE_ASYNC_INFO a6
);
1436 idnLogPrintf(idn_log_level_trace
, "stub GetServiceW() called\n");
1440 if ((p
= GetProcAddress(DLLHANDLE
, "GetServiceW")) == NULL
) {
1441 FATAL("cannot find entry GetServiceW (%d)\n", GetLastError());
1446 return (*fp
)(a0
, a1
, a2
, a3
, a4
, a5
, a6
);
1450 NPLoadNameSpaces(int a0
, int a1
, int a2
)
1452 static int (PASCAL
*fp
)(int a0
, int a1
, int a2
);
1455 idnLogPrintf(idn_log_level_trace
, "stub NPLoadNameSpaces() called\n");
1459 if ((p
= GetProcAddress(DLLHANDLE
, "NPLoadNameSpaces")) == NULL
) {
1460 FATAL("cannot find entry NPLoadNameSpaces (%d)\n", GetLastError());
1465 return (*fp
)(a0
, a1
, a2
);
1469 NSPStartup(int a0
, int a1
)
1471 static int (PASCAL
*fp
)(int a0
, int a1
);
1474 idnLogPrintf(idn_log_level_trace
, "stub NSPStartup() called\n");
1478 if ((p
= GetProcAddress(DLLHANDLE
, "NSPStartup")) == NULL
) {
1479 FATAL("cannot find entry NSPStartup (%d)\n", GetLastError());
1484 return (*fp
)(a0
, a1
);
1488 TransmitFile(SOCKET a0
, HANDLE a1
, DWORD a2
, DWORD a3
, LPOVERLAPPED a4
, LPTRANSMIT_FILE_BUFFERS a5
, DWORD a6
)
1490 static BOOL (PASCAL
*fp
)(SOCKET a0
, HANDLE a1
, DWORD a2
, DWORD a3
, LPOVERLAPPED a4
, LPTRANSMIT_FILE_BUFFERS a5
, DWORD a6
);
1493 idnLogPrintf(idn_log_level_trace
, "stub TransmitFile() called\n");
1497 if ((p
= GetProcAddress(DLLHANDLE
, "TransmitFile")) == NULL
) {
1498 FATAL("cannot find entry TransmitFile (%d)\n", GetLastError());
1503 return (*fp
)(a0
, a1
, a2
, a3
, a4
, a5
, a6
);
1507 AcceptEx(SOCKET a0
, SOCKET a1
, PVOID a2
, DWORD a3
, DWORD a4
, DWORD a5
, LPDWORD a6
, LPOVERLAPPED a7
)
1509 static BOOL (PASCAL
*fp
)(SOCKET a0
, SOCKET a1
, PVOID a2
, DWORD a3
, DWORD a4
, DWORD a5
, LPDWORD a6
, LPOVERLAPPED a7
);
1512 idnLogPrintf(idn_log_level_trace
, "stub AcceptEx() called\n");
1516 if ((p
= GetProcAddress(DLLHANDLE
, "AcceptEx")) == NULL
) {
1517 FATAL("cannot find entry AcceptEx (%d)\n", GetLastError());
1522 return (*fp
)(a0
, a1
, a2
, a3
, a4
, a5
, a6
, a7
);
1526 GetAcceptExSockaddrs(PVOID a0
, DWORD a1
, DWORD a2
, DWORD a3
, struct sockaddr
** a4
, LPINT a5
, struct sockaddr
** a6
, LPINT a7
)
1528 static VOID (PASCAL
*fp
)(PVOID a0
, DWORD a1
, DWORD a2
, DWORD a3
, struct sockaddr
** a4
, LPINT a5
, struct sockaddr
** a6
, LPINT a7
);
1531 idnLogPrintf(idn_log_level_trace
, "stub GetAcceptExSockaddrs() called\n");
1535 if ((p
= GetProcAddress(DLLHANDLE
, "GetAcceptExSockaddrs")) == NULL
) {
1536 FATAL("cannot find entry GetAcceptExSockaddrs (%d)\n", GetLastError());
1541 (*fp
)(a0
, a1
, a2
, a3
, a4
, a5
, a6
, a7
);