[HL25] Backport comments about "netadr_s" structure

This commit is contained in:
Joël Troch 2024-08-28 11:08:27 +02:00
parent 392e9646c0
commit 450c27de55

View file

@ -16,20 +16,25 @@
#pragma once
// JoshA: Unfortunately netadr_s is passed to clients for connectionless packets.
// No Valve mod uses them, but custom mods *might*, so not changing the start of this struct layout.
// It's very unlikely they touch this, but I'd like to play as safe as possible with all ABI etc for mod compat.
// If we want to add IPv6 someday, bung it at the end of netadr_s and leave ip + ipx alone.
typedef enum
{
NA_UNUSED,
NA_LOOPBACK,
NA_BROADCAST,
NA_IP,
NA_IPX,
NA_BROADCAST_IPX,
NA_IPX, // deprecated
NA_BROADCAST_IPX, // deprecated
} netadrtype_t;
typedef struct netadr_s
{
netadrtype_t type;
unsigned char ip[4];
unsigned char ipx[10];
unsigned char ipx[10]; // deprecated
unsigned short port;
} netadr_t;