author | phh |
Sat, 30 Nov 2019 14:33:05 -0800 | |
changeset 59330 | 5b96c12f909d |
parent 54884 | 8a6093c186a6 |
permissions | -rw-r--r-- |
2 | 1 |
/* |
54884 | 2 |
* Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved. |
2 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
5506 | 7 |
* published by the Free Software Foundation. Oracle designates this |
2 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
2 | 10 |
* |
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
5506 | 21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
2 | 24 |
*/ |
25 |
#ifndef _JAVASOFT_WIN32_SOCKET_MD_H |
|
26 |
||
27 |
#include <jni.h> |
|
28 |
#include <sys/types.h> |
|
29 |
#include "sys.h" |
|
30 |
#include "socket_md.h" |
|
31 |
||
32 |
#define DBG_POLLIN 1 |
|
33 |
#define DBG_POLLOUT 2 |
|
34 |
||
35 |
#define DBG_EINPROGRESS -150 |
|
36 |
#define DBG_ETIMEOUT -200 |
|
15274
a77cdd5ea6e3
8005120: Compiler warnings in socket transport native code
jzavgren
parents:
5506
diff
changeset
|
37 |
#ifdef WIN32 |
a77cdd5ea6e3
8005120: Compiler warnings in socket transport native code
jzavgren
parents:
5506
diff
changeset
|
38 |
typedef int socklen_t; |
a77cdd5ea6e3
8005120: Compiler warnings in socket transport native code
jzavgren
parents:
5506
diff
changeset
|
39 |
#endif |
2 | 40 |
|
41 |
int dbgsysSocketClose(int fd); |
|
15274
a77cdd5ea6e3
8005120: Compiler warnings in socket transport native code
jzavgren
parents:
5506
diff
changeset
|
42 |
int dbgsysConnect(int fd, struct sockaddr *him, socklen_t len); |
a77cdd5ea6e3
8005120: Compiler warnings in socket transport native code
jzavgren
parents:
5506
diff
changeset
|
43 |
int dbgsysFinishConnect(int fd, int timeout); |
a77cdd5ea6e3
8005120: Compiler warnings in socket transport native code
jzavgren
parents:
5506
diff
changeset
|
44 |
int dbgsysAccept(int fd, struct sockaddr *him, socklen_t *len); |
a77cdd5ea6e3
8005120: Compiler warnings in socket transport native code
jzavgren
parents:
5506
diff
changeset
|
45 |
int dbgsysSendTo(int fd, char *buf, size_t len, int flags, struct sockaddr *to, socklen_t tolen); |
a77cdd5ea6e3
8005120: Compiler warnings in socket transport native code
jzavgren
parents:
5506
diff
changeset
|
46 |
int dbgsysRecvFrom(int fd, char *buf, size_t nBytes, int flags, struct sockaddr *from, socklen_t *fromlen); |
896
5c02031316bf
6725543: Compiler warnings in serviceability native code
ohair
parents:
2
diff
changeset
|
47 |
int dbgsysListen(int fd, int backlog); |
15274
a77cdd5ea6e3
8005120: Compiler warnings in socket transport native code
jzavgren
parents:
5506
diff
changeset
|
48 |
int dbgsysRecv(int fd, char *buf, size_t nBytes, int flags); |
a77cdd5ea6e3
8005120: Compiler warnings in socket transport native code
jzavgren
parents:
5506
diff
changeset
|
49 |
int dbgsysSend(int fd, char *buf, size_t nBytes, int flags); |
54884 | 50 |
int dbgsysGetAddrInfo(const char *hostname, const char *service, const struct addrinfo *hints, struct addrinfo **results); |
51 |
void dbgsysFreeAddrInfo(struct addrinfo *info); |
|
2 | 52 |
int dbgsysSocket(int domain, int type, int protocol); |
15274
a77cdd5ea6e3
8005120: Compiler warnings in socket transport native code
jzavgren
parents:
5506
diff
changeset
|
53 |
int dbgsysBind(int fd, struct sockaddr *name, socklen_t namelen); |
2 | 54 |
int dbgsysSetSocketOption(int fd, jint cmd, jboolean on, jvalue value); |
896
5c02031316bf
6725543: Compiler warnings in serviceability native code
ohair
parents:
2
diff
changeset
|
55 |
uint32_t dbgsysHostToNetworkLong(uint32_t hostlong); |
2 | 56 |
unsigned short dbgsysHostToNetworkShort(unsigned short hostshort); |
896
5c02031316bf
6725543: Compiler warnings in serviceability native code
ohair
parents:
2
diff
changeset
|
57 |
uint32_t dbgsysNetworkToHostLong(uint32_t netlong); |
2 | 58 |
unsigned short dbgsysNetworkToHostShort(unsigned short netshort); |
15274
a77cdd5ea6e3
8005120: Compiler warnings in socket transport native code
jzavgren
parents:
5506
diff
changeset
|
59 |
int dbgsysGetSocketName(int fd, struct sockaddr *him, socklen_t *len); |
2 | 60 |
int dbgsysConfigureBlocking(int fd, jboolean blocking); |
61 |
int dbgsysPoll(int fd, jboolean rd, jboolean wr, long timeout); |
|
62 |
int dbgsysGetLastIOError(char *buf, jint size); |
|
63 |
long dbgsysCurrentTimeMillis(); |
|
64 |
||
65 |
/* |
|
66 |
* TLS support |
|
67 |
*/ |
|
68 |
int dbgsysTlsAlloc(); |
|
69 |
void dbgsysTlsFree(int index); |
|
70 |
void dbgsysTlsPut(int index, void *value); |
|
71 |
void* dbgsysTlsGet(int index); |
|
72 |
||
73 |
#endif |