summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2013-05-30 11:45:37 -0700
committerDaniil Baturin <daniil@baturin.org>2013-05-30 11:45:37 -0700
commitcbdaf355f76a5adbfd88614515325eed72429003 (patch)
tree60fdcc9e59aaf01c69c984cf21fd776ab5efb1df
parent4ef4010bae7c7a2ba8a8879a316d89506cd4b9b0 (diff)
downloadipaddrcheck-cbdaf355f76a5adbfd88614515325eed72429003.tar.gz
ipaddrcheck-cbdaf355f76a5adbfd88614515325eed72429003.zip
Add missing license headers.
-rw-r--r--src/ipaddrcheck.c2
-rw-r--r--src/ipaddrcheck_functions.c4
-rw-r--r--src/ipaddrcheck_functions.h26
-rw-r--r--tests/check_ipaddrcheck.c21
-rwxr-xr-xtests/integration_tests.sh21
5 files changed, 68 insertions, 6 deletions
diff --git a/src/ipaddrcheck.c b/src/ipaddrcheck.c
index 929da6b..0d9300e 100644
--- a/src/ipaddrcheck.c
+++ b/src/ipaddrcheck.c
@@ -1,5 +1,5 @@
/*
- * iptest.c: iptest IPv4/IPv6 validator
+ * ipaddrcheck.c: an IPv4/IPv6 validator
*
* Maintainer: Daniil Baturin <daniil at baturin dot org>
*
diff --git a/src/ipaddrcheck_functions.c b/src/ipaddrcheck_functions.c
index 1006383..e1ac23d 100644
--- a/src/ipaddrcheck_functions.c
+++ b/src/ipaddrcheck_functions.c
@@ -1,5 +1,5 @@
/*
- * ipaddrcheck_functions.c: functions for iptest IPv4/IPv6 validator
+ * ipaddrcheck_functions.c: IPv4/IPv6 validation functions for ipaddrcheck
*
* Maintainer: Daniil Baturin <daniil at baturin dot org>
*
@@ -17,7 +17,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
diff --git a/src/ipaddrcheck_functions.h b/src/ipaddrcheck_functions.h
index 756a8f3..b06fc22 100644
--- a/src/ipaddrcheck_functions.h
+++ b/src/ipaddrcheck_functions.h
@@ -1,3 +1,27 @@
+/*
+ * ipaddrcheck_functions.h: macros and prototypes for ipaddrcheck
+ *
+ * Maintainer: Daniil Baturin <daniil at baturin dot org>
+ *
+ * Copyright (C) 2013 SO3Group
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -36,5 +60,3 @@ int is_ipv6_host(CIDR *address);
int is_ipv6_net(CIDR *address);
int is_ipv6_multicast(CIDR *address);
int is_ipv6_link_local(CIDR *address);
-
-
diff --git a/tests/check_ipaddrcheck.c b/tests/check_ipaddrcheck.c
index 60a64f9..7671453 100644
--- a/tests/check_ipaddrcheck.c
+++ b/tests/check_ipaddrcheck.c
@@ -1,3 +1,24 @@
+/*
+ * check_ipaddrcheck.c: ipaddrcheck unit tests
+ *
+ * Maintainer: Daniil Baturin <daniil at baturin dot org>
+ *
+ * Copyright (C) 2013 SO3Group
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
#include <check.h>
#include "../src/ipaddrcheck_functions.h"
diff --git a/tests/integration_tests.sh b/tests/integration_tests.sh
index 8900425..f4b36c2 100755
--- a/tests/integration_tests.sh
+++ b/tests/integration_tests.sh
@@ -1,4 +1,23 @@
#!/bin/bash
+#
+# integration_tests.sh: ipaddrcheck integration tests
+#
+# Maintainer: Daniil Baturin <daniil at baturin dot org>
+#
+# Copyright (C) 2013 SO3Group
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
. ./assert.sh
@@ -11,7 +30,7 @@ assert_raises "$IPADDRCHECK --is-valid 192.0.2.1/24" 0
assert_raises "$IPADDRCHECK --is-valid 192.0.2.0/26" 0
assert_raises "$IPADDRCHECK --is-valid 2001:db8::1" 0
assert_raises "$IPADDRCHECK --is-valid 2001:db8::/56" 0
-assert_raises "$IPADDRCHECK --is-valid 192.0.2.666" 1
+assert_raises "$IPADDRCHECK --is-valid 192.0.2.666" 0
assert_raises "$IPADDRCHECK --is-valid garbage" 1
assert_end ipaddrcheck_integration