iproutejs 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -0
- package/README.md +245 -0
- package/lib/commands/address/add.interfaces.d.ts +94 -0
- package/lib/commands/address/add.interfaces.js +3 -0
- package/lib/commands/address/add.interfaces.js.map +1 -0
- package/lib/commands/address/add.schema.d.ts +3 -0
- package/lib/commands/address/add.schema.js +121 -0
- package/lib/commands/address/add.schema.js.map +1 -0
- package/lib/commands/address/delete.interfaces.d.ts +56 -0
- package/lib/commands/address/delete.interfaces.js +3 -0
- package/lib/commands/address/delete.interfaces.js.map +1 -0
- package/lib/commands/address/delete.schema.d.ts +3 -0
- package/lib/commands/address/delete.schema.js +64 -0
- package/lib/commands/address/delete.schema.js.map +1 -0
- package/lib/commands/address/flush.interfaces.d.ts +89 -0
- package/lib/commands/address/flush.interfaces.js +3 -0
- package/lib/commands/address/flush.interfaces.js.map +1 -0
- package/lib/commands/address/flush.schema.d.ts +3 -0
- package/lib/commands/address/flush.schema.js +165 -0
- package/lib/commands/address/flush.schema.js.map +1 -0
- package/lib/commands/address/show.interfaces.d.ts +166 -0
- package/lib/commands/address/show.interfaces.js +3 -0
- package/lib/commands/address/show.interfaces.js.map +1 -0
- package/lib/commands/address/show.schema.d.ts +3 -0
- package/lib/commands/address/show.schema.js +176 -0
- package/lib/commands/address/show.schema.js.map +1 -0
- package/lib/commands/address.constants.d.ts +33 -0
- package/lib/commands/address.constants.js +39 -0
- package/lib/commands/address.constants.js.map +1 -0
- package/lib/commands/address.d.ts +179 -0
- package/lib/commands/address.js +265 -0
- package/lib/commands/address.js.map +1 -0
- package/lib/commands/addrlabel/add.interfaces.d.ts +12 -0
- package/lib/commands/addrlabel/add.interfaces.js +3 -0
- package/lib/commands/addrlabel/add.interfaces.js.map +1 -0
- package/lib/commands/addrlabel/add.schema.d.ts +3 -0
- package/lib/commands/addrlabel/add.schema.js +26 -0
- package/lib/commands/addrlabel/add.schema.js.map +1 -0
- package/lib/commands/addrlabel/del.interfaces.d.ts +6 -0
- package/lib/commands/addrlabel/del.interfaces.js +3 -0
- package/lib/commands/addrlabel/del.interfaces.js.map +1 -0
- package/lib/commands/addrlabel/del.schema.d.ts +3 -0
- package/lib/commands/addrlabel/del.schema.js +27 -0
- package/lib/commands/addrlabel/del.schema.js.map +1 -0
- package/lib/commands/addrlabel/list.interfaces.d.ts +9 -0
- package/lib/commands/addrlabel/list.interfaces.js +3 -0
- package/lib/commands/addrlabel/list.interfaces.js.map +1 -0
- package/lib/commands/addrlabel.d.ts +104 -0
- package/lib/commands/addrlabel.js +149 -0
- package/lib/commands/addrlabel.js.map +1 -0
- package/lib/commands/batch.d.ts +60 -0
- package/lib/commands/batch.js +90 -0
- package/lib/commands/batch.js.map +1 -0
- package/lib/commands/link/add.interfaces.d.ts +122 -0
- package/lib/commands/link/add.interfaces.js +4 -0
- package/lib/commands/link/add.interfaces.js.map +1 -0
- package/lib/commands/link/add.schema.d.ts +4 -0
- package/lib/commands/link/add.schema.js +172 -0
- package/lib/commands/link/add.schema.js.map +1 -0
- package/lib/commands/link/delete.interfaces.d.ts +22 -0
- package/lib/commands/link/delete.interfaces.js +3 -0
- package/lib/commands/link/delete.interfaces.js.map +1 -0
- package/lib/commands/link/delete.schema.d.ts +3 -0
- package/lib/commands/link/delete.schema.js +29 -0
- package/lib/commands/link/delete.schema.js.map +1 -0
- package/lib/commands/link/extended-virtual-link-types/bond-slave.interfaces.d.ts +8 -0
- package/lib/commands/link/extended-virtual-link-types/bond-slave.interfaces.js +3 -0
- package/lib/commands/link/extended-virtual-link-types/bond-slave.interfaces.js.map +1 -0
- package/lib/commands/link/extended-virtual-link-types/bond-slave.schema.d.ts +3 -0
- package/lib/commands/link/extended-virtual-link-types/bond-slave.schema.js +16 -0
- package/lib/commands/link/extended-virtual-link-types/bond-slave.schema.js.map +1 -0
- package/lib/commands/link/extended-virtual-link-types/bridge-slave.interfaces.d.ts +77 -0
- package/lib/commands/link/extended-virtual-link-types/bridge-slave.interfaces.js +3 -0
- package/lib/commands/link/extended-virtual-link-types/bridge-slave.interfaces.js.map +1 -0
- package/lib/commands/link/extended-virtual-link-types/bridge-slave.schema.d.ts +3 -0
- package/lib/commands/link/extended-virtual-link-types/bridge-slave.schema.js +126 -0
- package/lib/commands/link/extended-virtual-link-types/bridge-slave.schema.js.map +1 -0
- package/lib/commands/link/set.interfaces.d.ts +271 -0
- package/lib/commands/link/set.interfaces.js +4 -0
- package/lib/commands/link/set.interfaces.js.map +1 -0
- package/lib/commands/link/set.schema.d.ts +5 -0
- package/lib/commands/link/set.schema.js +284 -0
- package/lib/commands/link/set.schema.js.map +1 -0
- package/lib/commands/link/show.interfaces.d.ts +116 -0
- package/lib/commands/link/show.interfaces.js +3 -0
- package/lib/commands/link/show.interfaces.js.map +1 -0
- package/lib/commands/link/show.schema.d.ts +3 -0
- package/lib/commands/link/show.schema.js +43 -0
- package/lib/commands/link/show.schema.js.map +1 -0
- package/lib/commands/link/virtual-link-types/bareup.interfaces.d.ts +30 -0
- package/lib/commands/link/virtual-link-types/bareup.interfaces.js +3 -0
- package/lib/commands/link/virtual-link-types/bareup.interfaces.js.map +1 -0
- package/lib/commands/link/virtual-link-types/bareup.schema.d.ts +3 -0
- package/lib/commands/link/virtual-link-types/bareup.schema.js +43 -0
- package/lib/commands/link/virtual-link-types/bareup.schema.js.map +1 -0
- package/lib/commands/link/virtual-link-types/bridge.interfaces.d.ts +140 -0
- package/lib/commands/link/virtual-link-types/bridge.interfaces.js +3 -0
- package/lib/commands/link/virtual-link-types/bridge.interfaces.js.map +1 -0
- package/lib/commands/link/virtual-link-types/bridge.schema.d.ts +3 -0
- package/lib/commands/link/virtual-link-types/bridge.schema.js +186 -0
- package/lib/commands/link/virtual-link-types/bridge.schema.js.map +1 -0
- package/lib/commands/link/virtual-link-types/can.interfaces.d.ts +71 -0
- package/lib/commands/link/virtual-link-types/can.interfaces.js +3 -0
- package/lib/commands/link/virtual-link-types/can.interfaces.js.map +1 -0
- package/lib/commands/link/virtual-link-types/can.schema.d.ts +3 -0
- package/lib/commands/link/virtual-link-types/can.schema.js +141 -0
- package/lib/commands/link/virtual-link-types/can.schema.js.map +1 -0
- package/lib/commands/link/virtual-link-types/erspan-ip6erspan.interfaces.d.ts +58 -0
- package/lib/commands/link/virtual-link-types/erspan-ip6erspan.interfaces.js +3 -0
- package/lib/commands/link/virtual-link-types/erspan-ip6erspan.interfaces.js.map +1 -0
- package/lib/commands/link/virtual-link-types/erspan-ip6erspan.schema.d.ts +3 -0
- package/lib/commands/link/virtual-link-types/erspan-ip6erspan.schema.js +64 -0
- package/lib/commands/link/virtual-link-types/erspan-ip6erspan.schema.js.map +1 -0
- package/lib/commands/link/virtual-link-types/geneve.interfaces.d.ts +54 -0
- package/lib/commands/link/virtual-link-types/geneve.interfaces.js +3 -0
- package/lib/commands/link/virtual-link-types/geneve.interfaces.js.map +1 -0
- package/lib/commands/link/virtual-link-types/geneve.schema.d.ts +3 -0
- package/lib/commands/link/virtual-link-types/geneve.schema.js +93 -0
- package/lib/commands/link/virtual-link-types/geneve.schema.js.map +1 -0
- package/lib/commands/link/virtual-link-types/gre-gretap.interfaces.d.ts +106 -0
- package/lib/commands/link/virtual-link-types/gre-gretap.interfaces.js +3 -0
- package/lib/commands/link/virtual-link-types/gre-gretap.interfaces.js.map +1 -0
- package/lib/commands/link/virtual-link-types/gre-gretap.schema.d.ts +3 -0
- package/lib/commands/link/virtual-link-types/gre-gretap.schema.js +208 -0
- package/lib/commands/link/virtual-link-types/gre-gretap.schema.js.map +1 -0
- package/lib/commands/link/virtual-link-types/hsr.interfaces.d.ts +20 -0
- package/lib/commands/link/virtual-link-types/hsr.interfaces.js +3 -0
- package/lib/commands/link/virtual-link-types/hsr.interfaces.js.map +1 -0
- package/lib/commands/link/virtual-link-types/hsr.schema.d.ts +3 -0
- package/lib/commands/link/virtual-link-types/hsr.schema.js +36 -0
- package/lib/commands/link/virtual-link-types/hsr.schema.js.map +1 -0
- package/lib/commands/link/virtual-link-types/ip6gre-ip6gretap.interfaces.d.ts +80 -0
- package/lib/commands/link/virtual-link-types/ip6gre-ip6gretap.interfaces.js +3 -0
- package/lib/commands/link/virtual-link-types/ip6gre-ip6gretap.interfaces.js.map +1 -0
- package/lib/commands/link/virtual-link-types/ip6gre-ip6gretap.schema.d.ts +3 -0
- package/lib/commands/link/virtual-link-types/ip6gre-ip6gretap.schema.js +170 -0
- package/lib/commands/link/virtual-link-types/ip6gre-ip6gretap.schema.js.map +1 -0
- package/lib/commands/link/virtual-link-types/ipip-sit.interfaces.d.ts +51 -0
- package/lib/commands/link/virtual-link-types/ipip-sit.interfaces.js +3 -0
- package/lib/commands/link/virtual-link-types/ipip-sit.interfaces.js.map +1 -0
- package/lib/commands/link/virtual-link-types/ipip-sit.schema.d.ts +3 -0
- package/lib/commands/link/virtual-link-types/ipip-sit.schema.js +74 -0
- package/lib/commands/link/virtual-link-types/ipip-sit.schema.js.map +1 -0
- package/lib/commands/link/virtual-link-types/ipoib.interfaces.d.ts +11 -0
- package/lib/commands/link/virtual-link-types/ipoib.interfaces.js +3 -0
- package/lib/commands/link/virtual-link-types/ipoib.interfaces.js.map +1 -0
- package/lib/commands/link/virtual-link-types/ipoib.schema.d.ts +3 -0
- package/lib/commands/link/virtual-link-types/ipoib.schema.js +22 -0
- package/lib/commands/link/virtual-link-types/ipoib.schema.js.map +1 -0
- package/lib/commands/link/virtual-link-types/macsec.interfaces.d.ts +44 -0
- package/lib/commands/link/virtual-link-types/macsec.interfaces.js +3 -0
- package/lib/commands/link/virtual-link-types/macsec.interfaces.js.map +1 -0
- package/lib/commands/link/virtual-link-types/macsec.schema.d.ts +3 -0
- package/lib/commands/link/virtual-link-types/macsec.schema.js +87 -0
- package/lib/commands/link/virtual-link-types/macsec.schema.js.map +1 -0
- package/lib/commands/link/virtual-link-types/macvlan-macvtap.interfaces.d.ts +59 -0
- package/lib/commands/link/virtual-link-types/macvlan-macvtap.interfaces.js +3 -0
- package/lib/commands/link/virtual-link-types/macvlan-macvtap.interfaces.js.map +1 -0
- package/lib/commands/link/virtual-link-types/macvlan-macvtap.schema.d.ts +4 -0
- package/lib/commands/link/virtual-link-types/macvlan-macvtap.schema.js +60 -0
- package/lib/commands/link/virtual-link-types/macvlan-macvtap.schema.js.map +1 -0
- package/lib/commands/link/virtual-link-types/rmnet.interfaces.d.ts +8 -0
- package/lib/commands/link/virtual-link-types/rmnet.interfaces.js +3 -0
- package/lib/commands/link/virtual-link-types/rmnet.interfaces.js.map +1 -0
- package/lib/commands/link/virtual-link-types/rmnet.schema.d.ts +3 -0
- package/lib/commands/link/virtual-link-types/rmnet.schema.js +16 -0
- package/lib/commands/link/virtual-link-types/rmnet.schema.js.map +1 -0
- package/lib/commands/link/virtual-link-types/veth-vxcan.interfaces.d.ts +8 -0
- package/lib/commands/link/virtual-link-types/veth-vxcan.interfaces.js +3 -0
- package/lib/commands/link/virtual-link-types/veth-vxcan.interfaces.js.map +1 -0
- package/lib/commands/link/virtual-link-types/veth-vxcan.schema.d.ts +3 -0
- package/lib/commands/link/virtual-link-types/veth-vxcan.schema.js +16 -0
- package/lib/commands/link/virtual-link-types/veth-vxcan.schema.js.map +1 -0
- package/lib/commands/link/virtual-link-types/vlan.interfaces.d.ts +36 -0
- package/lib/commands/link/virtual-link-types/vlan.interfaces.js +3 -0
- package/lib/commands/link/virtual-link-types/vlan.interfaces.js.map +1 -0
- package/lib/commands/link/virtual-link-types/vlan.schema.d.ts +3 -0
- package/lib/commands/link/virtual-link-types/vlan.schema.js +65 -0
- package/lib/commands/link/virtual-link-types/vlan.schema.js.map +1 -0
- package/lib/commands/link/virtual-link-types/vrf.interfaces.d.ts +8 -0
- package/lib/commands/link/virtual-link-types/vrf.interfaces.js +3 -0
- package/lib/commands/link/virtual-link-types/vrf.interfaces.js.map +1 -0
- package/lib/commands/link/virtual-link-types/vrf.schema.d.ts +3 -0
- package/lib/commands/link/virtual-link-types/vrf.schema.js +16 -0
- package/lib/commands/link/virtual-link-types/vrf.schema.js.map +1 -0
- package/lib/commands/link/virtual-link-types/vxlan.interfaces.d.ts +127 -0
- package/lib/commands/link/virtual-link-types/vxlan.interfaces.js +3 -0
- package/lib/commands/link/virtual-link-types/vxlan.interfaces.js.map +1 -0
- package/lib/commands/link/virtual-link-types/vxlan.schema.d.ts +3 -0
- package/lib/commands/link/virtual-link-types/vxlan.schema.js +176 -0
- package/lib/commands/link/virtual-link-types/vxlan.schema.js.map +1 -0
- package/lib/commands/link/virtual-link-types/xfrm.interfaces.d.ts +16 -0
- package/lib/commands/link/virtual-link-types/xfrm.interfaces.js +3 -0
- package/lib/commands/link/virtual-link-types/xfrm.interfaces.js.map +1 -0
- package/lib/commands/link/virtual-link-types/xfrm.schema.d.ts +3 -0
- package/lib/commands/link/virtual-link-types/xfrm.schema.js +21 -0
- package/lib/commands/link/virtual-link-types/xfrm.schema.js.map +1 -0
- package/lib/commands/link/xdp-options/object.interfaces.d.ts +36 -0
- package/lib/commands/link/xdp-options/object.interfaces.js +3 -0
- package/lib/commands/link/xdp-options/object.interfaces.js.map +1 -0
- package/lib/commands/link/xdp-options/object.schema.d.ts +3 -0
- package/lib/commands/link/xdp-options/object.schema.js +25 -0
- package/lib/commands/link/xdp-options/object.schema.js.map +1 -0
- package/lib/commands/link/xdp-options/off.interfaces.d.ts +8 -0
- package/lib/commands/link/xdp-options/off.interfaces.js +3 -0
- package/lib/commands/link/xdp-options/off.interfaces.js.map +1 -0
- package/lib/commands/link/xdp-options/off.schema.d.ts +3 -0
- package/lib/commands/link/xdp-options/off.schema.js +15 -0
- package/lib/commands/link/xdp-options/off.schema.js.map +1 -0
- package/lib/commands/link/xdp-options/pinned.interfaces.d.ts +13 -0
- package/lib/commands/link/xdp-options/pinned.interfaces.js +3 -0
- package/lib/commands/link/xdp-options/pinned.interfaces.js.map +1 -0
- package/lib/commands/link/xdp-options/pinned.schema.d.ts +3 -0
- package/lib/commands/link/xdp-options/pinned.schema.js +15 -0
- package/lib/commands/link/xdp-options/pinned.schema.js.map +1 -0
- package/lib/commands/link.constants.d.ts +425 -0
- package/lib/commands/link.constants.js +366 -0
- package/lib/commands/link.constants.js.map +1 -0
- package/lib/commands/link.d.ts +113 -0
- package/lib/commands/link.js +159 -0
- package/lib/commands/link.js.map +1 -0
- package/lib/commands/maddress/add.interfaces.d.ts +10 -0
- package/lib/commands/maddress/add.interfaces.js +3 -0
- package/lib/commands/maddress/add.interfaces.js.map +1 -0
- package/lib/commands/maddress/add.schema.d.ts +3 -0
- package/lib/commands/maddress/add.schema.js +22 -0
- package/lib/commands/maddress/add.schema.js.map +1 -0
- package/lib/commands/maddress/show.interfaces.d.ts +25 -0
- package/lib/commands/maddress/show.interfaces.js +3 -0
- package/lib/commands/maddress/show.interfaces.js.map +1 -0
- package/lib/commands/maddress/show.schema.d.ts +3 -0
- package/lib/commands/maddress/show.schema.js +17 -0
- package/lib/commands/maddress/show.schema.js.map +1 -0
- package/lib/commands/maddress.d.ts +82 -0
- package/lib/commands/maddress.js +121 -0
- package/lib/commands/maddress.js.map +1 -0
- package/lib/commands/monitor/monitor.interfaces.d.ts +24 -0
- package/lib/commands/monitor/monitor.interfaces.js +3 -0
- package/lib/commands/monitor/monitor.interfaces.js.map +1 -0
- package/lib/commands/monitor/monitor.schema.d.ts +3 -0
- package/lib/commands/monitor/monitor.schema.js +33 -0
- package/lib/commands/monitor/monitor.schema.js.map +1 -0
- package/lib/commands/monitor.constants.d.ts +17 -0
- package/lib/commands/monitor.constants.js +22 -0
- package/lib/commands/monitor.constants.js.map +1 -0
- package/lib/commands/monitor.d.ts +52 -0
- package/lib/commands/monitor.js +75 -0
- package/lib/commands/monitor.js.map +1 -0
- package/lib/commands/mroute/show.interfaces.d.ts +26 -0
- package/lib/commands/mroute/show.interfaces.js +3 -0
- package/lib/commands/mroute/show.interfaces.js.map +1 -0
- package/lib/commands/mroute/show.schema.d.ts +3 -0
- package/lib/commands/mroute/show.schema.js +44 -0
- package/lib/commands/mroute/show.schema.js.map +1 -0
- package/lib/commands/mroute.d.ts +29 -0
- package/lib/commands/mroute.js +53 -0
- package/lib/commands/mroute.js.map +1 -0
- package/lib/commands/neighbour/add.interfaces.d.ts +34 -0
- package/lib/commands/neighbour/add.interfaces.js +3 -0
- package/lib/commands/neighbour/add.interfaces.js.map +1 -0
- package/lib/commands/neighbour/add.schema.d.ts +3 -0
- package/lib/commands/neighbour/add.schema.js +49 -0
- package/lib/commands/neighbour/add.schema.js.map +1 -0
- package/lib/commands/neighbour/del.interfaces.d.ts +23 -0
- package/lib/commands/neighbour/del.interfaces.js +3 -0
- package/lib/commands/neighbour/del.interfaces.js.map +1 -0
- package/lib/commands/neighbour/del.schema.d.ts +3 -0
- package/lib/commands/neighbour/del.schema.js +37 -0
- package/lib/commands/neighbour/del.schema.js.map +1 -0
- package/lib/commands/neighbour/get.interfaces.d.ts +12 -0
- package/lib/commands/neighbour/get.interfaces.js +3 -0
- package/lib/commands/neighbour/get.interfaces.js.map +1 -0
- package/lib/commands/neighbour/get.schema.d.ts +3 -0
- package/lib/commands/neighbour/get.schema.js +26 -0
- package/lib/commands/neighbour/get.schema.js.map +1 -0
- package/lib/commands/neighbour/show.interfaces.d.ts +37 -0
- package/lib/commands/neighbour/show.interfaces.js +3 -0
- package/lib/commands/neighbour/show.interfaces.js.map +1 -0
- package/lib/commands/neighbour/show.schema.d.ts +3 -0
- package/lib/commands/neighbour/show.schema.js +39 -0
- package/lib/commands/neighbour/show.schema.js.map +1 -0
- package/lib/commands/neighbour.constants.d.ts +34 -0
- package/lib/commands/neighbour.constants.js +39 -0
- package/lib/commands/neighbour.constants.js.map +1 -0
- package/lib/commands/neighbour.d.ts +169 -0
- package/lib/commands/neighbour.js +238 -0
- package/lib/commands/neighbour.js.map +1 -0
- package/lib/commands/ntable/change.interfaces.d.ts +42 -0
- package/lib/commands/ntable/change.interfaces.js +3 -0
- package/lib/commands/ntable/change.interfaces.js.map +1 -0
- package/lib/commands/ntable/change.schema.d.ts +3 -0
- package/lib/commands/ntable/change.schema.js +101 -0
- package/lib/commands/ntable/change.schema.js.map +1 -0
- package/lib/commands/ntable/show.interfaces.d.ts +59 -0
- package/lib/commands/ntable/show.interfaces.js +3 -0
- package/lib/commands/ntable/show.interfaces.js.map +1 -0
- package/lib/commands/ntable/show.schema.d.ts +3 -0
- package/lib/commands/ntable/show.schema.js +22 -0
- package/lib/commands/ntable/show.schema.js.map +1 -0
- package/lib/commands/ntable.d.ts +43 -0
- package/lib/commands/ntable.js +75 -0
- package/lib/commands/ntable.js.map +1 -0
- package/lib/commands/route/add.interfaces.d.ts +261 -0
- package/lib/commands/route/add.interfaces.js +4 -0
- package/lib/commands/route/add.interfaces.js.map +1 -0
- package/lib/commands/route/add.schema.d.ts +3 -0
- package/lib/commands/route/add.schema.js +366 -0
- package/lib/commands/route/add.schema.js.map +1 -0
- package/lib/commands/route/encap-types/bpf.interfaces.d.ts +14 -0
- package/lib/commands/route/encap-types/bpf.interfaces.js +3 -0
- package/lib/commands/route/encap-types/bpf.interfaces.js.map +1 -0
- package/lib/commands/route/encap-types/bpf.schema.d.ts +3 -0
- package/lib/commands/route/encap-types/bpf.schema.js +31 -0
- package/lib/commands/route/encap-types/bpf.schema.js.map +1 -0
- package/lib/commands/route/encap-types/ioam6.interfaces.d.ts +19 -0
- package/lib/commands/route/encap-types/ioam6.interfaces.js +3 -0
- package/lib/commands/route/encap-types/ioam6.interfaces.js.map +1 -0
- package/lib/commands/route/encap-types/ioam6.schema.d.ts +3 -0
- package/lib/commands/route/encap-types/ioam6.schema.js +30 -0
- package/lib/commands/route/encap-types/ioam6.schema.js.map +1 -0
- package/lib/commands/route/encap-types/ip.interfaces.d.ts +17 -0
- package/lib/commands/route/encap-types/ip.interfaces.js +3 -0
- package/lib/commands/route/encap-types/ip.interfaces.js.map +1 -0
- package/lib/commands/route/encap-types/ip.schema.d.ts +3 -0
- package/lib/commands/route/encap-types/ip.schema.js +48 -0
- package/lib/commands/route/encap-types/ip.schema.js.map +1 -0
- package/lib/commands/route/encap-types/mpls.interfaces.d.ts +11 -0
- package/lib/commands/route/encap-types/mpls.interfaces.js +3 -0
- package/lib/commands/route/encap-types/mpls.interfaces.js.map +1 -0
- package/lib/commands/route/encap-types/mpls.schema.d.ts +3 -0
- package/lib/commands/route/encap-types/mpls.schema.js +46 -0
- package/lib/commands/route/encap-types/mpls.schema.js.map +1 -0
- package/lib/commands/route/encap-types/seg6.interfaces.d.ts +20 -0
- package/lib/commands/route/encap-types/seg6.interfaces.js +3 -0
- package/lib/commands/route/encap-types/seg6.interfaces.js.map +1 -0
- package/lib/commands/route/encap-types/seg6.schema.d.ts +3 -0
- package/lib/commands/route/encap-types/seg6.schema.js +38 -0
- package/lib/commands/route/encap-types/seg6.schema.js.map +1 -0
- package/lib/commands/route/encap-types/seg6local.interfaces.d.ts +76 -0
- package/lib/commands/route/encap-types/seg6local.interfaces.js +3 -0
- package/lib/commands/route/encap-types/seg6local.interfaces.js.map +1 -0
- package/lib/commands/route/encap-types/seg6local.schema.d.ts +6 -0
- package/lib/commands/route/encap-types/seg6local.schema.js +181 -0
- package/lib/commands/route/encap-types/seg6local.schema.js.map +1 -0
- package/lib/commands/route/get.interfaces.d.ts +37 -0
- package/lib/commands/route/get.interfaces.js +3 -0
- package/lib/commands/route/get.interfaces.js.map +1 -0
- package/lib/commands/route/get.schema.d.ts +3 -0
- package/lib/commands/route/get.schema.js +86 -0
- package/lib/commands/route/get.schema.js.map +1 -0
- package/lib/commands/route/show.constants.d.ts +105 -0
- package/lib/commands/route/show.constants.js +112 -0
- package/lib/commands/route/show.constants.js.map +1 -0
- package/lib/commands/route/show.interfaces.d.ts +96 -0
- package/lib/commands/route/show.interfaces.js +3 -0
- package/lib/commands/route/show.interfaces.js.map +1 -0
- package/lib/commands/route/show.schema.d.ts +3 -0
- package/lib/commands/route/show.schema.js +161 -0
- package/lib/commands/route/show.schema.js.map +1 -0
- package/lib/commands/route.constants.d.ts +129 -0
- package/lib/commands/route.constants.js +136 -0
- package/lib/commands/route.constants.js.map +1 -0
- package/lib/commands/route.d.ts +268 -0
- package/lib/commands/route.js +362 -0
- package/lib/commands/route.js.map +1 -0
- package/lib/commands/rule/add.interfaces.d.ts +41 -0
- package/lib/commands/rule/add.interfaces.js +3 -0
- package/lib/commands/rule/add.interfaces.js.map +1 -0
- package/lib/commands/rule/add.schema.d.ts +3 -0
- package/lib/commands/rule/add.schema.js +182 -0
- package/lib/commands/rule/add.schema.js.map +1 -0
- package/lib/commands/rule/show.interfaces.d.ts +86 -0
- package/lib/commands/rule/show.interfaces.js +3 -0
- package/lib/commands/rule/show.interfaces.js.map +1 -0
- package/lib/commands/rule/show.schema.d.ts +3 -0
- package/lib/commands/rule/show.schema.js +157 -0
- package/lib/commands/rule/show.schema.js.map +1 -0
- package/lib/commands/rule.constants.d.ts +34 -0
- package/lib/commands/rule.constants.js +40 -0
- package/lib/commands/rule.constants.js.map +1 -0
- package/lib/commands/rule.d.ts +143 -0
- package/lib/commands/rule.js +205 -0
- package/lib/commands/rule.js.map +1 -0
- package/lib/commands/tunnel/6rd.interfaces.d.ts +17 -0
- package/lib/commands/tunnel/6rd.interfaces.js +3 -0
- package/lib/commands/tunnel/6rd.interfaces.js.map +1 -0
- package/lib/commands/tunnel/6rd.schema.d.ts +3 -0
- package/lib/commands/tunnel/6rd.schema.js +33 -0
- package/lib/commands/tunnel/6rd.schema.js.map +1 -0
- package/lib/commands/tunnel/add.interfaces.d.ts +124 -0
- package/lib/commands/tunnel/add.interfaces.js +3 -0
- package/lib/commands/tunnel/add.interfaces.js.map +1 -0
- package/lib/commands/tunnel/add.schema.d.ts +3 -0
- package/lib/commands/tunnel/add.schema.js +213 -0
- package/lib/commands/tunnel/add.schema.js.map +1 -0
- package/lib/commands/tunnel/prl.interfaces.d.ts +17 -0
- package/lib/commands/tunnel/prl.interfaces.js +3 -0
- package/lib/commands/tunnel/prl.interfaces.js.map +1 -0
- package/lib/commands/tunnel/prl.schema.d.ts +3 -0
- package/lib/commands/tunnel/prl.schema.js +34 -0
- package/lib/commands/tunnel/prl.schema.js.map +1 -0
- package/lib/commands/tunnel.constants.d.ts +23 -0
- package/lib/commands/tunnel.constants.js +24 -0
- package/lib/commands/tunnel.constants.js.map +1 -0
- package/lib/commands/tunnel.d.ts +151 -0
- package/lib/commands/tunnel.js +210 -0
- package/lib/commands/tunnel.js.map +1 -0
- package/lib/commands/tuntap/add.interfaces.d.ts +25 -0
- package/lib/commands/tuntap/add.interfaces.js +3 -0
- package/lib/commands/tuntap/add.interfaces.js.map +1 -0
- package/lib/commands/tuntap/add.schema.d.ts +3 -0
- package/lib/commands/tuntap/add.schema.js +77 -0
- package/lib/commands/tuntap/add.schema.js.map +1 -0
- package/lib/commands/tuntap/show.interfaces.d.ts +17 -0
- package/lib/commands/tuntap/show.interfaces.js +3 -0
- package/lib/commands/tuntap/show.interfaces.js.map +1 -0
- package/lib/commands/tuntap/show.schema.d.ts +3 -0
- package/lib/commands/tuntap/show.schema.js +80 -0
- package/lib/commands/tuntap/show.schema.js.map +1 -0
- package/lib/commands/tuntap.constants.d.ts +8 -0
- package/lib/commands/tuntap.constants.js +13 -0
- package/lib/commands/tuntap.constants.js.map +1 -0
- package/lib/commands/tuntap.d.ts +83 -0
- package/lib/commands/tuntap.js +121 -0
- package/lib/commands/tuntap.js.map +1 -0
- package/lib/common/classes/command-with-filepath.d.ts +16 -0
- package/lib/common/classes/command-with-filepath.js +53 -0
- package/lib/common/classes/command-with-filepath.js.map +1 -0
- package/lib/common/classes/command-with-redirect-from-filepath-and-returned-data.d.ts +15 -0
- package/lib/common/classes/command-with-redirect-from-filepath-and-returned-data.js +45 -0
- package/lib/common/classes/command-with-redirect-from-filepath-and-returned-data.js.map +1 -0
- package/lib/common/classes/command-with-redirect-from-filepath.d.ts +16 -0
- package/lib/common/classes/command-with-redirect-from-filepath.js +53 -0
- package/lib/common/classes/command-with-redirect-from-filepath.js.map +1 -0
- package/lib/common/classes/command-with-redirect-to-filepath.d.ts +16 -0
- package/lib/common/classes/command-with-redirect-to-filepath.js +53 -0
- package/lib/common/classes/command-with-redirect-to-filepath.js.map +1 -0
- package/lib/common/classes/command-with-returned-data.d.ts +15 -0
- package/lib/common/classes/command-with-returned-data.js +45 -0
- package/lib/common/classes/command-with-returned-data.js.map +1 -0
- package/lib/common/classes/command-with-stdin.d.ts +16 -0
- package/lib/common/classes/command-with-stdin.js +53 -0
- package/lib/common/classes/command-with-stdin.js.map +1 -0
- package/lib/common/classes/command.d.ts +26 -0
- package/lib/common/classes/command.js +144 -0
- package/lib/common/classes/command.js.map +1 -0
- package/lib/common/classes/monitor-command.d.ts +30 -0
- package/lib/common/classes/monitor-command.js +108 -0
- package/lib/common/classes/monitor-command.js.map +1 -0
- package/lib/common/constants/attribute-values.d.ts +33 -0
- package/lib/common/constants/attribute-values.js +41 -0
- package/lib/common/constants/attribute-values.js.map +1 -0
- package/lib/common/constants/regexes.d.ts +34 -0
- package/lib/common/constants/regexes.js +38 -0
- package/lib/common/constants/regexes.js.map +1 -0
- package/lib/common/constants/schemas.d.ts +52 -0
- package/lib/common/constants/schemas.js +296 -0
- package/lib/common/constants/schemas.js.map +1 -0
- package/lib/common/constants/tests.d.ts +4 -0
- package/lib/common/constants/tests.js +9 -0
- package/lib/common/constants/tests.js.map +1 -0
- package/lib/common/errors/command.d.ts +11 -0
- package/lib/common/errors/command.js +20 -0
- package/lib/common/errors/command.js.map +1 -0
- package/lib/common/errors/parameters.d.ts +16 -0
- package/lib/common/errors/parameters.js +21 -0
- package/lib/common/errors/parameters.js.map +1 -0
- package/lib/common/interfaces/common.d.ts +115 -0
- package/lib/common/interfaces/common.js +3 -0
- package/lib/common/interfaces/common.js.map +1 -0
- package/lib/common/interfaces/monitor.d.ts +17 -0
- package/lib/common/interfaces/monitor.js +3 -0
- package/lib/common/interfaces/monitor.js.map +1 -0
- package/lib/common/interfaces/tests.d.ts +33 -0
- package/lib/common/interfaces/tests.js +3 -0
- package/lib/common/interfaces/tests.js.map +1 -0
- package/lib/common/misc.d.ts +4 -0
- package/lib/common/misc.js +18 -0
- package/lib/common/misc.js.map +1 -0
- package/lib/common/parse-output.d.ts +14 -0
- package/lib/common/parse-output.js +51 -0
- package/lib/common/parse-output.js.map +1 -0
- package/lib/common/validator.d.ts +3 -0
- package/lib/common/validator.js +45 -0
- package/lib/common/validator.js.map +1 -0
- package/lib/index.d.ts +400 -0
- package/lib/index.js +189 -0
- package/lib/index.js.map +1 -0
- package/lib/utils/index.d.ts +33 -0
- package/lib/utils/index.js +40 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/utils/ip-forwarding.constants.d.ts +21 -0
- package/lib/utils/ip-forwarding.constants.js +27 -0
- package/lib/utils/ip-forwarding.constants.js.map +1 -0
- package/lib/utils/ip-forwarding.d.ts +103 -0
- package/lib/utils/ip-forwarding.js +149 -0
- package/lib/utils/ip-forwarding.js.map +1 -0
- package/lib/utils/routing-tables.constants.d.ts +7 -0
- package/lib/utils/routing-tables.constants.js +11 -0
- package/lib/utils/routing-tables.constants.js.map +1 -0
- package/lib/utils/routing-tables.d.ts +134 -0
- package/lib/utils/routing-tables.interfaces.d.ts +16 -0
- package/lib/utils/routing-tables.interfaces.js +3 -0
- package/lib/utils/routing-tables.interfaces.js.map +1 -0
- package/lib/utils/routing-tables.js +243 -0
- package/lib/utils/routing-tables.js.map +1 -0
- package/lib/utils/routing-tables.schemas.d.ts +3 -0
- package/lib/utils/routing-tables.schemas.js +22 -0
- package/lib/utils/routing-tables.schemas.js.map +1 -0
- package/package.json +92 -0
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.XdpOptionTypes = exports.BridgeSlavePortStates = exports.AddrGenMode = exports.SecureAssociationEncodings = exports.MacsecValidationModeOptions = exports.MldVersions = exports.IgmpVersions = exports.MultiCastRouterOptions = exports.HsrProtocols = exports.HsrVersions = exports.MacvlanMacvtapModes = exports.TtlSpecialValues = exports.ErspanDirections = exports.IpoIbModes = exports.IpipSipDeviceModes = exports.SecondaryUdpEncapsulations = exports.DontFragmentFlagValues = exports.VlanProtocols = exports.ExtendedLinkTypes = exports.LinkTypes = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Link Types.
|
|
6
|
+
* @category Constants
|
|
7
|
+
*/
|
|
8
|
+
exports.LinkTypes = {
|
|
9
|
+
/** Ethernet Bridge device. */
|
|
10
|
+
Bridge: 'bridge',
|
|
11
|
+
/** Bonding device. */
|
|
12
|
+
Bond: 'bond',
|
|
13
|
+
/** Dummy network interface. */
|
|
14
|
+
Dummy: 'dummy',
|
|
15
|
+
/** High-availability Seamless Redundancy device. */
|
|
16
|
+
Hsr: 'hsr',
|
|
17
|
+
/** Intermediate Functional Block device. */
|
|
18
|
+
Ifb: 'ifb',
|
|
19
|
+
/** IP over Infiniband device. */
|
|
20
|
+
Ipoib: 'ipoib',
|
|
21
|
+
/** Virtual interface base on link layer address (MAC). */
|
|
22
|
+
Macvlan: 'macvlan',
|
|
23
|
+
/** Virtual interface based on link layer address (MAC) and TAP. */
|
|
24
|
+
Macvtap: 'macvtap',
|
|
25
|
+
/** Virtual Controller Area Network interface. */
|
|
26
|
+
Vcan: 'vcan',
|
|
27
|
+
/** Controller Area Network interface. */
|
|
28
|
+
Can: 'can',
|
|
29
|
+
/** Virtual Controller Area Network tunnel interface. */
|
|
30
|
+
Vxcan: 'vxcan',
|
|
31
|
+
/** Virtual ethernet interface. */
|
|
32
|
+
Veth: 'veth',
|
|
33
|
+
/** 802.1q tagged virtual LAN interface. */
|
|
34
|
+
Vlan: 'vlan',
|
|
35
|
+
/** Virtual eXtended LAN. */
|
|
36
|
+
Vxlan: 'vxlan',
|
|
37
|
+
/** Virtual tunnel interface IPv4|IPv6 over IPv6. */
|
|
38
|
+
Ip6tnl: 'ip6tnl',
|
|
39
|
+
/** Virtual tunnel interface IPv4 over IPv4. */
|
|
40
|
+
Ipip: 'ipip',
|
|
41
|
+
/** Virtual tunnel interface IPv6 over IPv4. */
|
|
42
|
+
Sit: 'sit',
|
|
43
|
+
/** Virtual tunnel interface GRE over IPv4. */
|
|
44
|
+
Gre: 'gre',
|
|
45
|
+
/** Virtual L2 tunnel interface GRE over IPv4. */
|
|
46
|
+
Gretap: 'gretap',
|
|
47
|
+
/** Encapsulated Remote SPAN over GRE and IPv4. */
|
|
48
|
+
Erspan: 'erspan',
|
|
49
|
+
/** Virtual tunnel interface GRE over IPv6. */
|
|
50
|
+
Ip6gre: 'ip6gre',
|
|
51
|
+
/** Virtual L2 tunnel interface GRE over IPv6. */
|
|
52
|
+
Ip6gretap: 'ip6gretap',
|
|
53
|
+
/** Encapsulated Remote SPAN over GRE and IPv6. */
|
|
54
|
+
Ip6erspan: 'ip6erspan',
|
|
55
|
+
/** Virtual tunnel interface. */
|
|
56
|
+
Vti: 'vti',
|
|
57
|
+
/** Netlink monitoring device. */
|
|
58
|
+
Nlmon: 'nlmon',
|
|
59
|
+
/** Interface for L3 (IPv6/IPv4) based VLANs. */
|
|
60
|
+
Ipvlan: 'ipvlan',
|
|
61
|
+
/** Interface for L3 (IPv6/IPv4) based VLANs and TAP. */
|
|
62
|
+
Ipvtap: 'ipvtap',
|
|
63
|
+
/** Interface for 6LoWPAN (IPv6) over IEEE 802.15.4 Bluetooth. */
|
|
64
|
+
Lowpan: 'lowpan',
|
|
65
|
+
/** GEneric NEtwork Virtualization Encapsulation. */
|
|
66
|
+
Geneve: 'geneve',
|
|
67
|
+
/** Bare UDP L3 encapsulation support. */
|
|
68
|
+
Bareudp: 'bareudp',
|
|
69
|
+
/** Interface for IEEE 802.1AE MAC Security (MAC‐sec). */
|
|
70
|
+
Macsec: 'macsec',
|
|
71
|
+
/** Interface for L3 VRF domains. */
|
|
72
|
+
Vrf: 'vrf',
|
|
73
|
+
/** Interface for netdev API tests. */
|
|
74
|
+
Netdevsim: 'netdevsim',
|
|
75
|
+
/** Qualcomm rmnet device. */
|
|
76
|
+
Rmnet: 'rmnet',
|
|
77
|
+
/** Virtual xfrm interface. */
|
|
78
|
+
Xfrm: 'xfrm'
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Extended Link Types.
|
|
82
|
+
* @category Constants
|
|
83
|
+
*/
|
|
84
|
+
exports.ExtendedLinkTypes = Object.assign(Object.assign({}, exports.LinkTypes), {
|
|
85
|
+
/** Bridge slave interface. */
|
|
86
|
+
BridgeSlave: 'bridge_slave',
|
|
87
|
+
/** Bond slave interface. */
|
|
88
|
+
BondSlave: 'bond_slave' });
|
|
89
|
+
/**
|
|
90
|
+
* VLAN protocols.
|
|
91
|
+
* @category Constants
|
|
92
|
+
*/
|
|
93
|
+
var VlanProtocols;
|
|
94
|
+
(function (VlanProtocols) {
|
|
95
|
+
VlanProtocols["802.1Q"] = "802.1Q";
|
|
96
|
+
VlanProtocols["802.1ad"] = "802.1ad";
|
|
97
|
+
})(VlanProtocols || (exports.VlanProtocols = VlanProtocols = {}));
|
|
98
|
+
/**
|
|
99
|
+
* Dont fragment flag values.
|
|
100
|
+
* @category Constants
|
|
101
|
+
*/
|
|
102
|
+
var DontFragmentFlagValues;
|
|
103
|
+
(function (DontFragmentFlagValues) {
|
|
104
|
+
/** Causes the bit to be copied from the original IP header. */
|
|
105
|
+
DontFragmentFlagValues["Inherit"] = "inherit";
|
|
106
|
+
/** Cause the bit to be always unset. */
|
|
107
|
+
DontFragmentFlagValues["Unset"] = "unset";
|
|
108
|
+
/** Cause the bit to be always set. */
|
|
109
|
+
DontFragmentFlagValues["Set"] = "set";
|
|
110
|
+
})(DontFragmentFlagValues || (exports.DontFragmentFlagValues = DontFragmentFlagValues = {}));
|
|
111
|
+
/**
|
|
112
|
+
* Specifies type of secondary UDP encapsulation.
|
|
113
|
+
* @category Constants
|
|
114
|
+
*/
|
|
115
|
+
var SecondaryUdpEncapsulations;
|
|
116
|
+
(function (SecondaryUdpEncapsulations) {
|
|
117
|
+
/** Indicates Foo-Over-UDP. */
|
|
118
|
+
SecondaryUdpEncapsulations["Fou"] = "fou";
|
|
119
|
+
/** Indicates Generic UDP Encapsulation. */
|
|
120
|
+
SecondaryUdpEncapsulations["Gue"] = "gue";
|
|
121
|
+
SecondaryUdpEncapsulations["None"] = "none";
|
|
122
|
+
})(SecondaryUdpEncapsulations || (exports.SecondaryUdpEncapsulations = SecondaryUdpEncapsulations = {}));
|
|
123
|
+
/**
|
|
124
|
+
* Specifies mode in which device should run.
|
|
125
|
+
* @category Constants
|
|
126
|
+
*/
|
|
127
|
+
var IpipSipDeviceModes;
|
|
128
|
+
(function (IpipSipDeviceModes) {
|
|
129
|
+
/** Indicates IPv6-Over-IPv4 */
|
|
130
|
+
IpipSipDeviceModes["Ip6ip"] = "ip6ip";
|
|
131
|
+
/** Indicates "IPv4-Over-IPv4". */
|
|
132
|
+
IpipSipDeviceModes["Ipip"] = "ipip";
|
|
133
|
+
/** Indicates MPLS-Over-IPv4. */
|
|
134
|
+
IpipSipDeviceModes["Mplsip"] = "mplsip";
|
|
135
|
+
/** Indicates IPv6, IPv4 or MPLS Over IPv4. */
|
|
136
|
+
IpipSipDeviceModes["Any"] = "any";
|
|
137
|
+
})(IpipSipDeviceModes || (exports.IpipSipDeviceModes = IpipSipDeviceModes = {}));
|
|
138
|
+
/**
|
|
139
|
+
* Specifies whether the link should be in datagram mode or connected mode.
|
|
140
|
+
* @category Constants
|
|
141
|
+
*/
|
|
142
|
+
var IpoIbModes;
|
|
143
|
+
(function (IpoIbModes) {
|
|
144
|
+
/**
|
|
145
|
+
* This is the default mode. In datagram mode, packets are sent independently of each other,
|
|
146
|
+
* without a connection between sender and receiver.
|
|
147
|
+
* */
|
|
148
|
+
IpoIbModes["Datagram"] = "datagram";
|
|
149
|
+
/**
|
|
150
|
+
* In connected mode, a reliable connection is established before data is exchanged, which can
|
|
151
|
+
* offer higher throughput and lower latency in some situations. However, connected mode uses more
|
|
152
|
+
* resources and may not be supported by all InfiniBand hardware.
|
|
153
|
+
*/
|
|
154
|
+
IpoIbModes["Connected"] = "connected";
|
|
155
|
+
})(IpoIbModes || (exports.IpoIbModes = IpoIbModes = {}));
|
|
156
|
+
/**
|
|
157
|
+
* Specifies the ERSPAN v2 mirrored traffic's direction.
|
|
158
|
+
* @category Constants
|
|
159
|
+
*/
|
|
160
|
+
var ErspanDirections;
|
|
161
|
+
(function (ErspanDirections) {
|
|
162
|
+
ErspanDirections["Ingress"] = "ingress";
|
|
163
|
+
ErspanDirections["Egress"] = "egress";
|
|
164
|
+
})(ErspanDirections || (exports.ErspanDirections = ErspanDirections = {}));
|
|
165
|
+
/**
|
|
166
|
+
* TTL special values.
|
|
167
|
+
* @category Constants
|
|
168
|
+
*/
|
|
169
|
+
var TtlSpecialValues;
|
|
170
|
+
(function (TtlSpecialValues) {
|
|
171
|
+
TtlSpecialValues["Auto"] = "auto";
|
|
172
|
+
TtlSpecialValues["Inherit"] = "inherit";
|
|
173
|
+
})(TtlSpecialValues || (exports.TtlSpecialValues = TtlSpecialValues = {}));
|
|
174
|
+
/**
|
|
175
|
+
* Modes for macvlan and macvtap interfaces.
|
|
176
|
+
* @category Constants
|
|
177
|
+
*/
|
|
178
|
+
var MacvlanMacvtapModes;
|
|
179
|
+
(function (MacvlanMacvtapModes) {
|
|
180
|
+
/**
|
|
181
|
+
* Do not allow communication between macvlan instances on the same physical interface,
|
|
182
|
+
* even if the external switch supports hairpin mode.
|
|
183
|
+
*/
|
|
184
|
+
MacvlanMacvtapModes["Private"] = "private";
|
|
185
|
+
/**
|
|
186
|
+
* Virtual Ethernet Port Aggregator mode.
|
|
187
|
+
*
|
|
188
|
+
* Data from one macvlan instance to the other on the same physical inter face is
|
|
189
|
+
* transmitted over the physical interface.
|
|
190
|
+
*
|
|
191
|
+
* Either the attached switch needs to support hairpin mode, or there must be a
|
|
192
|
+
* TCP/IP router forwarding the packets in order to allow communication.
|
|
193
|
+
*
|
|
194
|
+
* This is the default mode.
|
|
195
|
+
*/
|
|
196
|
+
MacvlanMacvtapModes["Vepa"] = "vepa";
|
|
197
|
+
/**
|
|
198
|
+
* In bridge mode, all endpoints are directly connected to each other, communication
|
|
199
|
+
* is not redirected through the physical interface's peer.
|
|
200
|
+
*/
|
|
201
|
+
MacvlanMacvtapModes["Bridge"] = "bridge";
|
|
202
|
+
/**
|
|
203
|
+
* This mode gives more power to a single endpoint, usually in `macvtap` mode.
|
|
204
|
+
*
|
|
205
|
+
* It is not allowed for more than one endpoint on the same physical interface.
|
|
206
|
+
*
|
|
207
|
+
* All traffic will be forwarded to this endpoint, allowing virtio guests to change
|
|
208
|
+
* MAC address or set promiscuous mode in order to bridge the interface or create
|
|
209
|
+
* vlan interfaces on top of it.
|
|
210
|
+
*
|
|
211
|
+
* By default, this mode forces the underlying interface into promiscuous mode.
|
|
212
|
+
*
|
|
213
|
+
* Passing the `nopromisc` flag prevents this, so the promisc flag may be controlled
|
|
214
|
+
* using standard tools.
|
|
215
|
+
*
|
|
216
|
+
* @see {@link PassthruNopromisc}
|
|
217
|
+
*/
|
|
218
|
+
MacvlanMacvtapModes["Passthru"] = "passthru";
|
|
219
|
+
/** @see {@link Passthru} */
|
|
220
|
+
MacvlanMacvtapModes["PassthruNopromisc"] = "passthru nopromisc";
|
|
221
|
+
/**
|
|
222
|
+
* Allows one to set a list of allowed mac address, which is used to match against
|
|
223
|
+
* source mac address from received frames on underlying interface.
|
|
224
|
+
*
|
|
225
|
+
* This allows creating mac based VLAN associations, instead of standard port or
|
|
226
|
+
* tag based.
|
|
227
|
+
*
|
|
228
|
+
* The feature is useful to deploy 802.1x mac based behavior, where drivers of underlying
|
|
229
|
+
* interfaces doesn't allow that.
|
|
230
|
+
*
|
|
231
|
+
* By default, packets are also considered (duplicated) for destination-based MACVLAN.
|
|
232
|
+
*
|
|
233
|
+
* Passing the `nodst` flag stops matching packets from also going through the destination-based flow.
|
|
234
|
+
*
|
|
235
|
+
* @see {@link SourceNodst}
|
|
236
|
+
*/
|
|
237
|
+
MacvlanMacvtapModes["Source"] = "source";
|
|
238
|
+
/** @see {@link Source} */
|
|
239
|
+
MacvlanMacvtapModes["SourceNodst"] = "source nodst";
|
|
240
|
+
})(MacvlanMacvtapModes || (exports.MacvlanMacvtapModes = MacvlanMacvtapModes = {}));
|
|
241
|
+
/**
|
|
242
|
+
* Protocol version of the interface.
|
|
243
|
+
* Defaults to {@link HsrVersions.v2010}
|
|
244
|
+
*
|
|
245
|
+
* @category Constants
|
|
246
|
+
*/
|
|
247
|
+
var HsrVersions;
|
|
248
|
+
(function (HsrVersions) {
|
|
249
|
+
HsrVersions[HsrVersions["v2010"] = 0] = "v2010";
|
|
250
|
+
HsrVersions[HsrVersions["v2012"] = 1] = "v2012";
|
|
251
|
+
})(HsrVersions || (exports.HsrVersions = HsrVersions = {}));
|
|
252
|
+
/**
|
|
253
|
+
* Protocol of the interface.
|
|
254
|
+
* Defaults to {@link HsrProtocols.HSR}
|
|
255
|
+
*
|
|
256
|
+
* @category Constants
|
|
257
|
+
*/
|
|
258
|
+
var HsrProtocols;
|
|
259
|
+
(function (HsrProtocols) {
|
|
260
|
+
/** High-availability Seamless Redundancy. */
|
|
261
|
+
HsrProtocols[HsrProtocols["HSR"] = 0] = "HSR";
|
|
262
|
+
/** Parallel Redundancy Protocol. */
|
|
263
|
+
HsrProtocols[HsrProtocols["PRP"] = 1] = "PRP";
|
|
264
|
+
})(HsrProtocols || (exports.HsrProtocols = HsrProtocols = {}));
|
|
265
|
+
/**
|
|
266
|
+
* Multicast router options.
|
|
267
|
+
* @category Constants
|
|
268
|
+
*/
|
|
269
|
+
var MultiCastRouterOptions;
|
|
270
|
+
(function (MultiCastRouterOptions) {
|
|
271
|
+
/**
|
|
272
|
+
* The bridge does not act as a multicast router. It will not forward any IP multicast packets
|
|
273
|
+
* between different interfaces.
|
|
274
|
+
*
|
|
275
|
+
* It will forward multicast packets only to ports where multicast listeners are detected.
|
|
276
|
+
*/
|
|
277
|
+
MultiCastRouterOptions[MultiCastRouterOptions["Disabled"] = 0] = "Disabled";
|
|
278
|
+
/**
|
|
279
|
+
* The bridge acts as a multicast router and will forward all IP multicast packets.
|
|
280
|
+
* This is the default setting.
|
|
281
|
+
*/
|
|
282
|
+
MultiCastRouterOptions[MultiCastRouterOptions["Automatic"] = 1] = "Automatic";
|
|
283
|
+
/**
|
|
284
|
+
* The bridge uses the multicast router discovery protocol to learn whether it should
|
|
285
|
+
* forward multicast packets as a multicast router.
|
|
286
|
+
*/
|
|
287
|
+
MultiCastRouterOptions[MultiCastRouterOptions["PermanentlyEnabled"] = 2] = "PermanentlyEnabled";
|
|
288
|
+
})(MultiCastRouterOptions || (exports.MultiCastRouterOptions = MultiCastRouterOptions = {}));
|
|
289
|
+
/**
|
|
290
|
+
* IGMP protocol versions.
|
|
291
|
+
* @category Constants
|
|
292
|
+
*/
|
|
293
|
+
var IgmpVersions;
|
|
294
|
+
(function (IgmpVersions) {
|
|
295
|
+
IgmpVersions[IgmpVersions["v2"] = 2] = "v2";
|
|
296
|
+
IgmpVersions[IgmpVersions["v3"] = 3] = "v3";
|
|
297
|
+
})(IgmpVersions || (exports.IgmpVersions = IgmpVersions = {}));
|
|
298
|
+
/**
|
|
299
|
+
* Mld versions.
|
|
300
|
+
* @category Constants
|
|
301
|
+
*/
|
|
302
|
+
var MldVersions;
|
|
303
|
+
(function (MldVersions) {
|
|
304
|
+
MldVersions[MldVersions["v1"] = 1] = "v1";
|
|
305
|
+
MldVersions[MldVersions["v2"] = 2] = "v2";
|
|
306
|
+
})(MldVersions || (exports.MldVersions = MldVersions = {}));
|
|
307
|
+
/**
|
|
308
|
+
* Macsec validation mode options.
|
|
309
|
+
* @category Constants
|
|
310
|
+
*/
|
|
311
|
+
var MacsecValidationModeOptions;
|
|
312
|
+
(function (MacsecValidationModeOptions) {
|
|
313
|
+
MacsecValidationModeOptions["Strict"] = "strict";
|
|
314
|
+
MacsecValidationModeOptions["Check"] = "check";
|
|
315
|
+
MacsecValidationModeOptions["Disabled"] = "disabled";
|
|
316
|
+
})(MacsecValidationModeOptions || (exports.MacsecValidationModeOptions = MacsecValidationModeOptions = {}));
|
|
317
|
+
/**
|
|
318
|
+
* Secure association encodings.
|
|
319
|
+
* @category Constants
|
|
320
|
+
*/
|
|
321
|
+
var SecureAssociationEncodings;
|
|
322
|
+
(function (SecureAssociationEncodings) {
|
|
323
|
+
SecureAssociationEncodings[SecureAssociationEncodings["Implicit"] = 0] = "Implicit";
|
|
324
|
+
SecureAssociationEncodings[SecureAssociationEncodings["Explicit"] = 1] = "Explicit";
|
|
325
|
+
})(SecureAssociationEncodings || (exports.SecureAssociationEncodings = SecureAssociationEncodings = {}));
|
|
326
|
+
/**
|
|
327
|
+
* Is used to configure IPv6 address generation mode for a given interface.
|
|
328
|
+
* @category Constants
|
|
329
|
+
*/
|
|
330
|
+
var AddrGenMode;
|
|
331
|
+
(function (AddrGenMode) {
|
|
332
|
+
/** Use a Modified EUI-64 format interface identifier. */
|
|
333
|
+
AddrGenMode["Eui64"] = "eui64";
|
|
334
|
+
/** Disable automatic address generation. */
|
|
335
|
+
AddrGenMode["None"] = "none";
|
|
336
|
+
/**
|
|
337
|
+
* Generate the interface identifier based on a preset
|
|
338
|
+
* `/proc/sys/net/ipv6/conf/{default,DEVICE}/stable_secret`.
|
|
339
|
+
*/
|
|
340
|
+
AddrGenMode["StableSecret"] = "stable_secret";
|
|
341
|
+
/** Like {@link StableSecret}, but auto-generate a new random secret if none is set. */
|
|
342
|
+
AddrGenMode["Random"] = "random";
|
|
343
|
+
})(AddrGenMode || (exports.AddrGenMode = AddrGenMode = {}));
|
|
344
|
+
/**
|
|
345
|
+
* Bridge slave port states.
|
|
346
|
+
* @category Constants
|
|
347
|
+
*/
|
|
348
|
+
var BridgeSlavePortStates;
|
|
349
|
+
(function (BridgeSlavePortStates) {
|
|
350
|
+
BridgeSlavePortStates[BridgeSlavePortStates["Disabled"] = 0] = "Disabled";
|
|
351
|
+
BridgeSlavePortStates[BridgeSlavePortStates["Listening"] = 1] = "Listening";
|
|
352
|
+
BridgeSlavePortStates[BridgeSlavePortStates["Learning"] = 2] = "Learning";
|
|
353
|
+
BridgeSlavePortStates[BridgeSlavePortStates["Forwarding"] = 3] = "Forwarding";
|
|
354
|
+
BridgeSlavePortStates[BridgeSlavePortStates["Blocking"] = 4] = "Blocking";
|
|
355
|
+
})(BridgeSlavePortStates || (exports.BridgeSlavePortStates = BridgeSlavePortStates = {}));
|
|
356
|
+
/**
|
|
357
|
+
* Xdp option types.
|
|
358
|
+
* @category Constants
|
|
359
|
+
*/
|
|
360
|
+
var XdpOptionTypes;
|
|
361
|
+
(function (XdpOptionTypes) {
|
|
362
|
+
XdpOptionTypes["Off"] = "off";
|
|
363
|
+
XdpOptionTypes["Object"] = "object";
|
|
364
|
+
XdpOptionTypes["Pinned"] = "pinned";
|
|
365
|
+
})(XdpOptionTypes || (exports.XdpOptionTypes = XdpOptionTypes = {}));
|
|
366
|
+
//# sourceMappingURL=link.constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link.constants.js","sourceRoot":"","sources":["../../src/commands/link.constants.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACU,QAAA,SAAS,GAAG;IACvB,8BAA8B;IAC9B,MAAM,EAAE,QAAQ;IAChB,sBAAsB;IACtB,IAAI,EAAE,MAAM;IACZ,+BAA+B;IAC/B,KAAK,EAAE,OAAO;IACd,oDAAoD;IACpD,GAAG,EAAE,KAAK;IACV,4CAA4C;IAC5C,GAAG,EAAE,KAAK;IACV,iCAAiC;IACjC,KAAK,EAAE,OAAO;IACd,0DAA0D;IAC1D,OAAO,EAAE,SAAS;IAClB,mEAAmE;IACnE,OAAO,EAAE,SAAS;IAClB,iDAAiD;IACjD,IAAI,EAAE,MAAM;IACZ,yCAAyC;IACzC,GAAG,EAAE,KAAK;IACV,wDAAwD;IACxD,KAAK,EAAE,OAAO;IACd,kCAAkC;IAClC,IAAI,EAAE,MAAM;IACZ,2CAA2C;IAC3C,IAAI,EAAE,MAAM;IACZ,4BAA4B;IAC5B,KAAK,EAAE,OAAO;IACd,oDAAoD;IAC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ACzD,8BAAsB,CAAA;IACtB,4CAA4C;IAC5C,4BAAqB,CAAA;IACrB;;;OAGG;IACH,6CAA8B,CAAA;IAC9B,uFAAuF;IACvF,gCAAuB,CAAA;AACzB,CAAC,EAZW,WAAW,2BAAX,WAAW,QAYtB;AAED;;;GAGG;AACH,IAAY,qBAMX;AAND,WAAY,qBAAqB;IAC/B,yEAAc,CAAA;IACd,2EAAc,CAAA;IACd,yEAAc,CAAA;IACd,6EAAc,CAAA;IACd,yEAAc,CAAA;AAChB,CAAC,EANW,qBAAqB,qCAArB,qBAAqB,QAMhC;AAED;;;GAGG;AACH,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,6BAAc,CAAA;IACd,mCAAiB,CAAA;IACjB,mCAAiB,CAAA;AACnB,CAAC,EAJW,cAAc,8BAAd,cAAc,QAIzB"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import Command from '../common/classes/command';
|
|
2
|
+
import { GlobalOptions } from '../common/interfaces/common';
|
|
3
|
+
import { LinkAddOptions } from './link/add.interfaces';
|
|
4
|
+
import { LinkDeleteOptions } from './link/delete.interfaces';
|
|
5
|
+
import { LinkSetOptions } from './link/set.interfaces';
|
|
6
|
+
import { LinkShowOptions, LinkInfo } from './link/show.interfaces';
|
|
7
|
+
/**
|
|
8
|
+
* Adds a virtual link.
|
|
9
|
+
*
|
|
10
|
+
* @param options - Parameters options to be passed down to `ip`.
|
|
11
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
12
|
+
*
|
|
13
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
14
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
*
|
|
18
|
+
* Import module
|
|
19
|
+
* ```
|
|
20
|
+
* import { link } from 'iproutejs';
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* Add a link
|
|
24
|
+
* ```
|
|
25
|
+
* await link.add({
|
|
26
|
+
* link: 'lo',
|
|
27
|
+
* name: 'dummy100',
|
|
28
|
+
* address: '00:11:22:33:44:55',
|
|
29
|
+
* mtu: 1500,
|
|
30
|
+
* type: VirtualLinkTypes.Dummy
|
|
31
|
+
* });
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export declare function add(options: LinkAddOptions, globalOptions?: GlobalOptions): Promise<Command<LinkAddOptions>>;
|
|
35
|
+
/**
|
|
36
|
+
* Deletes a virtual link.
|
|
37
|
+
*
|
|
38
|
+
* @param options - Parameters options to be passed down to `ip`.
|
|
39
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
40
|
+
*
|
|
41
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
42
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
*
|
|
46
|
+
* Import module
|
|
47
|
+
* ```
|
|
48
|
+
* import { link } from 'iproutejs';
|
|
49
|
+
* ```
|
|
50
|
+
*
|
|
51
|
+
* Delete a link
|
|
52
|
+
* ```
|
|
53
|
+
* await link.del({
|
|
54
|
+
* dev: 'eth0.1@eth0'
|
|
55
|
+
* });
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
export declare function del(options: LinkDeleteOptions, globalOptions?: GlobalOptions): Promise<Command<LinkDeleteOptions>>;
|
|
59
|
+
/**
|
|
60
|
+
* Display device attributes.
|
|
61
|
+
*
|
|
62
|
+
* @param options - Parameters options to be passed down to `ip`.
|
|
63
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
64
|
+
*
|
|
65
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
66
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
*
|
|
70
|
+
* Import module
|
|
71
|
+
* ```
|
|
72
|
+
* import { link } from 'iproutejs';
|
|
73
|
+
* ```
|
|
74
|
+
*
|
|
75
|
+
* Show link information about the `eth0` device
|
|
76
|
+
* ```
|
|
77
|
+
* const links = await link.show({
|
|
78
|
+
* dev: 'eth0'
|
|
79
|
+
* });
|
|
80
|
+
* ```
|
|
81
|
+
*
|
|
82
|
+
* Shortcut to show all links
|
|
83
|
+
* ```
|
|
84
|
+
* const links = await link.show();
|
|
85
|
+
* const links = await link.show({});
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
export declare function show(options?: LinkShowOptions, globalOptions?: GlobalOptions): Promise<Command<LinkShowOptions> | LinkInfo[]>;
|
|
89
|
+
/**
|
|
90
|
+
* Change device attributes.
|
|
91
|
+
*
|
|
92
|
+
* Warning: If multiple parameter changes are requested, `ip` aborts immediately after any
|
|
93
|
+
* of the changes have failed.
|
|
94
|
+
*
|
|
95
|
+
* This is the only case when `ip` can move the system to an
|
|
96
|
+
* unpredictable state. The solution is to avoid changing several parameters with one `ip link set` call.
|
|
97
|
+
* The modifier `change` is equivalent to `set`.
|
|
98
|
+
*
|
|
99
|
+
* @param options - Parameters options to be passed down to `ip`.
|
|
100
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
101
|
+
*
|
|
102
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
103
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
104
|
+
*/
|
|
105
|
+
export declare function set(options: LinkSetOptions, globalOptions?: GlobalOptions): Promise<Command<LinkSetOptions>>;
|
|
106
|
+
declare const _default: {
|
|
107
|
+
add: typeof add;
|
|
108
|
+
del: typeof del;
|
|
109
|
+
show: typeof show;
|
|
110
|
+
set: typeof set;
|
|
111
|
+
change: typeof set;
|
|
112
|
+
};
|
|
113
|
+
export default _default;
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.set = exports.show = exports.del = exports.add = void 0;
|
|
16
|
+
const command_with_returned_data_1 = __importDefault(require("../common/classes/command-with-returned-data"));
|
|
17
|
+
const command_1 = __importDefault(require("../common/classes/command"));
|
|
18
|
+
const schemas_1 = require("../common/constants/schemas");
|
|
19
|
+
const add_schema_1 = require("./link/add.schema");
|
|
20
|
+
const delete_schema_1 = require("./link/delete.schema");
|
|
21
|
+
const set_schema_1 = require("./link/set.schema");
|
|
22
|
+
const show_schema_1 = require("./link/show.schema");
|
|
23
|
+
/**
|
|
24
|
+
* Adds a virtual link.
|
|
25
|
+
*
|
|
26
|
+
* @param options - Parameters options to be passed down to `ip`.
|
|
27
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
28
|
+
*
|
|
29
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
30
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
*
|
|
34
|
+
* Import module
|
|
35
|
+
* ```
|
|
36
|
+
* import { link } from 'iproutejs';
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* Add a link
|
|
40
|
+
* ```
|
|
41
|
+
* await link.add({
|
|
42
|
+
* link: 'lo',
|
|
43
|
+
* name: 'dummy100',
|
|
44
|
+
* address: '00:11:22:33:44:55',
|
|
45
|
+
* mtu: 1500,
|
|
46
|
+
* type: VirtualLinkTypes.Dummy
|
|
47
|
+
* });
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
function add(options, globalOptions = {}) {
|
|
51
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
const cmd = ['ip', 'link', 'add'];
|
|
53
|
+
const ipCmd = new command_1.default(schemas_1.SchemaIds.LinkAdd, add_schema_1.LinkAddSchema, options, globalOptions, cmd);
|
|
54
|
+
return yield ipCmd.exec();
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
exports.add = add;
|
|
58
|
+
/**
|
|
59
|
+
* Deletes a virtual link.
|
|
60
|
+
*
|
|
61
|
+
* @param options - Parameters options to be passed down to `ip`.
|
|
62
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
63
|
+
*
|
|
64
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
65
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
*
|
|
69
|
+
* Import module
|
|
70
|
+
* ```
|
|
71
|
+
* import { link } from 'iproutejs';
|
|
72
|
+
* ```
|
|
73
|
+
*
|
|
74
|
+
* Delete a link
|
|
75
|
+
* ```
|
|
76
|
+
* await link.del({
|
|
77
|
+
* dev: 'eth0.1@eth0'
|
|
78
|
+
* });
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
function del(options, globalOptions = {}) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
const cmd = ['ip', 'link', 'delete'];
|
|
84
|
+
const ipCmd = new command_1.default(schemas_1.SchemaIds.LinkDelete, delete_schema_1.LinkDeleteSchema, options, globalOptions, cmd);
|
|
85
|
+
return yield ipCmd.exec();
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
exports.del = del;
|
|
89
|
+
/**
|
|
90
|
+
* Display device attributes.
|
|
91
|
+
*
|
|
92
|
+
* @param options - Parameters options to be passed down to `ip`.
|
|
93
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
94
|
+
*
|
|
95
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
96
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
*
|
|
100
|
+
* Import module
|
|
101
|
+
* ```
|
|
102
|
+
* import { link } from 'iproutejs';
|
|
103
|
+
* ```
|
|
104
|
+
*
|
|
105
|
+
* Show link information about the `eth0` device
|
|
106
|
+
* ```
|
|
107
|
+
* const links = await link.show({
|
|
108
|
+
* dev: 'eth0'
|
|
109
|
+
* });
|
|
110
|
+
* ```
|
|
111
|
+
*
|
|
112
|
+
* Shortcut to show all links
|
|
113
|
+
* ```
|
|
114
|
+
* const links = await link.show();
|
|
115
|
+
* const links = await link.show({});
|
|
116
|
+
* ```
|
|
117
|
+
*/
|
|
118
|
+
function show(options = {}, globalOptions = {}) {
|
|
119
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
120
|
+
const cmd = ['ip', 'link', 'show'];
|
|
121
|
+
const ipCmd = new command_with_returned_data_1.default(schemas_1.SchemaIds.LinkShow, show_schema_1.LinkShowSchema, options, Object.assign(Object.assign({}, globalOptions), {
|
|
122
|
+
// Overrides for a better show.
|
|
123
|
+
'-details': true, '-statistics': true, '-json': true }), cmd);
|
|
124
|
+
return yield ipCmd.exec();
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
exports.show = show;
|
|
128
|
+
/**
|
|
129
|
+
* Change device attributes.
|
|
130
|
+
*
|
|
131
|
+
* Warning: If multiple parameter changes are requested, `ip` aborts immediately after any
|
|
132
|
+
* of the changes have failed.
|
|
133
|
+
*
|
|
134
|
+
* This is the only case when `ip` can move the system to an
|
|
135
|
+
* unpredictable state. The solution is to avoid changing several parameters with one `ip link set` call.
|
|
136
|
+
* The modifier `change` is equivalent to `set`.
|
|
137
|
+
*
|
|
138
|
+
* @param options - Parameters options to be passed down to `ip`.
|
|
139
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
140
|
+
*
|
|
141
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
142
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
143
|
+
*/
|
|
144
|
+
function set(options, globalOptions = {}) {
|
|
145
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
146
|
+
const cmd = ['ip', 'link', 'set'];
|
|
147
|
+
const ipCmd = new command_1.default(schemas_1.SchemaIds.LinkSet, set_schema_1.LinkSetSchema, options, globalOptions, cmd);
|
|
148
|
+
return yield ipCmd.exec();
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
exports.set = set;
|
|
152
|
+
exports.default = {
|
|
153
|
+
add,
|
|
154
|
+
del,
|
|
155
|
+
show,
|
|
156
|
+
set,
|
|
157
|
+
change: set
|
|
158
|
+
};
|
|
159
|
+
//# sourceMappingURL=link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link.js","sourceRoot":"","sources":["../../src/commands/link.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,8GAAmF;AACnF,wEAAgE;AAChE,yDAAkE;AAGlE,kDAAwD;AAExD,wDAA2D;AAE3D,kDAAwD;AAOxD,oDAAoD;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,SAAsB,GAAG,CAAC,OAAuB,EACvB,gBAA+B,EAAE;;QAEzD,MAAM,GAAG,GAAG,CAAE,IAAI,EAAE,MAAM,EAAE,KAAK,CAAE,CAAC;QAEpC,MAAM,KAAK,GAAG,IAAI,iBAAO,CACvB,mBAAS,CAAC,OAAO,EACjB,0BAAa,EACb,OAAO,EACP,aAAa,EACb,GAAG,CAAC,CAAC;QAEP,OAAO,MAAM,KAAK,CAAC,IAAI,EAAE,CAAC;IAC5B,CAAC;CAAA;AAbD,kBAaC;AAED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ACH,IAAI;IACJ,GAAG;IACH,MAAM,EAAE,GAAG;CACZ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.interfaces.js","sourceRoot":"","sources":["../../../src/commands/maddress/add.interfaces.ts"],"names":[],"mappings":""}
|