1 2 /* 3 * Copyright (C) 2012 by Darren Reed. 4 * 5 * See the IPFILTER.LICENCE file for details on licencing. 6 * 7 * $Id$ 8 */ 9 10 #include "ipf.h" 11 12 char * getsumd(u_32_t sum)13getsumd(u_32_t sum) 14 { 15 static char sumdbuf[17]; 16 17 if (sum & NAT_HW_CKSUM) 18 snprintf(sumdbuf, sizeof(sumdbuf), "hw(%#0x)", sum & 0xffff); 19 else 20 snprintf(sumdbuf, sizeof(sumdbuf), "%#0x", sum); 21 return (sumdbuf); 22 } 23