Introduce a VTY, factually turning OpenGGSN into an Osmocom program
Change-Id: I9613ca3436e77ea132c47f0096df7c5050d7e826
diff --git a/examples/ggsn.conf b/examples/ggsn.conf
deleted file mode 100644
index 6dcfe44..0000000
--- a/examples/ggsn.conf
+++ /dev/null
@@ -1,92 +0,0 @@
-##############################################################################
-#
-# Sample ggsn configuration file
-#
-##############################################################################
-
-# TAG: fg
-# Include this flag if process is to run in the foreground
-#
-#fg
-
-# TAG: debug
-# Include this flag to include debug information.
-#debug
-
-
-# TAG: conf
-# Configuration file to use. This file is the configuration file,
-# so changing this parameter in the configuration file does not make
-# sense. Use it on the command line instead.
-
-# TAG: pidfile
-# File to store information about the process id of the program.
-# The program must have write access to this file/directory.
-#pidfile /var/run/ggsn.pid
-
-# TAG: statedir
-# Directory to use for nonvolatile storage.
-# The program must have write access to this directory.
-#statedir /var/lib/ggsn/
-
-
-# TAG: listen
-# Specifies the local IP address to listen to
-#listen 10.0.0.240
-
-# TAG: net
-# IP network address of external packet data network
-# Used to set up network interface.
-#net 192.168.0.0/24
-
-# TAG: ipup
-# Script executed after network interface has been brought up.
-# Executed with the following parameters: <devicename> <ip address>
-#ipup /etc/ggsn/ip-up
-
-# TAG: ipdown
-# Script executed after network interface has been taken down.
-# Executed with the following parameters: <devicename> <ip address>
-#ipdown /etc/ggsn/ip-down
-
-# TAG: dynip
-# Dynamic IP address pool.
-# Used for allocation of dynamic IP address when address is not given
-# by HLR.
-# If this option is not given then the net option is used as a substitute.
-#dynip 192.168.0.0/24
-
-# TAG: statip
-# Use of this tag is currently UNSUPPORTED
-# Static IP address pool.
-# Used for allocation of static IP address by means of HLR.
-#statip 192.168.1.0/24
-
-# TAG: pcodns1
-# Protocol configuration option domain name system server 1.
-#pcodns1 0.0.0.0
-
-# TAG: pcodns2
-# Protocol configuration option domain name system server 2.
-#pcodns2 0.0.0.0
-
-# TAG: timelimit
-# Exit after timelimit seconds.
-# Setting timelimit to zero will cause the program not to exit.
-#timelimit 0
-
-# TAG: apn
-# Use of this tag is EXPERIMENTAL
-# Access point name to connect to when run in client mode.
-#apn internet
-
-# TAG: qos
-# Use of this tag is EXPERIMENTAL
-# Requested Quality of Service used when run in client mode.
-# 3 bytes corresponding to ????
-#qos 0x0b921f
-
-# TAG: qos
-# Enable GTP datapath through Linux kernel driver gtp.ko (since 4.7).
-#gtp-linux
-
diff --git a/examples/osmo-ggsn.cfg b/examples/osmo-ggsn.cfg
new file mode 100644
index 0000000..763e561
--- /dev/null
+++ b/examples/osmo-ggsn.cfg
@@ -0,0 +1,71 @@
+!
+! OpenGGSN (0.94.1-adac) configuration saved from vty
+!!
+!
+log stderr
+ logging filter all 1
+ logging color 1
+ logging print category 0
+ logging timestamp 0
+ logging level ip info
+ logging level tun info
+ logging level ggsn info
+ logging level sgsn notice
+ logging level icmp6 notice
+ logging level lglobal notice
+ logging level llapd notice
+ logging level linp notice
+ logging level lmux notice
+ logging level lmi notice
+ logging level lmib notice
+ logging level lsms notice
+ logging level lctrl notice
+ logging level lgtp info
+ logging level lstats notice
+ logging level lgsup notice
+ logging level loap notice
+ logging level lss7 notice
+ logging level lsccp notice
+ logging level lsua notice
+ logging level lm3ua notice
+ logging level lmgcp notice
+!
+stats interval 5
+!
+line vty
+ no login
+!
+ggsn ggsn0
+ gtp state-dir /tmp
+ gtp bind-ip 127.0.0.6
+ apn internet
+ gtpu-mode tun
+ tun-device tun4
+ type-support v4
+ ip prefix dynamic 176.16.222.0/24
+ ip dns 0 192.168.100.1
+ ip dns 1 8.8.8.8
+ ip ifconfig 176.16.222.0/24
+ no shutdown
+ apn inet6
+ gtpu-mode tun
+ tun-device tun6
+ type-support v6
+ ipv6 prefix dynamic 2001:780:44:2000:0:0:0:0/56
+ ipv6 dns 0 2001:4860:4860::8888
+ ipv6 ifconfig 2001:780:44:2000:0:0:0:0/56
+ no shutdown
+ apn inet46
+ gtpu-mode tun
+ tun-device tun46
+ type-support v4v6
+ ip prefix dynamic 176.16.46.0/24
+ ip dns 0 192.168.100.1
+ ip dns 1 8.8.8.8
+ ip ifconfig 176.16.46.0/24
+ ipv6 prefix dynamic 2001:780:44:2100:0:0:0:0/56
+ ipv6 dns 0 2001:4860:4860::8888
+ ipv6 ifconfig 2001:780:44:2100:0:0:0:0/56
+ no shutdown
+ default-apn internet
+ no shutdown ggsn