From 450c27de5590d54bc93a82fdabdc11a40c485a01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Troch?= Date: Wed, 28 Aug 2024 11:08:27 +0200 Subject: [PATCH] [HL25] Backport comments about "netadr_s" structure --- common/netadr.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/common/netadr.h b/common/netadr.h index 173f390..69f9ee1 100644 --- a/common/netadr.h +++ b/common/netadr.h @@ -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;