Git Product home page Git Product logo

node-iproute's People

Contributors

damoclark avatar diosney avatar steirico avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

node-iproute's Issues

Fail to parse route when there are nhflags

As we can see in the data bellow, when we have nhflags on route, ip_route.show fail to parse the data.

$ ip route show table main
default via 192.168.0.1 dev eth0 onlink
169.254.0.0/16 dev eth0 scope link metric 1000
192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.110
[ { type: 'default',
    to: 'via',
    '192.168.0.1': 'dev',
    eth0: 'onlink' },
  { type: 'unicast',
    to: '169.254.0.0/16',
    dev: 'eth0',
    scope: 'link',
    metric: '1000' },
  { type: 'unicast',
    to: '192.168.0.0/24',
    dev: 'eth0',
    proto: 'kernel',
    scope: 'link',
    src: '192.168.0.110' } ]

ip route get implemented ?

Hello,

I can't find the equivalent for "ip route get " in your library, is it implemented ? Do you plan to implement it ?

How could I get the equivalent functionality ?

Thanks
Dam

ip_link.show(...) crashes for certain ip link layout

Hi, using iproute 1.0.2 I have the following trouble

Linux ip link layout is

 ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ens5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc aipt2 state UP mode DEFAULT group default qlen 1000
    link/ether 0a:ca:90:10:38:8e brd ff:ff:ff:ff:ff:ff
    altname enp0s5
    ...

i.e. the second link has 3 lines and it causes the following error

TypeError: Cannot read property 'slice' of undefined
at exports.parse_links (/opt/.../node_modules/iproute/lib/link/utils.js:95:35)
at /opt/.../node_modules/iproute/lib/link/show.js:65:21
at ChildProcess.exithandler (child_process.js:299:7)
at ChildProcess.emit (events.js:314:20)
at maybeClose (internal/child_process.js:1022:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)

Would it be possible to adapt code to work correctly also with this ip link layout?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.