main: add VTY and '-c config-file' option

Add config file, mainly for logging control.

Open VTY on the OMSO_VTY_PORT_HLR added to libosmocore in
commit 92fa18e6b800a27aa064a5fb8321cddd7383ae20
aka change-id I08cb52d9399a27e6876e45da36f434708c4fddef.

Add hlr_vty.h/c for standard VTY setup.
Add -c option to pass config file.
Add --version option.

Change-Id: Iedb884345a597371a337b0c67eb6013b7d5d1ce1
diff --git a/src/hlr_vty.c b/src/hlr_vty.c
new file mode 100644
index 0000000..e4eef8f
--- /dev/null
+++ b/src/hlr_vty.c
@@ -0,0 +1,44 @@
+/* OsmoHLR VTY implementation */
+
+/* (C) 2016 sysmocom s.f.m.c. GmbH <info@sysmocom.de>
+ * All Rights Reserved
+ *
+ * Author: Neels Hofmeyr <nhofmeyr@sysmocom.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <osmocom/vty/vty.h>
+#include <osmocom/vty/command.h>
+#include <osmocom/vty/logging.h>
+
+#include "hlr_vty.h"
+
+int hlr_vty_is_config_node(struct vty *vty, int node)
+{
+	switch (node) {
+	/* add items that are not config */
+	case CONFIG_NODE:
+		return 0;
+
+	default:
+		return 1;
+	}
+}
+
+void hlr_vty_init(const struct log_info *cat)
+{
+	logging_vty_add_cmds(cat);
+}