Move net_udp.cpp specific defines out of header
This commit is contained in:
parent
8f7d323ec6
commit
124a2ee09c
|
@ -37,10 +37,6 @@ void net_udp_send_mdata_direct(const ubyte *data, int data_len, int pnum, int pr
|
||||||
void net_udp_send_netgame_update();
|
void net_udp_send_netgame_update();
|
||||||
|
|
||||||
// Some defines
|
// Some defines
|
||||||
#ifdef IPv6
|
|
||||||
#define UDP_MCASTv6_ADDR "ff02::1"
|
|
||||||
#endif
|
|
||||||
#define UDP_BCAST_ADDR "255.255.255.255"
|
|
||||||
// Our default port - easy to remember: D = 4, X = 24, X = 24
|
// Our default port - easy to remember: D = 4, X = 24, X = 24
|
||||||
const uint16_t UDP_PORT_DEFAULT = 42424;
|
const uint16_t UDP_PORT_DEFAULT = 42424;
|
||||||
#define UDP_MANUAL_ADDR_DEFAULT "localhost"
|
#define UDP_MANUAL_ADDR_DEFAULT "localhost"
|
||||||
|
@ -51,11 +47,6 @@ const uint16_t UDP_PORT_DEFAULT = 42424;
|
||||||
#endif
|
#endif
|
||||||
const uint16_t TRACKER_PORT_DEFAULT = 42420;
|
const uint16_t TRACKER_PORT_DEFAULT = 42420;
|
||||||
#endif
|
#endif
|
||||||
#if defined(DXX_BUILD_DESCENT_I)
|
|
||||||
#define UDP_REQ_ID "D1XR" // ID string for a request packet
|
|
||||||
#elif defined(DXX_BUILD_DESCENT_II)
|
|
||||||
#define UDP_REQ_ID "D2XR" // ID string for a request packet
|
|
||||||
#endif
|
|
||||||
#define UDP_MAX_NETGAMES 900
|
#define UDP_MAX_NETGAMES 900
|
||||||
#define UDP_NETGAMES_PPAGE 12 // Netgames on one page of Netlist
|
#define UDP_NETGAMES_PPAGE 12 // Netgames on one page of Netlist
|
||||||
#define UDP_NETGAMES_PAGES 75 // Pages available on Netlist (UDP_MAX_NETGAMES/UDP_NETGAMES_PPAGE)
|
#define UDP_NETGAMES_PAGES 75 // Pages available on Netlist (UDP_MAX_NETGAMES/UDP_NETGAMES_PPAGE)
|
||||||
|
|
|
@ -68,6 +68,12 @@
|
||||||
#include "highest_valid.h"
|
#include "highest_valid.h"
|
||||||
#include "partial_range.h"
|
#include "partial_range.h"
|
||||||
|
|
||||||
|
#if defined(DXX_BUILD_DESCENT_I)
|
||||||
|
#define UDP_REQ_ID "D1XR" // ID string for a request packet
|
||||||
|
#elif defined(DXX_BUILD_DESCENT_II)
|
||||||
|
#define UDP_REQ_ID "D2XR" // ID string for a request packet
|
||||||
|
#endif
|
||||||
|
|
||||||
// player position packet structure
|
// player position packet structure
|
||||||
struct UDP_frame_info : prohibit_void_ptr<UDP_frame_info>
|
struct UDP_frame_info : prohibit_void_ptr<UDP_frame_info>
|
||||||
{
|
{
|
||||||
|
@ -122,7 +128,9 @@ static unsigned num_active_udp_games;
|
||||||
static int num_active_udp_changed;
|
static int num_active_udp_changed;
|
||||||
static uint16_t UDP_MyPort;
|
static uint16_t UDP_MyPort;
|
||||||
static sockaddr_in GBcast; // global Broadcast address clients and hosts will use for lite_info exchange over LAN
|
static sockaddr_in GBcast; // global Broadcast address clients and hosts will use for lite_info exchange over LAN
|
||||||
|
#define UDP_BCAST_ADDR "255.255.255.255"
|
||||||
#ifdef IPv6
|
#ifdef IPv6
|
||||||
|
#define UDP_MCASTv6_ADDR "ff02::1"
|
||||||
static sockaddr_in6 GMcast_v6; // same for IPv6-only
|
static sockaddr_in6 GMcast_v6; // same for IPv6-only
|
||||||
#define dispatch_sockaddr_from from.sin6
|
#define dispatch_sockaddr_from from.sin6
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in a new issue