NET_PrintChannelStatus
0x001c4db0 · 625 bytes · __cdecl
_Z22NET_PrintChannelStatusP11INetChannel
Decompiled
undefined (1 param)
/* NET_PrintChannelStatus(INetChannel*) */
void NET_PrintChannelStatus(INetChannel *param_1)
{
char cVar1;
undefined4 uVar2;
int iVar3;
int iVar4;
char *pcVar5;
longdouble lVar6;
longdouble lVar7;
pcVar5 = "(Demo`)";
uVar2 = (*(code *)**(undefined4 **)param_1)(param_1);
Msg("NetChannel \'%s\':\n",uVar2);
cVar1 = (**(code **)(*(int *)param_1 + 0x20))(param_1);
if (cVar1 == '\0') {
pcVar5 = "";
}
uVar2 = (**(code **)(*(int *)param_1 + 4))(param_1);
Msg("- remote IP: %s\n",uVar2,pcVar5);
lVar6 = (longdouble)(**(code **)(*(int *)param_1 + 0xc))(param_1);
uVar2 = COM_FormatSeconds((int)lVar6);
Msg("- online: %s\n",uVar2);
cVar1 = (**(code **)(*(int *)param_1 + 0xf4))(param_1);
pcVar5 = "pending data";
if (cVar1 == '\0') {
pcVar5 = "available";
}
Msg("- reliable: %s\n",pcVar5);
lVar6 = (longdouble)(**(code **)(*(int *)param_1 + 0x2c))(param_1,1);
lVar7 = (longdouble)(**(code **)(*(int *)param_1 + 0x28))(param_1,0);
Msg("- latency: %.1f, loss %.2f\n",(double)(float)lVar7,(double)(float)lVar6);
lVar6 = (longdouble)(**(code **)(*(int *)param_1 + 0x38))(param_1,0);
lVar7 = (longdouble)(**(code **)(*(int *)param_1 + 0x38))(param_1,1);
Msg("- packets: in %.1f/s, out %.1f/s\n",(double)(float)lVar7,(double)(float)lVar6);
lVar6 = (longdouble)(**(code **)(*(int *)param_1 + 0x30))(param_1,0);
lVar7 = (longdouble)(**(code **)(*(int *)param_1 + 0x30))(param_1,1);
Msg("- choke: in %.2f, out %.2f\n",(double)(float)lVar7,(double)(float)lVar6);
lVar6 = (longdouble)(**(code **)(*(int *)param_1 + 0x34))(param_1,0);
lVar7 = (longdouble)(**(code **)(*(int *)param_1 + 0x34))(param_1,1);
Msg("- flow: in %.1f, out %.1f kB/s\n",(double)((float)lVar7 * 0.0009765625),
(double)((float)lVar6 * 0.0009765625));
iVar3 = (**(code **)(*(int *)param_1 + 0x3c))(param_1,0);
iVar4 = (**(code **)(*(int *)param_1 + 0x3c))(param_1,1);
Msg("- total: in %.1f, out %.1f MB\n\n",(double)((float)iVar4 * 9.536743e-07),
(double)((float)iVar3 * 9.536743e-07));
return;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
Just a Signatures{} block, ready to drop into a gamedata
file. Wire it up in your plugin however you like - SDKCall, DHooks,
raw memory ops, or anything else.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.