1 /*
2 	net_wins.h
3 
4 	@description@
5 
6 	Copyright (C) 1996-1997  Id Software, Inc.
7 
8 	This program is free software; you can redistribute it and/or
9 	modify it under the terms of the GNU General Public License
10 	as published by the Free Software Foundation; either version 2
11 	of the License, or (at your option) any later version.
12 
13 	This program is distributed in the hope that it will be useful,
14 	but WITHOUT ANY WARRANTY; without even the implied warranty of
15 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16 
17 	See the GNU General Public License for more details.
18 
19 	You should have received a copy of the GNU General Public License
20 	along with this program; if not, write to:
21 
22 		Free Software Foundation, Inc.
23 		59 Temple Place - Suite 330
24 		Boston, MA  02111-1307, USA
25 
26 */
27 
28 #ifndef __net_wins_h
29 #define __net_wind_h
30 
31 #include "winquake.h"
32 
33 #include "QF/qtypes.h"
34 
35 /** \defgroup nq-wins NetQuake Winsock lan driver.
36 	\ingroup nq-ld
37 */
38 //@{
39 
40 extern int winsock_initialized;
41 extern WSADATA winsockdata;
42 
43 int  WINS_Init (void);
44 void WINS_Shutdown (void);
45 void WINS_Listen (qboolean state);
46 int  WINS_OpenSocket (int port);
47 int  WINS_CloseSocket (int socket);
48 int  WINS_Connect (int socket, netadr_t *addr);
49 int  WINS_CheckNewConnections (void);
50 int  WINS_Read (int socket, byte *buf, int len, netadr_t *addr);
51 int  WINS_Write (int socket, byte *buf, int len, netadr_t *addr);
52 int  WINS_Broadcast (int socket, byte *buf, int len);
53 const char *WINS_AddrToString (netadr_t *addr);
54 int  WINS_GetSocketAddr (int socket, netadr_t *addr);
55 int  WINS_GetNameFromAddr (netadr_t *addr, char *name);
56 int  WINS_GetAddrFromName (const char *name, netadr_t *addr);
57 int  WINS_AddrCompare (netadr_t *addr1, netadr_t *addr2);
58 int  WINS_GetSocketPort (netadr_t *addr);
59 int  WINS_SetSocketPort (netadr_t *addr, int port);
60 
61 //@}
62 
63 #endif//__net_wins_h
64