141edb306SCy Schubert 241edb306SCy Schubert /* 341edb306SCy Schubert * Copyright (C) 2012 by Darren Reed. 441edb306SCy Schubert * 541edb306SCy Schubert * See the IPFILTER.LICENCE file for details on licencing. 641edb306SCy Schubert * 741edb306SCy Schubert * $Id$ 841edb306SCy Schubert */ 941edb306SCy Schubert 1041edb306SCy Schubert #include "ipf.h" 1141edb306SCy Schubert 12efeb8bffSCy Schubert char * getsumd(u_32_t sum)13efeb8bffSCy Schubertgetsumd(u_32_t sum) 1441edb306SCy Schubert { 1541edb306SCy Schubert static char sumdbuf[17]; 1641edb306SCy Schubert 1741edb306SCy Schubert if (sum & NAT_HW_CKSUM) 1841edb306SCy Schubert snprintf(sumdbuf, sizeof(sumdbuf), "hw(%#0x)", sum & 0xffff); 1941edb306SCy Schubert else 2041edb306SCy Schubert snprintf(sumdbuf, sizeof(sumdbuf), "%#0x", sum); 21*2582ae57SCy Schubert return (sumdbuf); 2241edb306SCy Schubert } 23