118 lines
2.8 KiB
C
118 lines
2.8 KiB
C
/*-
|
|
* Copyright (c) 2017-2020 Carsten Sonne Larsen <cs@innolan.net>
|
|
* All rights reserved.
|
|
*
|
|
* Redistribution and use in source and binary forms, with or without
|
|
* modification, are permitted provided that the following conditions
|
|
* are met:
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
* notice, this list of conditions and the following disclaimer.
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
* documentation and/or other materials provided with the distribution.
|
|
*
|
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
*
|
|
*/
|
|
|
|
#ifndef NET_H_INCLUDED
|
|
#define NET_H_INCLUDED
|
|
|
|
#ifndef ENOTSOCK
|
|
#define ENOTSOCK 38
|
|
#endif
|
|
#ifndef EDESTADDRREQ
|
|
#define EDESTADDRREQ 39
|
|
#endif
|
|
#ifndef EMSGSIZE
|
|
#define EMSGSIZE 40
|
|
#endif
|
|
#ifndef EPROTOTYPE
|
|
#define EPROTOTYPE 41
|
|
#endif
|
|
#ifndef ENOPROTOOPT
|
|
#define ENOPROTOOPT 42
|
|
#endif
|
|
#ifndef EPROTONOSUPPORT
|
|
#define EPROTONOSUPPORT 43
|
|
#endif
|
|
#ifndef ESOCKTNOSUPPORT
|
|
#define ESOCKTNOSUPPORT 44
|
|
#endif
|
|
#ifndef EOPNOTSUPP
|
|
#define EOPNOTSUPP 45
|
|
#endif
|
|
#ifndef EPFNOSUPPORT
|
|
#define EPFNOSUPPORT 46
|
|
#endif
|
|
#ifndef EAFNOSUPPORT
|
|
#define EAFNOSUPPORT 47
|
|
#endif
|
|
#ifndef EADDRINUSE
|
|
#define EADDRINUSE 48
|
|
#endif
|
|
#ifndef EADDRNOTAVAIL
|
|
#define EADDRNOTAVAIL 49
|
|
#endif
|
|
#ifndef ENETDOWN
|
|
#define ENETDOWN 50
|
|
#endif
|
|
#ifndef ENETUNREACH
|
|
#define ENETUNREACH 51
|
|
#endif
|
|
#ifndef ENETRESET
|
|
#define ENETRESET 52
|
|
#endif
|
|
#ifndef ECONNABORTED
|
|
#define ECONNABORTED 53
|
|
#endif
|
|
#ifndef ECONNRESET
|
|
#define ECONNRESET 54
|
|
#endif
|
|
#ifndef ENOBUFS
|
|
#define ENOBUFS 55
|
|
#endif
|
|
#ifndef EISCONN
|
|
#define EISCONN 56
|
|
#endif
|
|
#ifndef ENOTCONN
|
|
#define ENOTCONN 57
|
|
#endif
|
|
#ifndef ESHUTDOWN
|
|
#define ESHUTDOWN 58
|
|
#endif
|
|
#ifndef ETOOMANYREFS
|
|
#define ETOOMANYREFS 59
|
|
#endif
|
|
#ifndef ETIMEDOUT
|
|
#define ETIMEDOUT 60
|
|
#endif
|
|
#ifndef ECONNREFUSED
|
|
#define ECONNREFUSED 61
|
|
#endif
|
|
#ifndef EHOSTDOWN
|
|
#define EHOSTDOWN 64
|
|
#endif
|
|
#ifndef EHOSTUNREACH
|
|
#define EHOSTUNREACH 65
|
|
#endif
|
|
|
|
int OpenSocketLibrary(void);
|
|
void CloseSocketLibrary(void);
|
|
const char *GetErrorText(void);
|
|
const char *GetHostErrorText(void);
|
|
int GetErrorNo(void);
|
|
int GetHostErrorNo(void);
|
|
extern struct Library *SocketBase;
|
|
|
|
#endif
|