IPX only if ipx is supported by the system.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3060 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
a6e7171f30
commit
1a8690e104
1 changed files with 11 additions and 1 deletions
|
@ -216,12 +216,14 @@ qboolean NET_CompareAdr (netadr_t a, netadr_t b)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef USEIPX
|
||||||
if (a.type == NA_IPX || a.type == NA_BROADCAST_IPX)
|
if (a.type == NA_IPX || a.type == NA_BROADCAST_IPX)
|
||||||
{
|
{
|
||||||
if ((memcmp(a.address.ipx, b.address.ipx, sizeof(a.address.ipx)) == 0) && a.port == b.port)
|
if ((memcmp(a.address.ipx, b.address.ipx, sizeof(a.address.ipx)) == 0) && a.port == b.port)
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef IRCCONNECT
|
#ifdef IRCCONNECT
|
||||||
if (a.type == NA_IRC)
|
if (a.type == NA_IRC)
|
||||||
|
@ -265,12 +267,14 @@ qboolean NET_CompareBaseAdr (netadr_t a, netadr_t b)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef USEIPX
|
||||||
if (a.type == NA_IPX)
|
if (a.type == NA_IPX)
|
||||||
{
|
{
|
||||||
if ((memcmp(a.address.ipx, b.address.ipx, 10) == 0))
|
if ((memcmp(a.address.ipx, b.address.ipx, 10) == 0))
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#ifdef IRCCONNECT
|
#ifdef IRCCONNECT
|
||||||
if (a.type == NA_IRC)
|
if (a.type == NA_IRC)
|
||||||
{
|
{
|
||||||
|
@ -832,9 +836,9 @@ void NET_IntegerToMask (netadr_t *a, netadr_t *amask, int bits)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
#ifdef USEIPX
|
||||||
case NA_IPX:
|
case NA_IPX:
|
||||||
case NA_BROADCAST_IPX:
|
case NA_BROADCAST_IPX:
|
||||||
#ifdef USEIPX
|
|
||||||
n = amask->address.ipx;
|
n = amask->address.ipx;
|
||||||
if (i > 80)
|
if (i > 80)
|
||||||
i = 80;
|
i = 80;
|
||||||
|
@ -1617,8 +1621,10 @@ qboolean NET_PortToAdr (int adrfamily, char *s, netadr_t *a)
|
||||||
a->type = NA_IP;
|
a->type = NA_IP;
|
||||||
else if (adrfamily == AF_INET6)
|
else if (adrfamily == AF_INET6)
|
||||||
a->type = NA_IPV6;
|
a->type = NA_IPV6;
|
||||||
|
#ifdef USEIPX
|
||||||
else if (adrfamily == AF_IPX)
|
else if (adrfamily == AF_IPX)
|
||||||
a->type = NA_IPX;
|
a->type = NA_IPX;
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
a->type = NA_INVALID;
|
a->type = NA_INVALID;
|
||||||
|
@ -1713,10 +1719,12 @@ ftenet_generic_connection_t *FTENET_UDP4_EstablishConnection(qboolean isserver,
|
||||||
{
|
{
|
||||||
return FTENET_Generic_EstablishConnection(AF_INET, IPPROTO_UDP, isserver, address);
|
return FTENET_Generic_EstablishConnection(AF_INET, IPPROTO_UDP, isserver, address);
|
||||||
}
|
}
|
||||||
|
#ifdef USEIPX
|
||||||
ftenet_generic_connection_t *FTENET_IPX_EstablishConnection(qboolean isserver, char *address)
|
ftenet_generic_connection_t *FTENET_IPX_EstablishConnection(qboolean isserver, char *address)
|
||||||
{
|
{
|
||||||
return FTENET_Generic_EstablishConnection(AF_IPX, NSPROTO_IPX, isserver, address);
|
return FTENET_Generic_EstablishConnection(AF_IPX, NSPROTO_IPX, isserver, address);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef TCPCONNECT
|
#ifdef TCPCONNECT
|
||||||
typedef struct ftenet_tcpconnect_stream_s {
|
typedef struct ftenet_tcpconnect_stream_s {
|
||||||
|
@ -3236,7 +3244,9 @@ void NET_InitClient(void)
|
||||||
// FTENET_AddToCollection(cls.sockets, "CLTCP4", port, FTENET_TCP4Connect_EstablishConnection);
|
// FTENET_AddToCollection(cls.sockets, "CLTCP4", port, FTENET_TCP4Connect_EstablishConnection);
|
||||||
FTENET_AddToCollection(cls.sockets, "CLUDP4", port, FTENET_UDP4_EstablishConnection);
|
FTENET_AddToCollection(cls.sockets, "CLUDP4", port, FTENET_UDP4_EstablishConnection);
|
||||||
FTENET_AddToCollection(cls.sockets, "CLUDP6", port, FTENET_UDP6_EstablishConnection);
|
FTENET_AddToCollection(cls.sockets, "CLUDP6", port, FTENET_UDP6_EstablishConnection);
|
||||||
|
#ifdef USEIPX
|
||||||
FTENET_AddToCollection(cls.sockets, "CLIPX", port, FTENET_IPX_EstablishConnection);
|
FTENET_AddToCollection(cls.sockets, "CLIPX", port, FTENET_IPX_EstablishConnection);
|
||||||
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// init the message buffer
|
// init the message buffer
|
||||||
|
|
Loading…
Reference in a new issue