Developing lightweight computation at the DSG edge

Commit 90e7be61 authored by Pau Escrich's avatar Pau Escrich
Browse files

Remove not used files

Remove all license references for individual files and add a single file COPYING and AUTHORS
parent cfec5a5c
Pau Escrich <p4u@dabax.net>
Simó Albert i Beltran <sim6@probeta.net>
Agustí Moll <agusti@biruji.org>
Roger Baig <roger.baig@guifi.net>
Roger Pueyo <rogerpueyo@rogerpueyo.com>
Axel Neumann <axn@cgws.de>
Victor Oncins <victor@routek.net>
This diff is collapsed.
#!/bin/sh
# Copyright © 2012 Fundacio Privada per a la Xarxa Oberta, Lliure i Neutral guifi.net
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 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 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/>.
#
# Contributors:
# Simó Albert i Beltran
#
# Check if bmx6 is stoped
[ ! -f /proc/$(cat /var/run/bmx6/pid)/status ] && {
echo "[$(date)] Starting bmx6, it was down."
......
#!/bin/sh
# Copyright (C) 2011 Fundacio Privada per a la Xarxa Oberta, Lliure i Neutral guifi.net
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# The full GNU General Public License is included in this distribution in
# the file called "COPYING".
#
# Contributors:
# Simó Albert i Beltran
#
SOURCE_COMMON=1
#DEBUG="/tmp/qmp_common.debug"
......
# Copyright (C) 2011 Fundacio Privada per a la Xarxa Oberta, Lliure i Neutral guifi.net
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# The full GNU General Public License is included in this distribution in
# the file called "COPYING".
#
# Contributors:
# Pau Escrich <p4u@dabax.net>
# Simó Albert i Beltran
#
#!/bin/sh
QMP_PATH="/etc/qmp"
. $QMP_PATH/qmp_common.sh
......
#!/bin/sh
#/etc/rc.common
# Copyright (C) 2011 Fundacio Privada per a la Xarxa Oberta, Lliure i Neutral guifi.net
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# The full GNU General Public License is included in this distribution in
# the file called "COPYING".
#
# Contributors:
# Axel Neumann
# Pau Escrich <p4u@dabax.net>
# Simó Albert i Beltran
#
QMP_PATH="/etc/qmp"
SOURCE_FUNCTIONS=1
......
#!/bin/sh
# Copyright (C) 2011 Fundacio Privada per a la Xarxa Oberta, Lliure i Neutral guifi.net
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# The full GNU General Public License is included in this distribution in
# the file called "COPYING".
#
# Contributors:
# Simó Albert i Beltran
#
QMP_PATH="/etc/qmp"
SOURCE_GW=1
......
#!/usr/bin/lua
--[[
Copyright (C) 2011 Fundacio Privada per a la Xarxa Oberta, Lliure i Neutral guifi.net
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 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 General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
--]]
uci = require "luci.model.uci"
qmp_model = {}
function qmp_model.get(section, option)
local c = uci.cursor()
if section and option then
return c:get('qmp', section, option)
else
return false
end
end
function qmp_model.add(section, option, value)
return qmp_model.set(section, option, value)
end
function qmp_model.del(section, option)
local c = uci.cursor()
return c:delete('qmp', section, option)
end
function qmp_model.set(section, option, value)
local c = uci.cursor()
if section and option then
return c:set('qmp', section, option, value)
else
return false
end
end
function qmp_model.get_type(type, index, option)
local c = uci.cursor()
if index then
if option then
return qmp_model.get_type_option(type, index, option)
else
return qmp_model.get_type_index(type, index)
end
else
return qmp_model.get_all_type(type)
end
end
function qmp_model.get_all_type(type)
local c = uci.cursor()
local gt = {}
if c:foreach('qmp', type, function (t) table.insert(gt, t) end) then
return gt
else
return false
end
end
function qmp_model.get_indexes(type, index)
local c = uci.cursor()
local gt = {}
if c:foreach('qmp', type, function (t) if t['.index'] == index then table.insert(gt, t) end end) then
return gt
else
return false
end
end
function qmp_model.get_type_option(type, index, option)
local c = uci.cursor()
local gt = {}
if c:foreach('qmp', type, function (t) if t['.index'] == index then table.insert(gt, t) end end) then
return gt[option]
else
return false
end
end
function qmp_model.set_type(type, index, option)
local c = uci.cursor()
end
function qmp_model.raw()
return uci.cursor()
end
# Copyright (C) 2011 Fundacio Privada per a la Xarxa Oberta, Lliure i Neutral guifi.net
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# The full GNU General Public License is included in this distribution in
# the file called "COPYING".
#!/bin/sh
##############################
# Global variable definition
##############################
......
#!/bin/sh
#/etc/rc.common
# Copyright (C) 2011 Fundacio Privada per a la Xarxa Oberta, Lliure i Neutral guifi.net
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# The full GNU General Public License is included in this distribution in
# the file called "COPYING".
#
# Contributors:
# Axel Neumann
# Pau Escrich <p4u@dabax.net>
# Simó Albert i Beltran
#
QMP_PATH="/etc/qmp"
SOURCE_SYS=1
......
#!/bin/sh
# Copyright (C) 2011 Fundacio Privada per a la Xarxa Oberta, Lliure i Neutral guifi.net
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# The full GNU General Public License is included in this distribution in
# the file called "COPYING".
QMP_PATH="/etc/qmp"
[ -z "$SOURCE_COMMON" ] && . $QMP_PATH/qmp_common.sh
......
#!/bin/sh
# Copyright (C) 2011 Fundacio Privada per a la Xarxa Oberta, Lliure i Neutral guifi.net
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# The full GNU General Public License is included in this distribution in
# the file called "COPYING".
#
# Contributors:
# Pau Escrich <p4u@dabax.net>
# Simó Albert i Beltran
#
##############################
# Global variables definition
##############################
......
#!/usr/bin/lua
--[[
Copyright (C) 2011 Fundacio Privada per a la Xarxa Oberta, Lliure i Neutral guifi.net
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 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 General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called COPYING.
--]]
local qmpcontrol = require "qmp.control"
function print_help(what)
if what == nil then
print("qmpcontrol <function> [parameters|help]")
print(" Functionality list:")
print(" \t network")
print(" \t wifi")
print(" \t bgp")
print(" \t help")
elseif what == 'network' then
print("qmpcontrol network <configure|apply> [parameters]")
print(" configure parameters:")
print(" \t devices")
end
os.exit(1)
end
function network_control()
if arg[2] == nil then
print_help("network")
elseif arg[2] == "configure" then
network_configure()
end
end
function network_configure()
if arg[3] == nil then
print_help("network")
elseif arg[3] == "devices" then
qmpcontrol.configure_net_devices()
end
end
function bgp_control()
print("BGP stuff")
end
function wifi_control()
print("WIFI stuff")
end
if arg[1] == nil then
print_help()
elseif arg[1]:match("^network") then
network_control()
elseif arg[1]:match("^bgp") then
bgp_control()
elseif arg[1]:match("^wifi") then
wifi_control()
else
print_help()
end
#!/usr/bin/lua
--[[
Copyright (C) 2011 Fundacio Privada per a la Xarxa Oberta, Lliure i Neutral guifi.net
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 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 General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
--]]
package.path = package.path .. ";/etc/qmp/?.lua"
qmpinfo = require "qmpinfo"
......
#!/usr/bin/lua
--[[
Copyright (C) 2011 Fundacio Privada per a la Xarxa Oberta, Lliure i Neutral guifi.net
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 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 General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contributors:
Simó Albert i Beltran
--]]
local iwinfo = require "iwinfo"
local util = require "luci.util"
local sys = require "luci.sys"
......
#!/usr/bin/lua
--[[
Copyright (C) 2011 Fundacio Privada per a la Xarxa Oberta, Lliure i Neutral guifi.net
Authors: Joel Espunya, Pau Escrich <p4u@dabax.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 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 General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
--]]
--! @file
--! @brief functions to configure and fetch information from bgp daemon
model = require "qmp.model"
bgp = {}
--! @brief Get the published networks of the current node
--! @return table
function bgp.get_networks()
return model.get_type('bgp')
end
--! @brief Get the devices working on bpg mode
--! @return UCI value
function bgp.get_devices()
return model.get('interfaces', 'bgp_devices')
end
--! @brief Add a BGP peer
--! @param as AS of the BGP peer
--! @param ip IP of the BGP peer
--! @param netmask Netmask of the BGP peer
--! @return Name of created section
function bgp.add_peer(as, ip, netmask)
return model.add_type('bgp', { as = 'as', ipdest = 'ip', netmask = 'netmask'})
end
--! @brief Set the devices working on BGP mode
--! @param devices Devices working on bgp mode (string)
--! @return Boolean whether operation succeeded
function bgp.set_device(devices)
return model.set('interfaces', 'bgp_devices', devices)
end
--! @brief Add a network to being published by BGP
--! @param network network range to be published
--! @return Boolean whether operation succeeded
function bgp.add_network(network)
return model.set_list('bgp', 'network', network)
end
--! @brief Remove the current BGP configuration
function bgp.clear()
model.delete('bgp')
model.delete_type('bgp')
model.add('qmp', 'bgp')
model.set('interfaces', 'bgp_devices', '')
model.add('qmp', 'bgp')
end
--! @brief Set the AS of the working node
--! @param as AS of the working node
--! @return Boolean whether operation succeeded
function bgp.set_as(as)
return model.set('bgp', 'as', as)
end
--! @brief Get the AS of the working node
--! @return AS of the working node
function bgp.get_as()
return model.get('qmp', 'bgp', 'as')
end
return bgp
#!/usr/bin/lua
--[[
Copyright (C) 2011 Fundacio Privada per a la Xarxa Oberta, Lliure i Neutral guifi.net
Authors: Joel Espunya, Pau Escrich <p4u@dabax.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.