summaryrefslogtreecommitdiffstats
path: root/lib/getsumd.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/getsumd.c')
-rw-r--r--lib/getsumd.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/getsumd.c b/lib/getsumd.c
new file mode 100644
index 0000000..00974bc
--- /dev/null
+++ b/lib/getsumd.c
@@ -0,0 +1,21 @@
+/*
+ * 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;
+}
OpenPOWER on IntegriCloud