mirror of
https://github.com/PowerShell/Win32-OpenSSH.git
synced 2025-07-25 15:04:54 +02:00
3-4 C2
This commit is contained in:
parent
826d79e297
commit
2caf350f29
@ -18,3 +18,4 @@
|
|||||||
#define recv w32_recv
|
#define recv w32_recv
|
||||||
#define send w32_send
|
#define send w32_send
|
||||||
#define shutdown w32_shutdown
|
#define shutdown w32_shutdown
|
||||||
|
#define socketpair w32_socketpair
|
||||||
|
@ -14,3 +14,5 @@
|
|||||||
#define close w32_close
|
#define close w32_close
|
||||||
#define dup w32_dup
|
#define dup w32_dup
|
||||||
#define dup2 w32_dup2
|
#define dup2 w32_dup2
|
||||||
|
|
||||||
|
#define sleep(sec) Sleep(1000 * sec)
|
@ -33,6 +33,7 @@ int w32_connect(int fd, const struct sockaddr* name, int namelen);
|
|||||||
int w32_recv(int fd, void *buf, size_t len, int flags);
|
int w32_recv(int fd, void *buf, size_t len, int flags);
|
||||||
int w32_send(int fd, const void *buf, size_t len, int flags);
|
int w32_send(int fd, const void *buf, size_t len, int flags);
|
||||||
int w32_shutdown(int fd, int how);
|
int w32_shutdown(int fd, int how);
|
||||||
|
int w32_socketpair(int domain, int type, int sv[2]);
|
||||||
|
|
||||||
/*non-network (file) i/o*/
|
/*non-network (file) i/o*/
|
||||||
#define fdopen w32_fdopen
|
#define fdopen w32_fdopen
|
||||||
@ -53,4 +54,30 @@ int w32_dup(int oldfd);
|
|||||||
int w32_dup2(int oldfd, int newfd);
|
int w32_dup2(int oldfd, int newfd);
|
||||||
|
|
||||||
|
|
||||||
|
/* Shutdown constants */
|
||||||
|
#define SHUT_WR SD_SEND
|
||||||
|
#define SHUT_RD SD_RECEIVE
|
||||||
|
#define SHUT_RDWR SD_BOTH
|
||||||
|
|
||||||
|
/* Other constants */
|
||||||
|
#define IN_LOOPBACKNET 127 /* 127.* is the loopback network */
|
||||||
|
#define MAXHOSTNAMELEN 64
|
||||||
|
|
||||||
|
|
||||||
|
/* Errno helpers */
|
||||||
|
#ifndef EXX
|
||||||
|
#define EXX WSAEMFILE
|
||||||
|
#endif
|
||||||
|
#ifndef EXX1
|
||||||
|
#define EXX1 WSAENOBUFS
|
||||||
|
#endif
|
||||||
|
#ifndef ESOCKTNOSUPPORT
|
||||||
|
#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
|
||||||
|
#endif
|
||||||
|
#ifndef ENOTUNREACH
|
||||||
|
#define ENOTUNREACH WSAENOTUNREACH
|
||||||
|
#endif
|
||||||
|
#ifndef EPFNOSUPPORT
|
||||||
|
#define EPFNOSUPPORT WSAEPFNOSUPPORT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
@ -271,6 +271,13 @@ w32_shutdown(int fd, int how) {
|
|||||||
return socketio_shutdown(fd_table.w32_ios[fd], how);
|
return socketio_shutdown(fd_table.w32_ios[fd], how);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
w32_socketpair(int domain, int type, int sv[2]) {
|
||||||
|
errno = ENOTSUP;
|
||||||
|
debug("ERROR:%d", errno);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
w32_pipe(int *pfds) {
|
w32_pipe(int *pfds) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user