Mikhail Efremov
b813aeeaff
Suppress 'broken pipe' error message
2016-03-21 20:41:22 +03:00
Mikhail Efremov
f5fc2a74bf
Add list_bridge() and list_bridge_with_cache()
2016-03-21 19:51:59 +03:00
Mikhail Efremov
aafe8a4b11
Add function for host interfaces
...
Moved from alterator-net-bond.
2016-03-21 19:11:21 +03:00
Mikhail Efremov
2ccff10451
list_iface(): Skip ifaces in a bonding
...
BTW, I doubt that this function is in use really.
Should be considered to drop it later.
2016-03-21 18:37:48 +03:00
Mikhail Efremov
f636557c22
list_eth(): Don't replace interface with bridge
...
That was needed for old "bridge-with-single-interface" approach
for virtual machines support.
2016-03-21 18:08:17 +03:00
Mikhail Efremov
3901468091
Add init_slave_eth_iface_cache()
2016-03-21 17:22:39 +03:00
Mikhail Efremov
0a1b5acf6a
tests: Add more ipv*addr tests
2016-03-21 16:42:43 +03:00
Mikhail Efremov
63772a6ecd
Add warning for deprecated functions
2016-03-18 20:44:36 +03:00
Mikhail Efremov
37ed1ab73a
Remove read_iface_slaves()
...
Just drop it and use read_iface_host_var() instead.
2016-03-18 19:44:59 +03:00
Mikhail Efremov
28a12b321d
Add remove_iface_with_cache()
2016-03-18 19:44:59 +03:00
Mikhail Efremov
0f1d58d688
Add list_vlans_for_iface() and list_vlans_for_iface_with_cache()
2016-03-18 19:44:59 +03:00
Mikhail Efremov
b2a943819d
iface_has_host(): Suppress find's error messages
2016-03-18 19:44:59 +03:00
Mikhail Efremov
33a627dff7
Add list_vlan() and list_vlan_with_cache()
2016-03-18 19:44:59 +03:00
Mikhail Efremov
17a65794b0
Introduce function for work with cached data
...
A cache for changes used in the alterator-net-* modules often enough,
so add some common function to alterator-net-functions.
2016-03-18 19:44:58 +03:00
Mikhail Efremov
848537975d
next_iface(): Pass ifaces directory as argument
2016-03-17 18:51:42 +03:00
Mikhail Efremov
98e765e2c8
list_network(): Pass ifaces directory as second argument
...
And use list_etcnet_iface_filtered().
2016-03-17 18:51:42 +03:00
Mikhail Efremov
28f27e4a55
Use list_etcnet_iface_filtered() to list interfaces
2016-03-17 18:51:42 +03:00
Mikhail Efremov
12565b2122
Use list_etcnet_iface_filtered for list_ppp()
...
And add ifaces directory as second argument to list_ppp().
2016-03-17 18:51:41 +03:00
Mikhail Efremov
88cdd0c475
Add functions for filtered interfaces list
...
Add list_etcnet_iface_filtered() function.
This function prints iface name if filter_func returns
TRUE. Filter function will be called with an interface directory as first
parameter and all additional parameters with which list_etcnet_iface_filtered()
was called.
2016-03-17 18:51:41 +03:00
Mikhail Efremov
b8192ace2d
iface_has_host: Handle VLAN interfaces too
...
VLAN interface always has host. And skip HOST variable
in VLAN's configs.
2016-03-09 20:05:32 +03:00
Mikhail Efremov
75a465583f
Rename read_iface_slaves -> read_iface_host_var
...
For bond/bridge interfaces HOST variable means "_This_ interface is
a host for interfaces in the list".
But for VLAN interfaces HOST variable has opposite meaning:
"It is a host for this interfaces".
So for VLAN interface read_iface_slaves() function will return
a _host_ interface and this behavior can be a bit confusing.
Keep read_iface_slaves() for backward compatibility.
Besides, for bond/bridge it is quite suited.
2016-03-09 19:30:44 +03:00
Mikhail Efremov
5bdb5a6dcc
1.3.4-alt1
...
- Fix valid_ipv4addr().
2015-01-20 21:57:47 +03:00
Mikhail Efremov
dd587ca6c3
Fix valid_ipv4addr().
...
Fix first byte check.
2015-01-20 21:54:59 +03:00
Mikhail Efremov
24d6e13f02
1.3.3-alt1
...
- Add read_iface_slaves() and iface_has_host() functions.
- Add list_bond() function.
2014-12-26 18:07:41 +03:00
Mikhail Efremov
359315fd3c
Add read_iface_slaves() and iface_has_host() functions.
...
Moved from alterator-net-bond.
2014-12-23 21:03:28 +03:00
Mikhail Efremov
45bc5a923d
Add list_bond() function.
2014-12-23 20:38:44 +03:00
Mikhail Efremov
31e0778e0a
1.3.2-alt1
...
- Improve is_ipv6_enabled() (thx stanv@).
2014-10-07 21:37:41 +04:00
Mikhail Efremov
535e489ef1
Improve is_ipv6_enabled() (thx stanv@).
...
Check if module ipv6 is loaded, but disabled by sysctl
configuration.
Also add optional argument to check ipv6 per interface.
2014-10-07 20:41:03 +04:00
Mikhail Efremov
39af5f3d6e
1.3.1-alt1
...
- Added is_ipv6_enabled() function.
2014-08-12 21:35:51 +04:00
Mikhail Efremov
e8adb8d564
Added is_ipv6_enabled() function.
...
Returns true if IPv6 is enabled.
2014-08-08 20:45:20 +04:00
Mikhail Efremov
5299864a6c
1.3.0-alt1
...
- refdns: Replace valid_ipv4() with valid_ipv4addr().
- Added valid_ipv4addr() function.
- Added tests for ipv6addr_is_in_subnet() function.
- Added get_ip_version() function.
- revdns: Added IPv6 support.
- Added ipv6addr_is_in_subnet() function.
- ipv6_network(): Use valid_ipv6prefix().
- Added valid_ipv6prefix() and valid_ipv4prefix() functions.
2012-12-14 17:18:08 +04:00
Mikhail Efremov
1ca2d684da
refdns: Replace valid_ipv4() with valid_ipv4addr().
2012-12-14 15:42:37 +04:00
Mikhail Efremov
f047ca55ad
Added valid_ipv4addr() function.
...
Heavy based on valid_ipv4() from libshell.
We can't use valid_ipv4() because it
don't treat 127.* and 224.* addresses as valid addresses.
2012-12-14 15:42:32 +04:00
Mikhail Efremov
b80777918d
Added tests for ipv6addr_is_in_subnet() function.
2012-12-14 15:11:05 +04:00
Mikhail Efremov
e1383945b3
Added get_ip_version() function.
2012-12-13 21:42:00 +04:00
Mikhail Efremov
4ea61002cc
revdns: Added IPv6 support.
2012-12-13 19:20:14 +04:00
Mikhail Efremov
7ecdc4ced0
Added ipv6addr_is_in_subnet() function.
2012-12-13 18:17:36 +04:00
Mikhail Efremov
12a20dd894
ipv6_network(): Use valid_ipv6prefix().
2012-12-07 17:41:57 +04:00
Mikhail Efremov
3cb17360d3
Added valid_ipv6prefix() and valid_ipv4prefix() functions.
2012-12-07 16:51:07 +04:00
Mikhail Efremov
8056ad17ad
1.2.1-alt1
...
- Update tests for IPv6 functions.
- ipv6addr_expand(): Expand each segment of IPv4 address.
- Improve ipv6addr_terse().
- Rename ipv6add_terse -> ipv6addr_terse.
2012-12-06 20:17:08 +04:00
Mikhail Efremov
c694ec130f
Update tests for IPv6 functions.
2012-12-06 20:04:12 +04:00
Mikhail Efremov
025970d034
ipv6addr_expand(): Expand each segment of IPv4 address.
...
Expand each segment to four hex digits,
e.g. *:1:db8:0:* -> *:0001:0db8:0000:*.
2012-12-06 18:47:06 +04:00
Mikhail Efremov
393cdf120f
Improve ipv6addr_terse().
...
Drop leading zeros in IPv6 address segment.
2012-12-06 18:19:22 +04:00
Mikhail Efremov
831552abc6
Rename ipv6add_terse -> ipv6addr_terse.
...
That was just a typo and copy&paste :(.
2012-12-06 17:54:57 +04:00
Anton V. Boyarshinov
622a9af46d
1.2-alt1
...
- added initial IPv6 support (sem@)
- added read_iface_current_addr* functions
2012-10-24 11:26:33 +04:00
Anton V. Boyarshinov
0209f76e71
read_iface_current_addr* added
2012-10-24 11:26:20 +04:00
Mikhail Efremov
dcc4e3b732
Added tests for IPv6 functions.
2012-09-28 16:37:45 +04:00
Mikhail Efremov
fb17bdaf5e
Added initial IPv6 support.
2012-09-28 16:37:43 +04:00
Mikhail Efremov
5dc5ea78ca
Update requires for libshell
2010-12-08 17:57:43 +03:00
Mikhail Efremov
e3c1576f92
Use libshell for ipv4 addresses calculations.
...
These functions in libshell now, so drop old local implementation.
2010-12-02 21:30:19 +03:00