net_win.c 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. /*
  2. Copyright (C) 1996-1997 Id Software, Inc.
  3. This program is free software; you can redistribute it and/or
  4. modify it under the terms of the GNU General Public License
  5. as published by the Free Software Foundation; either version 2
  6. of the License, or (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. See the GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program; if not, write to the Free Software
  13. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  14. */
  15. #include "quakedef.h"
  16. #include "net_loop.h"
  17. #include "net_dgrm.h"
  18. #include "net_ser.h"
  19. net_driver_t net_drivers[MAX_NET_DRIVERS] =
  20. {
  21. {
  22. "Loopback",
  23. false,
  24. Loop_Init,
  25. Loop_Listen,
  26. Loop_SearchForHosts,
  27. Loop_Connect,
  28. Loop_CheckNewConnections,
  29. Loop_GetMessage,
  30. Loop_SendMessage,
  31. Loop_SendUnreliableMessage,
  32. Loop_CanSendMessage,
  33. Loop_CanSendUnreliableMessage,
  34. Loop_Close,
  35. Loop_Shutdown
  36. }
  37. ,
  38. {
  39. "Datagram",
  40. false,
  41. Datagram_Init,
  42. Datagram_Listen,
  43. Datagram_SearchForHosts,
  44. Datagram_Connect,
  45. Datagram_CheckNewConnections,
  46. Datagram_GetMessage,
  47. Datagram_SendMessage,
  48. Datagram_SendUnreliableMessage,
  49. Datagram_CanSendMessage,
  50. Datagram_CanSendUnreliableMessage,
  51. Datagram_Close,
  52. Datagram_Shutdown
  53. }
  54. };
  55. int net_numdrivers = 2;
  56. #include "net_wins.h"
  57. #include "net_wipx.h"
  58. net_landriver_t net_landrivers[MAX_NET_DRIVERS] =
  59. {
  60. {
  61. "Winsock TCPIP",
  62. false,
  63. 0,
  64. WINS_Init,
  65. WINS_Shutdown,
  66. WINS_Listen,
  67. WINS_OpenSocket,
  68. WINS_CloseSocket,
  69. WINS_Connect,
  70. WINS_CheckNewConnections,
  71. WINS_Read,
  72. WINS_Write,
  73. WINS_Broadcast,
  74. WINS_AddrToString,
  75. WINS_StringToAddr,
  76. WINS_GetSocketAddr,
  77. WINS_GetNameFromAddr,
  78. WINS_GetAddrFromName,
  79. WINS_AddrCompare,
  80. WINS_GetSocketPort,
  81. WINS_SetSocketPort
  82. },
  83. {
  84. "Winsock IPX",
  85. false,
  86. 0,
  87. WIPX_Init,
  88. WIPX_Shutdown,
  89. WIPX_Listen,
  90. WIPX_OpenSocket,
  91. WIPX_CloseSocket,
  92. WIPX_Connect,
  93. WIPX_CheckNewConnections,
  94. WIPX_Read,
  95. WIPX_Write,
  96. WIPX_Broadcast,
  97. WIPX_AddrToString,
  98. WIPX_StringToAddr,
  99. WIPX_GetSocketAddr,
  100. WIPX_GetNameFromAddr,
  101. WIPX_GetAddrFromName,
  102. WIPX_AddrCompare,
  103. WIPX_GetSocketPort,
  104. WIPX_SetSocketPort
  105. }
  106. };
  107. int net_numlandrivers = 2;