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