History log of /openwrt/package/base-files/files/lib/functions/network.sh
Revision Date Author Comments
# c9ab6f3a 09-Oct-2014 Steven Barth <steven@midlink.org>

base-files: add network_get_ipaddrs_all()

Return all IPv4 and IPv6 addresses.

Signed-off-by: Mathias Kresin <openwrt@kresin.me>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42856 3c298f89-4303-0410-b956-a3cf2f4a3e73


# 38c2d876 14-Sep-2014 Luka Perkov <luka@openwrt.org>

base-files: whitespace fixes

Signed-off-by: Luka Perkov <luka@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42542 3c298f89-4303-0410-b956-a3cf2f4a3e73


# 369b4791 11-Aug-2014 Jo-Philipp Wich <jow@openwrt.org>

base-files: /lib/functions/network.sh: fix network_get_ipaddr6

When looking for the first ipaddr also consider the current prefix just
like network_get_ipaddrs6 does. If ipv6-address was empty the function
did not return the first ipaddr even if the list was non-empty.

fixes commit 83e9122f88a002871d5cdf421cf6aa6052b7e006

Signed-off-by: Henning Schild <henning@hennsch.de>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42139 3c298f89-4303-0410-b956-a3cf2f4a3e73


# 1143dd9e 19-Jun-2014 Jo-Philipp Wich <jow@openwrt.org>

base-files: depend on jsonfilter and rewrite network.sh to use it

Switches /lib/functions/network.sh from jshn based json parsing to
jsonfilter expression while keeping the existing api.

Expensive methods like "network_find_wan" are up to 20x faster now.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41281 3c298f89-4303-0410-b956-a3cf2f4a3e73


# 8dcb4e59 16-Dec-2013 Jo-Philipp Wich <jow@openwrt.org>

base-files: add network_get_protocol() to /lib/functions/network.sh

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39099 3c298f89-4303-0410-b956-a3cf2f4a3e73


# d723a387 09-Dec-2013 Luka Perkov <luka@openwrt.org>

[package] base-files: fix whitespaces

Signed-off-by: Luka Perkov <luka@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39006 3c298f89-4303-0410-b956-a3cf2f4a3e73


# addf81e4 15-Jul-2013 Jo-Philipp Wich <jow@openwrt.org>

base-files: reject invalid uci keys in network_get_device() and related procedures (#13886)

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37345 3c298f89-4303-0410-b956-a3cf2f4a3e73


# 616aae91 17-Jun-2013 Jo-Philipp Wich <jow@openwrt.org>

base-files: network.sh: extend network_get_ipaddr6() / network_get_subnet6() to take ipv6-prefix-assignment into account, add further helper functions to fetch all ips of a given interface

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36942 3c298f89-4303-0410-b956-a3cf2f4a3e73


# 53b612f0 06-May-2013 Jo-Philipp Wich <jow@openwrt.org>

base-files: change network_find_wan() procedure to ignore default gateways in different routing tables

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36553 3c298f89-4303-0410-b956-a3cf2f4a3e73


# 18b07697 22-Jan-2013 Steven Barth <steven@midlink.org>

base-files: fix network_get_prefix6

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35300 3c298f89-4303-0410-b956-a3cf2f4a3e73


# fa2240a9 21-Jan-2013 Jo-Philipp Wich <jow@openwrt.org>

base-files: network.sh: fix typo in previous commit

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35287 3c298f89-4303-0410-b956-a3cf2f4a3e73


# 4f988432 21-Jan-2013 Jo-Philipp Wich <jow@openwrt.org>

base-files: network.sh: simplify network_get_prefix6()

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35286 3c298f89-4303-0410-b956-a3cf2f4a3e73


# b04bf87a 15-Jan-2013 Steven Barth <steven@midlink.org>

base-files: add support for ipv6-prefixes in connection with netifd

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35168 3c298f89-4303-0410-b956-a3cf2f4a3e73


# 2e6a2872 17-Dec-2012 Jo-Philipp Wich <jow@openwrt.org>

base-files: use json_is_a() in network.sh

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34733 3c298f89-4303-0410-b956-a3cf2f4a3e73


# 8b39aa46 16-Dec-2012 Jo-Philipp Wich <jow@openwrt.org>

base-files: rework cache handling in network.sh to keep the entire parsed ifstatus, use jshn namespaces to support using it concurrently with other jshn users

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34725 3c298f89-4303-0410-b956-a3cf2f4a3e73


# b1c39b2c 16-Dec-2012 Jo-Philipp Wich <jow@openwrt.org>

base-files: various enhancements to network.sh

- support reading inactive gateways and DNS information in
network_get_gateway(), network_get_dnsserver() and network_get_dnssearch()
by passing "true" as optional last argument
- internally cache fetched values to speed up subsequent accesses to the same
data, introduce network_flush_cache() to clear them
- add some inline function documentation

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34722 3c298f89-4303-0410-b956-a3cf2f4a3e73


# 6f223b33 13-Sep-2012 Jo-Philipp Wich <jow@openwrt.org>

[package] base-files: remove route enabled check in lib/functions/network.sh after netifd bump

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33391 3c298f89-4303-0410-b956-a3cf2f4a3e73


# 477607f2 29-Jun-2012 Jo-Philipp Wich <jow@openwrt.org>

[package] base-files: implement network_get_dnsserver() and network_get_dnssearch() in /lib/functions/network.sh

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32531 3c298f89-4303-0410-b956-a3cf2f4a3e73


# 1d62b579 29-Jun-2012 Jo-Philipp Wich <jow@openwrt.org>

[package] base-files: only consider enabled default routes when finding the wan iface (#11774)

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32525 3c298f89-4303-0410-b956-a3cf2f4a3e73


# 5ee560d5 17-Jun-2012 Jo-Philipp Wich <jow@openwrt.org>

[package] base-files: implement network_get_gateway(), network_get_gateway6(), network_find_wan() and network_find_wan6() in /lib/functions/network.sh

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32397 3c298f89-4303-0410-b956-a3cf2f4a3e73


# ec1352fc 07-Jun-2012 Jo-Philipp Wich <jow@openwrt.org>

[package] base-files: implement network_defer_device() and network_ready_device() wrappers for upcoming netifd iface deferring support

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32106 3c298f89-4303-0410-b956-a3cf2f4a3e73


# bff890af 28-May-2012 Jo-Philipp Wich <jow@openwrt.org>

[package] base-files: add network_is_up()

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31978 3c298f89-4303-0410-b956-a3cf2f4a3e73


# 55770be6 28-May-2012 Jo-Philipp Wich <jow@openwrt.org>

[package] base-files: let network_get_device() return the l3 interface, introduce network_get_physdev() to obtain the underlying iface (if applicable)

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31960 3c298f89-4303-0410-b956-a3cf2f4a3e73


# c092e233 27-May-2012 Jo-Philipp Wich <jow@openwrt.org>

[package] base-files: add network_get_device() to network.sh

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31937 3c298f89-4303-0410-b956-a3cf2f4a3e73


# 1ee066a4 27-May-2012 Jo-Philipp Wich <jow@openwrt.org>

[package] base-files: introduce /lib/functions/network.sh
This file will contain common procedures to deal with network interfaces.
Initially provides network_get_ipaddr(), network_get_ipaddr6(),
network_get_subnet() and network_get_subnet6() to determine the
primary IP addresses or subnets of a given logical interface.

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31935 3c298f89-4303-0410-b956-a3cf2f4a3e73