0N/A/*
2362N/A * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
0N/A */
0N/A#ifndef _JAVASOFT_WIN32_SOCKET_MD_H
0N/A
0N/A#include <jni.h>
0N/A#include <sys/types.h>
0N/A#include "sys.h"
0N/A#include "socket_md.h"
0N/A
0N/A#define DBG_POLLIN 1
0N/A#define DBG_POLLOUT 2
0N/A
0N/A#define DBG_EINPROGRESS -150
0N/A#define DBG_ETIMEOUT -200
0N/A
0N/Aint dbgsysSocketClose(int fd);
0N/Aint dbgsysConnect(int fd, struct sockaddr *him, int len);
0N/Aint dbgsysFinishConnect(int fd, long timeout);
0N/Aint dbgsysAccept(int fd, struct sockaddr *him, int *len);
0N/Aint dbgsysSendTo(int fd, char *buf, int len, int flags, struct sockaddr *to,
0N/A int tolen);
0N/Aint dbgsysRecvFrom(int fd, char *buf, int nbytes, int flags,
0N/A struct sockaddr *from, int *fromlen);
439N/Aint dbgsysListen(int fd, int backlog);
0N/Aint dbgsysRecv(int fd, char *buf, int nBytes, int flags);
0N/Aint dbgsysSend(int fd, char *buf, int nBytes, int flags);
0N/Astruct hostent *dbgsysGetHostByName(char *hostname);
0N/Aint dbgsysSocket(int domain, int type, int protocol);
0N/Aint dbgsysBind(int fd, struct sockaddr *name, int namelen);
0N/Aint dbgsysSetSocketOption(int fd, jint cmd, jboolean on, jvalue value);
439N/Auint32_t dbgsysInetAddr(const char* cp);
439N/Auint32_t dbgsysHostToNetworkLong(uint32_t hostlong);
0N/Aunsigned short dbgsysHostToNetworkShort(unsigned short hostshort);
439N/Auint32_t dbgsysNetworkToHostLong(uint32_t netlong);
0N/Aunsigned short dbgsysNetworkToHostShort(unsigned short netshort);
0N/Aint dbgsysGetSocketName(int fd, struct sockaddr *him, int *len);
0N/Aint dbgsysConfigureBlocking(int fd, jboolean blocking);
0N/Aint dbgsysPoll(int fd, jboolean rd, jboolean wr, long timeout);
0N/Aint dbgsysGetLastIOError(char *buf, jint size);
0N/Along dbgsysCurrentTimeMillis();
0N/A
0N/A/*
0N/A * TLS support
0N/A */
0N/Aint dbgsysTlsAlloc();
0N/Avoid dbgsysTlsFree(int index);
0N/Avoid dbgsysTlsPut(int index, void *value);
0N/Avoid* dbgsysTlsGet(int index);
0N/A
0N/A#endif