⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wsockdos.h

📁 Libnet is a cross-platform library aimed at game developers. It has an abstract high level API, whic
💻 H
📖 第 1 页 / 共 2 页
字号:
#define SO_SNDLOWAT     0x1003          /* send low-water mark */#define SO_RCVLOWAT     0x1004          /* receive low-water mark */#define SO_SNDTIMEO     0x1005          /* send timeout */#define SO_RCVTIMEO     0x1006          /* receive timeout */#define SO_ERROR        0x1007          /* get error status and clear */#define SO_TYPE         0x1008          /* get socket type *//* * TCP options. */#define TCP_NODELAY     0x0001/* * Address families. */#define AF_UNSPEC       0               /* unspecified */#define AF_UNIX         1               /* local to host (pipes, portals) */#define AF_INET         2               /* internetwork: UDP, TCP, etc. */#define AF_IMPLINK      3               /* arpanet imp addresses */#define AF_PUP          4               /* pup protocols: e.g. BSP */#define AF_CHAOS        5               /* mit CHAOS protocols */#define AF_NS           6               /* XEROX NS protocols */#define AF_ISO          7               /* ISO protocols */#define AF_OSI          AF_ISO          /* OSI is ISO */#define AF_ECMA         8               /* european computer manufacturers */#define AF_DATAKIT      9               /* datakit protocols */#define AF_CCITT        10              /* CCITT protocols, X.25 etc */#define AF_SNA          11              /* IBM SNA */#define AF_DECnet       12              /* DECnet */#define AF_DLI          13              /* Direct data link interface */#define AF_LAT          14              /* LAT */#define AF_HYLINK       15              /* NSC Hyperchannel */#define AF_APPLETALK    16              /* AppleTalk */#define AF_NETBIOS      17              /* NetBios-style addresses */#define AF_MAX          18/* * Structure used by kernel to store most * addresses. */struct sockaddr {	u_short sa_family;              /* address family */	char    sa_data[14];            /* up to 14 bytes of direct address */};/* * Structure used by kernel to pass protocol * information in raw sockets. */struct sockproto {	u_short sp_family;              /* address family */	u_short sp_protocol;            /* protocol */};/* * Protocol families, same as address families for now. */#define PF_UNSPEC       AF_UNSPEC#define PF_UNIX         AF_UNIX#define PF_INET         AF_INET#define PF_IMPLINK      AF_IMPLINK#define PF_PUP          AF_PUP#define PF_CHAOS        AF_CHAOS#define PF_NS           AF_NS#define PF_ISO          AF_ISO#define PF_OSI          AF_OSI#define PF_ECMA         AF_ECMA#define PF_DATAKIT      AF_DATAKIT#define PF_CCITT        AF_CCITT#define PF_SNA          AF_SNA#define PF_DECnet       AF_DECnet#define PF_DLI          AF_DLI#define PF_LAT          AF_LAT#define PF_HYLINK       AF_HYLINK#define PF_APPLETALK    AF_APPLETALK#define PF_MAX          AF_MAX/* * Level number for (get/set)sockopt() to apply to socket itself. */#define SOL_SOCKET      0xffff          /* options for socket level */#define MSG_OOB         0x1             /* process out-of-band data */#define MSG_PEEK        0x2             /* peek at incoming message */#define MSG_DONTROUTE   0x4             /* send without using routing tables */#define MSG_MAXIOVLEN   16/* * All Windows Sockets error constants are biased by WSABASEERR from * the "normal" */#define WSABASEERR              10000/* * Windows Sockets definitions of regular Microsoft C error constants */#define WSAEINTR                (WSABASEERR+4)#define WSAEBADF                (WSABASEERR+9)#define WSAEACCES               (WSABASEERR+13)#define WSAEFAULT               (WSABASEERR+14)#define WSAEINVAL               (WSABASEERR+22)#define WSAEMFILE               (WSABASEERR+24)/* * Windows Sockets definitions of regular Berkeley error constants */#define WSAEWOULDBLOCK          (WSABASEERR+35)#define WSAEINPROGRESS          (WSABASEERR+36)#define WSAEALREADY             (WSABASEERR+37)#define WSAENOTSOCK             (WSABASEERR+38)#define WSAEDESTADDRREQ         (WSABASEERR+39)#define WSAEMSGSIZE             (WSABASEERR+40)#define WSAEPROTOTYPE           (WSABASEERR+41)#define WSAENOPROTOOPT          (WSABASEERR+42)#define WSAEPROTONOSUPPORT      (WSABASEERR+43)#define WSAESOCKTNOSUPPORT      (WSABASEERR+44)#define WSAEOPNOTSUPP           (WSABASEERR+45)#define WSAEPFNOSUPPORT         (WSABASEERR+46)#define WSAEAFNOSUPPORT         (WSABASEERR+47)#define WSAEADDRINUSE           (WSABASEERR+48)#define WSAEADDRNOTAVAIL        (WSABASEERR+49)#define WSAENETDOWN             (WSABASEERR+50)#define WSAENETUNREACH          (WSABASEERR+51)#define WSAENETRESET            (WSABASEERR+52)#define WSAECONNABORTED         (WSABASEERR+53)#define WSAECONNRESET           (WSABASEERR+54)#define WSAENOBUFS              (WSABASEERR+55)#define WSAEISCONN              (WSABASEERR+56)#define WSAENOTCONN             (WSABASEERR+57)#define WSAESHUTDOWN            (WSABASEERR+58)#define WSAETOOMANYREFS         (WSABASEERR+59)#define WSAETIMEDOUT            (WSABASEERR+60)#define WSAECONNREFUSED         (WSABASEERR+61)#define WSAELOOP                (WSABASEERR+62)#define WSAENAMETOOLONG         (WSABASEERR+63)#define WSAEHOSTDOWN            (WSABASEERR+64)#define WSAEHOSTUNREACH         (WSABASEERR+65)#define WSAENOTEMPTY            (WSABASEERR+66)#define WSAEPROCLIM             (WSABASEERR+67)#define WSAEUSERS               (WSABASEERR+68)#define WSAEDQUOT               (WSABASEERR+69)#define WSAESTALE               (WSABASEERR+70)#define WSAEREMOTE              (WSABASEERR+71)/* * Extended Windows Sockets error constant definitions */#define WSASYSNOTREADY          (WSABASEERR+91)#define WSAVERNOTSUPPORTED      (WSABASEERR+92)#define WSANOTINITIALISED       (WSABASEERR+93)/*----------------------------------------------------------------* * Definitions of VxD command indices. * * What follows was taken from towards the end of wsock.h. * * Most of wsock.h doesn't seem to compile; this is all I needed. *----------------------------------------------------------------*/#define WSOCK_FIRST_CMD             0x00000100#define WSOCK_ACCEPT_CMD            (WSOCK_FIRST_CMD + 0x0000)#define WSOCK_BIND_CMD              (WSOCK_FIRST_CMD + 0x0001)#define WSOCK_CLOSESOCKET_CMD       (WSOCK_FIRST_CMD + 0x0002)#define WSOCK_CONNECT_CMD           (WSOCK_FIRST_CMD + 0x0003)#define WSOCK_GETPEERNAME_CMD       (WSOCK_FIRST_CMD + 0x0004)#define WSOCK_GETSOCKNAME_CMD       (WSOCK_FIRST_CMD + 0x0005)#define WSOCK_GETSOCKOPT_CMD        (WSOCK_FIRST_CMD + 0x0006)#define WSOCK_IOCTLSOCKET_CMD       (WSOCK_FIRST_CMD + 0x0007)#define WSOCK_LISTEN_CMD            (WSOCK_FIRST_CMD + 0x0008)#define WSOCK_RECV_CMD              (WSOCK_FIRST_CMD + 0x0009)#define WSOCK_SELECT_SETUP_CMD      (WSOCK_FIRST_CMD + 0x000a)#define WSOCK_SELECT_CLEANUP_CMD    (WSOCK_FIRST_CMD + 0x000b)#define WSOCK_ASYNC_SELECT_CMD      (WSOCK_FIRST_CMD + 0x000c)#define WSOCK_SEND_CMD              (WSOCK_FIRST_CMD + 0x000d)#define WSOCK_SETSOCKOPT_CMD        (WSOCK_FIRST_CMD + 0x000e)#define WSOCK_SHUTDOWN_CMD          (WSOCK_FIRST_CMD + 0x000f)#define WSOCK_SOCKET_CMD            (WSOCK_FIRST_CMD + 0x0010)#define WSOCK_CREATE_CMD            (WSOCK_FIRST_CMD + 0x0011)#define WSOCK_CREATE_MULTIPLE_CMD   (WSOCK_FIRST_CMD + 0x0012)#define WSOCK_DESTROY_CMD           (WSOCK_FIRST_CMD + 0x0013)#define WSOCK_DESTROY_BY_SOCKET_CMD (WSOCK_FIRST_CMD + 0x0014)#define WSOCK_DESTROY_BY_THREAD_CMD (WSOCK_FIRST_CMD + 0x0015)#define WSOCK_SIGNAL_CMD            (WSOCK_FIRST_CMD + 0x0016)#define WSOCK_SIGNAL_ALL_CMD        (WSOCK_FIRST_CMD + 0x0017)#define WSOCK_CONTROL_CMD           (WSOCK_FIRST_CMD + 0x0018)#define WSOCK_REGISTER_POSTMSG_CMD  (WSOCK_FIRST_CMD + 0x0019)#define WSOCK_ARECV_CMD             (WSOCK_FIRST_CMD + 0x001a)#define WSOCK_ASEND_CMD             (WSOCK_FIRST_CMD + 0x001b)#ifdef CHICAGO#define WSOCK_LAST_CMD              WSOCK_ASEND_CMD#else#define WSOCK_LAST_CMD              WSOCK_REGISTER_POSTMSG_CMD#endif/*----------------------------------------------------------------* * farptrx functions, by Dan Hedlund. *----------------------------------------------------------------*/void _farpokex (unsigned short selector, unsigned long offset, const void *x, int len);void _farpeekx (unsigned short selector, unsigned long offset, void *x, int len);extern __inline__ void _farpokex (unsigned short selector, unsigned long offset, const void *x, int len){  int dummy1, dummy2;  __asm__ __volatile__ ("pushl %%es\n"			"movw %w2, %%es\n"			"rep\n"			"movsb\n"			"popl %%es"	  : "=S" (dummy1), "=D" (dummy2)	  : "rm" (selector), "S" (x), "D" (offset), "c" (len)  );}extern __inline__ void _farpeekx (unsigned short selector, unsigned long offset, void *x, int len){  int dummy1, dummy2;  __asm__ __volatile__ ("pushl %%ds\n"			"movw %w2,%%ds\n"			"rep\n"			"movsb\n"			"popl %%ds"	  : "=S" (dummy1), "=D" (dummy2)	  : "rm" (selector), "S" (offset), "D" (x), "c" (len)  );}/*----------------------------------------------------------------* * end of file *----------------------------------------------------------------*/#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -