Device-Network-ConfigParser

 view release on metacpan or  search on metacpan

lib/Device/Network/ConfigParser/Linux/NetUtils.pm  view on Meta::CPAN


sub get_parser {
    return new Parse::RecDescent(q{
        <autoaction: { [@item] }>
        startrule: config_line(s) { $item[1] }
        config_line:
            ifconfig(s) { { ifconfig => $item{'ifconfig(s)'} } } |
            not_parsed { $item[1] }

            ifconfig: 
                interface encap hw_addr(?) inet(?) inet6(s?) flag(s) mtu if_metric rx_stats tx_stats rx_bytes tx_bytes {
                    {
                        interface => $item{interface},
                        encapsulation => $item{encap},
                        hw_addr => $item{'hw_addr(?)'},
                        inet => $item{'inet(?)'},
                        inet6 => $item{'inet6(s?)'},
                        flags => $item{'flag(s)'},
                        mtu => $item{mtu},
                        metric => $item{if_metric},
                        rx_stats => $item{rx_stats},
                        tx_stats => $item{tx_stats},
                        rx_bytes => $item{rx_bytes},
                        tx_bytes => $item{tx_bytes},
                    }
                }

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.866 second using v1.00-cache-2.02-grep-82fe00e-cpan-b63e86051f13 )