24 lines
447 B
C
24 lines
447 B
C
/* $NetBSD: getsumd.c,v 1.1.1.3 2010/04/17 20:45:56 darrenr Exp $ */
|
|
|
|
/*
|
|
* Copyright (C) 2002 by Darren Reed.
|
|
*
|
|
* See the IPFILTER.LICENCE file for details on licencing.
|
|
*
|
|
* Id: getsumd.c,v 1.2.4.2 2009/12/27 06:58:06 darrenr Exp
|
|
*/
|
|
|
|
#include "ipf.h"
|
|
|
|
char *getsumd(sum)
|
|
u_32_t sum;
|
|
{
|
|
static char sumdbuf[17];
|
|
|
|
if (sum & NAT_HW_CKSUM)
|
|
sprintf(sumdbuf, "hw(%#0x)", sum & 0xffff);
|
|
else
|
|
sprintf(sumdbuf, "%#0x", sum);
|
|
return sumdbuf;
|
|
}
|