aboutsummaryrefslogtreecommitdiff
path: root/sbin/ipf/libipf/initparse.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/ipf/libipf/initparse.c')
-rw-r--r--sbin/ipf/libipf/initparse.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/sbin/ipf/libipf/initparse.c b/sbin/ipf/libipf/initparse.c
new file mode 100644
index 000000000000..c85d6d3ed69d
--- /dev/null
+++ b/sbin/ipf/libipf/initparse.c
@@ -0,0 +1,20 @@
+/* $FreeBSD$ */
+
+/*
+ * Copyright (C) 2012 by Darren Reed.
+ *
+ * See the IPFILTER.LICENCE file for details on licencing.
+ *
+ * $Id$
+ */
+#include "ipf.h"
+
+
+char thishost[MAXHOSTNAMELEN];
+
+
+void initparse(void)
+{
+ gethostname(thishost, sizeof(thishost));
+ thishost[sizeof(thishost) - 1] = '\0';
+}