xref: /illumos-gate/usr/src/cmd/ipf/lib/common/getsumd.c (revision 7c478bd9)
1*7c478bd9Sstevel@tonic-gate #include "ipf.h"
2*7c478bd9Sstevel@tonic-gate 
3*7c478bd9Sstevel@tonic-gate char *getsumd(sum)
4*7c478bd9Sstevel@tonic-gate u_32_t sum;
5*7c478bd9Sstevel@tonic-gate {
6*7c478bd9Sstevel@tonic-gate 	static char sumdbuf[17];
7*7c478bd9Sstevel@tonic-gate 
8*7c478bd9Sstevel@tonic-gate 	if (sum & NAT_HW_CKSUM)
9*7c478bd9Sstevel@tonic-gate 		sprintf(sumdbuf, "hw(%#0x)", sum & 0xffff);
10*7c478bd9Sstevel@tonic-gate 	else
11*7c478bd9Sstevel@tonic-gate 		sprintf(sumdbuf, "%#0x", sum);
12*7c478bd9Sstevel@tonic-gate 	return sumdbuf;
13*7c478bd9Sstevel@tonic-gate }
14