aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/lib/functions/network.sh
Commit message (Collapse)AuthorAgeFilesLines
* base-files: add network_get_ipaddrs_all()Steven Barth2014-10-091-0/+23
| | | | | | | | 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
* base-files: whitespace fixesLuka Perkov2014-09-141-1/+1
| | | | | | Signed-off-by: Luka Perkov <luka@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42542 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: /lib/functions/network.sh: fix network_get_ipaddr6Jo-Philipp Wich2014-08-111-1/+12
| | | | | | | | | | | | 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
* base-files: depend on jsonfilter and rewrite network.sh to use itJo-Philipp Wich2014-06-191-318/+125
| | | | | | | | | | | 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
* base-files: add network_get_protocol() to /lib/functions/network.shJo-Philipp Wich2013-12-161-2/+7
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39099 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: fix whitespacesLuka Perkov2013-12-091-9/+9
| | | | | | Signed-off-by: Luka Perkov <luka@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39006 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: reject invalid uci keys in network_get_device() and related ↵Jo-Philipp Wich2013-07-151-0/+4
| | | | | | procedures (#13886) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37345 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: network.sh: extend network_get_ipaddr6() / network_get_subnet6() ↵Jo-Philipp Wich2013-06-171-43/+107
| | | | | | 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
* base-files: change network_find_wan() procedure to ignore default gateways ↵Jo-Philipp Wich2013-05-061-10/+14
| | | | | | in different routing tables git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36553 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: fix network_get_prefix6Steven Barth2013-01-221-1/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35300 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: network.sh: fix typo in previous commitJo-Philipp Wich2013-01-211-1/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35287 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: network.sh: simplify network_get_prefix6()Jo-Philipp Wich2013-01-211-7/+4
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35286 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: add support for ipv6-prefixes in connection with netifdSteven Barth2013-01-151-0/+30
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35168 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: use json_is_a() in network.shJo-Philipp Wich2012-12-171-7/+7
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34733 3c298f89-4303-0410-b956-a3cf2f4a3e73
* base-files: rework cache handling in network.sh to keep the entire parsed ↵Jo-Philipp Wich2012-12-161-129/+159
| | | | | | 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
* base-files: various enhancements to network.shJo-Philipp Wich2012-12-161-30/+153
| | | | | | | | | | | - 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
* [package] base-files: remove route enabled check in lib/functions/network.sh ↵Jo-Philipp Wich2012-09-131-4/+2
| | | | | | after netifd bump git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33391 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: implement network_get_dnsserver() and ↵Jo-Philipp Wich2012-06-291-0/+31
| | | | | | network_get_dnssearch() in /lib/functions/network.sh git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32531 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: only consider enabled default routes when finding the ↵Jo-Philipp Wich2012-06-291-2/+4
| | | | | | wan iface (#11774) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32525 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: implement network_get_gateway(), ↵Jo-Philipp Wich2012-06-171-0/+59
| | | | | | 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
* [package] base-files: implement network_defer_device() and ↵Jo-Philipp Wich2012-06-071-0/+16
| | | | | | 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
* [package] base-files: add network_is_up()Jo-Philipp Wich2012-05-291-0/+6
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31978 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: let network_get_device() return the l3 interface, ↵Jo-Philipp Wich2012-05-291-4/+6
| | | | | | 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
* [package] base-files: add network_get_device() to network.shJo-Philipp Wich2012-05-281-0/+15
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31937 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] base-files: introduce /lib/functions/network.shJo-Philipp Wich2012-05-281-0/+41
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