NetBSD-5.0.2/dist/ipf/lib/getsumd.c

Compare this file to the similar file:
Show the results in this format:

/*	$NetBSD: getsumd.c,v 1.1.1.2 2007/04/14 20:17:31 martin Exp $	*/

/*
 * Copyright (C) 2002 by Darren Reed.
 * 
 * See the IPFILTER.LICENCE file for details on licencing.  
 *   
 * Id: getsumd.c,v 1.2.4.1 2006/06/16 17:21:01 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;
}