MCPcopy Create free account
hub / github.com/cppla/ServerStatus / CNetHash

Method CNetHash

server/src/netban.cpp:16–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14
15
16CNetBan::CNetHash::CNetHash(const NETADDR *pAddr)
17{
18 if(pAddr->type==NETTYPE_IPV4)
19 m_Hash = (pAddr->ip[0]+pAddr->ip[1]+pAddr->ip[2]+pAddr->ip[3])&0xFF;
20 else
21 m_Hash = (pAddr->ip[0]+pAddr->ip[1]+pAddr->ip[2]+pAddr->ip[3]+pAddr->ip[4]+pAddr->ip[5]+pAddr->ip[6]+pAddr->ip[7]+
22 pAddr->ip[8]+pAddr->ip[9]+pAddr->ip[10]+pAddr->ip[11]+pAddr->ip[12]+pAddr->ip[13]+pAddr->ip[14]+pAddr->ip[15])&0xFF;
23 m_HashIndex = 0;
24}
25
26CNetBan::CNetHash::CNetHash(const CNetRange *pRange)
27{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected