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
20ca9414dc
- add multiple interface addresses support
2010-09-09 14:42:31 +04:00
Stanislav Ievlev
796c8ac116
1.0-alt3
...
- add ipv4addr_prefix_to_mask() (maskname replacement)
- remove obsolete functions:
* faceinfo
* ifcheckdhcp
* ifcheckplug
* ifcheckup
* ifcheckwireless
* ifdriver
* iflist
* ifread
* iftabupdate
2009-09-03 12:38:52 +04:00
Stanislav Ievlev
394635b66b
- add ipv4addr_prefix_to_mask() (maskname replacement)
2009-09-03 12:37:36 +04:00
Stanislav Ievlev
ee90f54759
- remove obsolete functions:
...
* faceinfo
* ifcheckdhcp
* ifcheckplug
* ifcheckup
* ifcheckwireless
* ifdriver
* iflist
* ifread
* iftabupdate
2009-09-03 12:33:24 +04:00
Mikhail Efremov
da42c5f6bf
1.0-alt2
...
- fix ipv4addr_is_in_subnet().
2009-09-02 17:29:12 +04:00
Mikhail Efremov
06abd28b4b
fix ipv4addr_is_in_subnet()
2009-09-02 17:26:06 +04:00
Stanislav Ievlev
71c4c45b93
1.0-alt1
...
- add a new set of excellent functions for various ipv4address calculations (sem@)
2009-09-02 16:57:28 +04:00
Vladislav Zavjalov
80fbe7719a
0.9-alt4
2009-04-30 15:53:03 +04:00
Vladislav Zavjalov
31218844c0
list_iface: skip ifaces with type=801 (wmaster0)
2009-04-30 15:50:46 +04:00
Stanislav Ievlev
28ebad11f0
0.9-alt3
...
- replace function chomp with shell_var_trim from modern libshell
- add read_iface_default_gw/write_iface_default_gw
2009-04-30 13:43:30 +04:00
Stanislav Ievlev
1ef3f44d45
- add read_iface_default_gw/write_iface_default_gw
2009-04-28 14:24:04 +04:00
Stanislav Ievlev
22d6dc3ced
- replace function chomp with shell_var_trim from modern libshell
2009-04-27 18:17:24 +04:00
Vladislav Zavjalov
acc2099553
0.9-alt2
...
- add comments in obsolete scripts
2009-04-17 15:41:33 +04:00
Vladislav Zavjalov
1a5c4ce0b6
0.9-alt1
2009-04-16 14:40:41 +04:00
Vladislav Zavjalov
6ffe5bfbcb
list_iface: skip ifaces connected to a bridges
2009-04-16 14:38:35 +04:00
Stanislav Ievlev
741d4cbed4
0.8-alt3
...
- improve iface_up and iface_down functions
2009-04-13 16:31:38 +04:00