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,268 @@
|
|
|
1
|
+
import Command from '../common/classes/command';
|
|
2
|
+
import { Empty, GlobalOptions, GlobalOptionsWithRequiredFilePath } from '../common/interfaces/common';
|
|
3
|
+
import { RouteGetOptions } from './route/get.interfaces';
|
|
4
|
+
import { RouteInfo, RouteShowOptions } from './route/show.interfaces';
|
|
5
|
+
import { RouteAddOptions } from './route/add.interfaces';
|
|
6
|
+
/**
|
|
7
|
+
* List routes.
|
|
8
|
+
* The command displays the contents of the routing tables or the route(s) selected by some criteria.
|
|
9
|
+
*
|
|
10
|
+
* Warning: Changes to the RPDB made with these commands do not become active immediately.
|
|
11
|
+
* It is assumed that after a script finishes a batch of updates, it flushes the routing cache with
|
|
12
|
+
* `ip route flush cache`.
|
|
13
|
+
*
|
|
14
|
+
* @param options - Parameters options to be passed down to `ip`.
|
|
15
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
16
|
+
*
|
|
17
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
18
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
*
|
|
22
|
+
* Import module
|
|
23
|
+
* ```
|
|
24
|
+
* import { route } from 'iproutejs';
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* Show routes from all tables
|
|
28
|
+
* ```
|
|
29
|
+
* const routes = await route.show({
|
|
30
|
+
* table: RouteRoutingTables.All
|
|
31
|
+
* });
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export declare function show(options?: RouteShowOptions, globalOptions?: GlobalOptions): Promise<Command<RouteShowOptions> | RouteInfo[]>;
|
|
35
|
+
/**
|
|
36
|
+
* Flush routing tables this command flushes routes selected by some criteria.
|
|
37
|
+
*
|
|
38
|
+
* The arguments have the same syntax and semantics as the arguments of `ip route show`, but routing tables are
|
|
39
|
+
* not listed but purged.
|
|
40
|
+
*
|
|
41
|
+
* @param options - Parameters options to be passed down to `ip`.
|
|
42
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
43
|
+
*
|
|
44
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
45
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
*
|
|
49
|
+
* Import module
|
|
50
|
+
* ```
|
|
51
|
+
* import { route } from 'iproutejs';
|
|
52
|
+
* ```
|
|
53
|
+
*
|
|
54
|
+
* Flush the table cache
|
|
55
|
+
* ```
|
|
56
|
+
* await route.flush({
|
|
57
|
+
* table: RouteRoutingTables.Cache
|
|
58
|
+
* });
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
export declare function flush(options: RouteShowOptions, globalOptions?: GlobalOptions): Promise<Command<RouteShowOptions>>;
|
|
62
|
+
/**
|
|
63
|
+
* Save routing table information.
|
|
64
|
+
*
|
|
65
|
+
* @param options - Parameters options to be passed down to `ip`.
|
|
66
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
67
|
+
*
|
|
68
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
69
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
70
|
+
*/
|
|
71
|
+
export declare function save(options: RouteShowOptions | undefined, globalOptions: GlobalOptionsWithRequiredFilePath): Promise<Command<RouteShowOptions>>;
|
|
72
|
+
/**
|
|
73
|
+
* Restore routing table information from a file previously generated by {@link save}.
|
|
74
|
+
*
|
|
75
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
76
|
+
*
|
|
77
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
78
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
79
|
+
*/
|
|
80
|
+
export declare function restore(globalOptions: GlobalOptionsWithRequiredFilePath): Promise<Command<Empty>>;
|
|
81
|
+
/**
|
|
82
|
+
* Get a single route.
|
|
83
|
+
*
|
|
84
|
+
* This command gets a single route to a destination and prints its contents exactly as the kernel sees it.
|
|
85
|
+
*
|
|
86
|
+
* @param options - Parameters options to be passed down to `ip`.
|
|
87
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
88
|
+
*
|
|
89
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
90
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
91
|
+
*/
|
|
92
|
+
export declare function get(options: RouteGetOptions, globalOptions?: GlobalOptions): Promise<Command<RouteGetOptions> | RouteInfo[]>;
|
|
93
|
+
/**
|
|
94
|
+
* Add new route.
|
|
95
|
+
*
|
|
96
|
+
* @param options - Parameters options to be passed down to `ip`.
|
|
97
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
98
|
+
*
|
|
99
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
100
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
*
|
|
104
|
+
* Import module
|
|
105
|
+
* ```
|
|
106
|
+
* import { route } from 'iproutejs';
|
|
107
|
+
* ```
|
|
108
|
+
*
|
|
109
|
+
* Unicast type route (the default if not specified)
|
|
110
|
+
* ```
|
|
111
|
+
* await route.add({
|
|
112
|
+
* to: '10.0.0.0/24',
|
|
113
|
+
* via: {
|
|
114
|
+
* address: '192.168.56.1'
|
|
115
|
+
* }
|
|
116
|
+
* });
|
|
117
|
+
* ```
|
|
118
|
+
*
|
|
119
|
+
* Multipath route with load balance between devices
|
|
120
|
+
* ```
|
|
121
|
+
* await route.add({
|
|
122
|
+
* to: 'default',
|
|
123
|
+
* scope: AddressScopes.Global,
|
|
124
|
+
* nexthops: [{
|
|
125
|
+
* nexthop: true,
|
|
126
|
+
* dev: 'ppp0'
|
|
127
|
+
* },
|
|
128
|
+
* {
|
|
129
|
+
* nexthop: true,
|
|
130
|
+
* dev: 'ppp1'
|
|
131
|
+
* }]
|
|
132
|
+
* });
|
|
133
|
+
* ```
|
|
134
|
+
*
|
|
135
|
+
* A NAT route
|
|
136
|
+
* ```
|
|
137
|
+
* await route.add({
|
|
138
|
+
* type: RoutingTableTypes.Nat,
|
|
139
|
+
* to: '10.0.0.0/24',
|
|
140
|
+
* table: 300,
|
|
141
|
+
* via: {
|
|
142
|
+
* address: '192.168.56.1'
|
|
143
|
+
* }
|
|
144
|
+
* });
|
|
145
|
+
* ```
|
|
146
|
+
*/
|
|
147
|
+
export declare function add(options: RouteAddOptions, globalOptions?: GlobalOptions): Promise<Command<RouteAddOptions>>;
|
|
148
|
+
/**
|
|
149
|
+
* Delete route.
|
|
150
|
+
*
|
|
151
|
+
* @param options - Parameters options to be passed down to `ip`.
|
|
152
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
153
|
+
*
|
|
154
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
155
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
156
|
+
*
|
|
157
|
+
* @example
|
|
158
|
+
*
|
|
159
|
+
* Import module
|
|
160
|
+
* ```
|
|
161
|
+
* import { route } from 'iproutejs';
|
|
162
|
+
* ```
|
|
163
|
+
*
|
|
164
|
+
* Delete multipath route with load balance between devices
|
|
165
|
+
* ```
|
|
166
|
+
* await route.del({
|
|
167
|
+
* to: 'default',
|
|
168
|
+
* scope: AddressScopes.Global,
|
|
169
|
+
* nexthops: [{
|
|
170
|
+
* nexthop: true,
|
|
171
|
+
* dev: 'ppp0'
|
|
172
|
+
* },
|
|
173
|
+
* {
|
|
174
|
+
* nexthop: true,
|
|
175
|
+
* dev: 'ppp1'
|
|
176
|
+
* }]
|
|
177
|
+
* });
|
|
178
|
+
* ```
|
|
179
|
+
*/
|
|
180
|
+
export declare function del(options: RouteAddOptions, globalOptions?: GlobalOptions): Promise<Command<RouteAddOptions>>;
|
|
181
|
+
/**
|
|
182
|
+
* Change route.
|
|
183
|
+
*
|
|
184
|
+
* @param options - Parameters options to be passed down to `ip`.
|
|
185
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
186
|
+
*
|
|
187
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
188
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
189
|
+
*/
|
|
190
|
+
export declare function change(options: RouteAddOptions, globalOptions?: GlobalOptions): Promise<Command<RouteAddOptions>>;
|
|
191
|
+
/**
|
|
192
|
+
* Append route.
|
|
193
|
+
*
|
|
194
|
+
* @param options - Parameters options to be passed down to `ip`.
|
|
195
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
196
|
+
*
|
|
197
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
198
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
199
|
+
*/
|
|
200
|
+
export declare function append(options: RouteAddOptions, globalOptions?: GlobalOptions): Promise<Command<RouteAddOptions>>;
|
|
201
|
+
/**
|
|
202
|
+
* Change or add new one.
|
|
203
|
+
*
|
|
204
|
+
* @param options - Parameters options to be passed down to `ip`.
|
|
205
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
206
|
+
*
|
|
207
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
208
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
209
|
+
*
|
|
210
|
+
* @example
|
|
211
|
+
*
|
|
212
|
+
* Import module
|
|
213
|
+
* ```
|
|
214
|
+
* import { route } from 'iproutejs';
|
|
215
|
+
* ```
|
|
216
|
+
*
|
|
217
|
+
* Unicast type route (the default if not specified)
|
|
218
|
+
* ```
|
|
219
|
+
* await route.add({
|
|
220
|
+
* to: '10.0.0.0/24',
|
|
221
|
+
* via: {
|
|
222
|
+
* address: '192.168.56.1'
|
|
223
|
+
* }
|
|
224
|
+
* });
|
|
225
|
+
* ```
|
|
226
|
+
*
|
|
227
|
+
* Multipath route with load balance between devices
|
|
228
|
+
* ```
|
|
229
|
+
* await route.add({
|
|
230
|
+
* to: 'default',
|
|
231
|
+
* scope: AddressScopes.Global,
|
|
232
|
+
* nexthops: [{
|
|
233
|
+
* nexthop: true,
|
|
234
|
+
* dev: 'ppp0'
|
|
235
|
+
* },
|
|
236
|
+
* {
|
|
237
|
+
* nexthop: true,
|
|
238
|
+
* dev: 'ppp1'
|
|
239
|
+
* }]
|
|
240
|
+
* });
|
|
241
|
+
* ```
|
|
242
|
+
*
|
|
243
|
+
* A NAT route
|
|
244
|
+
* ```
|
|
245
|
+
* await route.add({
|
|
246
|
+
* type: RoutingTableTypes.Nat,
|
|
247
|
+
* to: '10.0.0.0/24',
|
|
248
|
+
* table: 300,
|
|
249
|
+
* via: {
|
|
250
|
+
* address: '192.168.56.1'
|
|
251
|
+
* }
|
|
252
|
+
* });
|
|
253
|
+
* ```
|
|
254
|
+
*/
|
|
255
|
+
export declare function replace(options: RouteAddOptions, globalOptions?: GlobalOptions): Promise<Command<RouteAddOptions>>;
|
|
256
|
+
declare const _default: {
|
|
257
|
+
show: typeof show;
|
|
258
|
+
flush: typeof flush;
|
|
259
|
+
save: typeof save;
|
|
260
|
+
restore: typeof restore;
|
|
261
|
+
get: typeof get;
|
|
262
|
+
add: typeof add;
|
|
263
|
+
del: typeof del;
|
|
264
|
+
change: typeof change;
|
|
265
|
+
append: typeof append;
|
|
266
|
+
replace: typeof replace;
|
|
267
|
+
};
|
|
268
|
+
export default _default;
|
|
@@ -0,0 +1,362 @@
|
|
|
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.replace = exports.append = exports.change = exports.del = exports.add = exports.get = exports.restore = exports.save = exports.flush = exports.show = void 0;
|
|
16
|
+
const command_with_redirect_from_filepath_1 = __importDefault(require("../common/classes/command-with-redirect-from-filepath"));
|
|
17
|
+
const command_with_redirect_to_filepath_1 = __importDefault(require("../common/classes/command-with-redirect-to-filepath"));
|
|
18
|
+
const command_with_returned_data_1 = __importDefault(require("../common/classes/command-with-returned-data"));
|
|
19
|
+
const command_1 = __importDefault(require("../common/classes/command"));
|
|
20
|
+
const schemas_1 = require("../common/constants/schemas");
|
|
21
|
+
const get_schema_1 = require("./route/get.schema");
|
|
22
|
+
const show_schema_1 = require("./route/show.schema");
|
|
23
|
+
const add_schema_1 = require("./route/add.schema");
|
|
24
|
+
/**
|
|
25
|
+
* List routes.
|
|
26
|
+
* The command displays the contents of the routing tables or the route(s) selected by some criteria.
|
|
27
|
+
*
|
|
28
|
+
* Warning: Changes to the RPDB made with these commands do not become active immediately.
|
|
29
|
+
* It is assumed that after a script finishes a batch of updates, it flushes the routing cache with
|
|
30
|
+
* `ip route flush cache`.
|
|
31
|
+
*
|
|
32
|
+
* @param options - Parameters options to be passed down to `ip`.
|
|
33
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
34
|
+
*
|
|
35
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
36
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
*
|
|
40
|
+
* Import module
|
|
41
|
+
* ```
|
|
42
|
+
* import { route } from 'iproutejs';
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* Show routes from all tables
|
|
46
|
+
* ```
|
|
47
|
+
* const routes = await route.show({
|
|
48
|
+
* table: RouteRoutingTables.All
|
|
49
|
+
* });
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
function show(options = {}, globalOptions = {}) {
|
|
53
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
const cmd = ['ip', 'route', 'show'];
|
|
55
|
+
const ipCmd = new command_with_returned_data_1.default(schemas_1.SchemaIds.RouteShow, show_schema_1.RouteShowSchema, options, Object.assign(Object.assign({}, globalOptions), {
|
|
56
|
+
// Overrides for a better show.
|
|
57
|
+
'-details': true, '-statistics': true, '-json': true }), cmd);
|
|
58
|
+
return yield ipCmd.exec();
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
exports.show = show;
|
|
62
|
+
/**
|
|
63
|
+
* Flush routing tables this command flushes routes selected by some criteria.
|
|
64
|
+
*
|
|
65
|
+
* The arguments have the same syntax and semantics as the arguments of `ip route show`, but routing tables are
|
|
66
|
+
* not listed but purged.
|
|
67
|
+
*
|
|
68
|
+
* @param options - Parameters options to be passed down to `ip`.
|
|
69
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
70
|
+
*
|
|
71
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
72
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
*
|
|
76
|
+
* Import module
|
|
77
|
+
* ```
|
|
78
|
+
* import { route } from 'iproutejs';
|
|
79
|
+
* ```
|
|
80
|
+
*
|
|
81
|
+
* Flush the table cache
|
|
82
|
+
* ```
|
|
83
|
+
* await route.flush({
|
|
84
|
+
* table: RouteRoutingTables.Cache
|
|
85
|
+
* });
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
function flush(options, globalOptions = {}) {
|
|
89
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
90
|
+
const cmd = ['ip', 'route', 'flush'];
|
|
91
|
+
const ipCmd = new command_1.default(schemas_1.SchemaIds.RouteShow, show_schema_1.RouteShowSchema, options, Object.assign(Object.assign({}, globalOptions), {
|
|
92
|
+
// Overrides for a better show.
|
|
93
|
+
'-details': true, '-statistics': true, '-json': true }), cmd);
|
|
94
|
+
return yield ipCmd.exec();
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
exports.flush = flush;
|
|
98
|
+
/**
|
|
99
|
+
* Save routing table information.
|
|
100
|
+
*
|
|
101
|
+
* @param options - Parameters options to be passed down to `ip`.
|
|
102
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
103
|
+
*
|
|
104
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
105
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
106
|
+
*/
|
|
107
|
+
function save(options = {}, globalOptions) {
|
|
108
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
109
|
+
const cmd = ['ip', 'route', 'save'];
|
|
110
|
+
const ipCmd = new command_with_redirect_to_filepath_1.default(schemas_1.SchemaIds.RouteShow, show_schema_1.RouteShowSchema, options, globalOptions, cmd);
|
|
111
|
+
return yield ipCmd.exec();
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
exports.save = save;
|
|
115
|
+
/**
|
|
116
|
+
* Restore routing table information from a file previously generated by {@link save}.
|
|
117
|
+
*
|
|
118
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
119
|
+
*
|
|
120
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
121
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
122
|
+
*/
|
|
123
|
+
function restore(globalOptions) {
|
|
124
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
125
|
+
const cmd = ['ip', 'route', 'restore'];
|
|
126
|
+
const ipCmd = new command_with_redirect_from_filepath_1.default(schemas_1.SchemaIds.Empty, schemas_1.EmptySchema, {}, globalOptions, cmd);
|
|
127
|
+
return yield ipCmd.exec();
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
exports.restore = restore;
|
|
131
|
+
/**
|
|
132
|
+
* Get a single route.
|
|
133
|
+
*
|
|
134
|
+
* This command gets a single route to a destination and prints its contents exactly as the kernel sees it.
|
|
135
|
+
*
|
|
136
|
+
* @param options - Parameters options to be passed down to `ip`.
|
|
137
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
138
|
+
*
|
|
139
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
140
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
141
|
+
*/
|
|
142
|
+
function get(options, globalOptions = {}) {
|
|
143
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
144
|
+
const cmd = ['ip', 'route', 'get'];
|
|
145
|
+
const ipCmd = new command_with_returned_data_1.default(schemas_1.SchemaIds.RouteShow, get_schema_1.RouteGetSchema, options, Object.assign(Object.assign({}, globalOptions), {
|
|
146
|
+
// Overrides for a better show.
|
|
147
|
+
'-details': true, '-statistics': true, '-json': true }), cmd);
|
|
148
|
+
return yield ipCmd.exec();
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
exports.get = get;
|
|
152
|
+
/**
|
|
153
|
+
* Add new route.
|
|
154
|
+
*
|
|
155
|
+
* @param options - Parameters options to be passed down to `ip`.
|
|
156
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
157
|
+
*
|
|
158
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
159
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
160
|
+
*
|
|
161
|
+
* @example
|
|
162
|
+
*
|
|
163
|
+
* Import module
|
|
164
|
+
* ```
|
|
165
|
+
* import { route } from 'iproutejs';
|
|
166
|
+
* ```
|
|
167
|
+
*
|
|
168
|
+
* Unicast type route (the default if not specified)
|
|
169
|
+
* ```
|
|
170
|
+
* await route.add({
|
|
171
|
+
* to: '10.0.0.0/24',
|
|
172
|
+
* via: {
|
|
173
|
+
* address: '192.168.56.1'
|
|
174
|
+
* }
|
|
175
|
+
* });
|
|
176
|
+
* ```
|
|
177
|
+
*
|
|
178
|
+
* Multipath route with load balance between devices
|
|
179
|
+
* ```
|
|
180
|
+
* await route.add({
|
|
181
|
+
* to: 'default',
|
|
182
|
+
* scope: AddressScopes.Global,
|
|
183
|
+
* nexthops: [{
|
|
184
|
+
* nexthop: true,
|
|
185
|
+
* dev: 'ppp0'
|
|
186
|
+
* },
|
|
187
|
+
* {
|
|
188
|
+
* nexthop: true,
|
|
189
|
+
* dev: 'ppp1'
|
|
190
|
+
* }]
|
|
191
|
+
* });
|
|
192
|
+
* ```
|
|
193
|
+
*
|
|
194
|
+
* A NAT route
|
|
195
|
+
* ```
|
|
196
|
+
* await route.add({
|
|
197
|
+
* type: RoutingTableTypes.Nat,
|
|
198
|
+
* to: '10.0.0.0/24',
|
|
199
|
+
* table: 300,
|
|
200
|
+
* via: {
|
|
201
|
+
* address: '192.168.56.1'
|
|
202
|
+
* }
|
|
203
|
+
* });
|
|
204
|
+
* ```
|
|
205
|
+
*/
|
|
206
|
+
function add(options, globalOptions = {}) {
|
|
207
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
208
|
+
const cmd = ['ip', 'route', 'add'];
|
|
209
|
+
const ipCmd = new command_1.default(schemas_1.SchemaIds.RouteAdd, add_schema_1.RouteAddSchema, options, globalOptions, cmd);
|
|
210
|
+
return yield ipCmd.exec();
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
exports.add = add;
|
|
214
|
+
/**
|
|
215
|
+
* Delete route.
|
|
216
|
+
*
|
|
217
|
+
* @param options - Parameters options to be passed down to `ip`.
|
|
218
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
219
|
+
*
|
|
220
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
221
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
222
|
+
*
|
|
223
|
+
* @example
|
|
224
|
+
*
|
|
225
|
+
* Import module
|
|
226
|
+
* ```
|
|
227
|
+
* import { route } from 'iproutejs';
|
|
228
|
+
* ```
|
|
229
|
+
*
|
|
230
|
+
* Delete multipath route with load balance between devices
|
|
231
|
+
* ```
|
|
232
|
+
* await route.del({
|
|
233
|
+
* to: 'default',
|
|
234
|
+
* scope: AddressScopes.Global,
|
|
235
|
+
* nexthops: [{
|
|
236
|
+
* nexthop: true,
|
|
237
|
+
* dev: 'ppp0'
|
|
238
|
+
* },
|
|
239
|
+
* {
|
|
240
|
+
* nexthop: true,
|
|
241
|
+
* dev: 'ppp1'
|
|
242
|
+
* }]
|
|
243
|
+
* });
|
|
244
|
+
* ```
|
|
245
|
+
*/
|
|
246
|
+
function del(options, globalOptions = {}) {
|
|
247
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
248
|
+
const cmd = ['ip', 'route', 'delete'];
|
|
249
|
+
const ipCmd = new command_1.default(schemas_1.SchemaIds.RouteAdd, add_schema_1.RouteAddSchema, options, globalOptions, cmd);
|
|
250
|
+
return yield ipCmd.exec();
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
exports.del = del;
|
|
254
|
+
/**
|
|
255
|
+
* Change route.
|
|
256
|
+
*
|
|
257
|
+
* @param options - Parameters options to be passed down to `ip`.
|
|
258
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
259
|
+
*
|
|
260
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
261
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
262
|
+
*/
|
|
263
|
+
function change(options, globalOptions = {}) {
|
|
264
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
265
|
+
const cmd = ['ip', 'route', 'change'];
|
|
266
|
+
const ipCmd = new command_1.default(schemas_1.SchemaIds.RouteAdd, add_schema_1.RouteAddSchema, options, globalOptions, cmd);
|
|
267
|
+
return yield ipCmd.exec();
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
exports.change = change;
|
|
271
|
+
/**
|
|
272
|
+
* Append route.
|
|
273
|
+
*
|
|
274
|
+
* @param options - Parameters options to be passed down to `ip`.
|
|
275
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
276
|
+
*
|
|
277
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
278
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
279
|
+
*/
|
|
280
|
+
function append(options, globalOptions = {}) {
|
|
281
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
282
|
+
const cmd = ['ip', 'route', 'append'];
|
|
283
|
+
const ipCmd = new command_1.default(schemas_1.SchemaIds.RouteAdd, add_schema_1.RouteAddSchema, options, globalOptions, cmd);
|
|
284
|
+
return yield ipCmd.exec();
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
exports.append = append;
|
|
288
|
+
/**
|
|
289
|
+
* Change or add new one.
|
|
290
|
+
*
|
|
291
|
+
* @param options - Parameters options to be passed down to `ip`.
|
|
292
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
293
|
+
*
|
|
294
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
295
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
296
|
+
*
|
|
297
|
+
* @example
|
|
298
|
+
*
|
|
299
|
+
* Import module
|
|
300
|
+
* ```
|
|
301
|
+
* import { route } from 'iproutejs';
|
|
302
|
+
* ```
|
|
303
|
+
*
|
|
304
|
+
* Unicast type route (the default if not specified)
|
|
305
|
+
* ```
|
|
306
|
+
* await route.add({
|
|
307
|
+
* to: '10.0.0.0/24',
|
|
308
|
+
* via: {
|
|
309
|
+
* address: '192.168.56.1'
|
|
310
|
+
* }
|
|
311
|
+
* });
|
|
312
|
+
* ```
|
|
313
|
+
*
|
|
314
|
+
* Multipath route with load balance between devices
|
|
315
|
+
* ```
|
|
316
|
+
* await route.add({
|
|
317
|
+
* to: 'default',
|
|
318
|
+
* scope: AddressScopes.Global,
|
|
319
|
+
* nexthops: [{
|
|
320
|
+
* nexthop: true,
|
|
321
|
+
* dev: 'ppp0'
|
|
322
|
+
* },
|
|
323
|
+
* {
|
|
324
|
+
* nexthop: true,
|
|
325
|
+
* dev: 'ppp1'
|
|
326
|
+
* }]
|
|
327
|
+
* });
|
|
328
|
+
* ```
|
|
329
|
+
*
|
|
330
|
+
* A NAT route
|
|
331
|
+
* ```
|
|
332
|
+
* await route.add({
|
|
333
|
+
* type: RoutingTableTypes.Nat,
|
|
334
|
+
* to: '10.0.0.0/24',
|
|
335
|
+
* table: 300,
|
|
336
|
+
* via: {
|
|
337
|
+
* address: '192.168.56.1'
|
|
338
|
+
* }
|
|
339
|
+
* });
|
|
340
|
+
* ```
|
|
341
|
+
*/
|
|
342
|
+
function replace(options, globalOptions = {}) {
|
|
343
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
344
|
+
const cmd = ['ip', 'route', 'replace'];
|
|
345
|
+
const ipCmd = new command_1.default(schemas_1.SchemaIds.RouteAdd, add_schema_1.RouteAddSchema, options, globalOptions, cmd);
|
|
346
|
+
return yield ipCmd.exec();
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
exports.replace = replace;
|
|
350
|
+
exports.default = {
|
|
351
|
+
show,
|
|
352
|
+
flush,
|
|
353
|
+
save,
|
|
354
|
+
restore,
|
|
355
|
+
get,
|
|
356
|
+
add,
|
|
357
|
+
del,
|
|
358
|
+
change,
|
|
359
|
+
append,
|
|
360
|
+
replace
|
|
361
|
+
};
|
|
362
|
+
//# sourceMappingURL=route.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route.js","sourceRoot":"","sources":["../../src/commands/route.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { RoutingTables } from '../rule.constants';
|
|
2
|
+
import { RuleShowOptions } from './show.interfaces';
|
|
3
|
+
/**
|
|
4
|
+
* Rule add options.
|
|
5
|
+
* @category Interfaces
|
|
6
|
+
*/
|
|
7
|
+
export interface RuleAddOptions extends RuleShowOptions {
|
|
8
|
+
/**
|
|
9
|
+
* The routing table identifier to lookup if the rule selector matches.
|
|
10
|
+
* It is also possible to use lookup instead of table.
|
|
11
|
+
*/
|
|
12
|
+
table?: number | RoutingTables;
|
|
13
|
+
/**
|
|
14
|
+
* The routing protocol who installed the rule in question.
|
|
15
|
+
* As an example when zebra installs a rule it would get RTPROT_ZEBRA as the installing protocol.
|
|
16
|
+
*/
|
|
17
|
+
protocol?: string | number;
|
|
18
|
+
/**
|
|
19
|
+
* The base of the IP address block to translate (for source addresses).
|
|
20
|
+
* The ADDRESS may be either the start of the block of NAT addresses (selected by NAT routes) or a local host
|
|
21
|
+
* address (or even zero).
|
|
22
|
+
*
|
|
23
|
+
* In the last case the router does not translate the packets, but masquerades them to this address.
|
|
24
|
+
* Using `map-to` instead of `nat` means the same thing.
|
|
25
|
+
*/
|
|
26
|
+
nat?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Realms to select if the rule matched and the routing table lookup succeeded.
|
|
29
|
+
* Realm TO is only used if the route did not select any realm.
|
|
30
|
+
*/
|
|
31
|
+
realms?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Attribute is used to jump to a rule with a specified priority.
|
|
34
|
+
* It essentially alters the typical sequence in which rules are evaluated.
|
|
35
|
+
*/
|
|
36
|
+
goto?: number;
|
|
37
|
+
/** Reject routing decisions that have a prefix length of NUMBER or less. */
|
|
38
|
+
suppress_prefixlength?: number;
|
|
39
|
+
/** Reject routing decisions that use a device belonging to the interface group GROUP. */
|
|
40
|
+
suppress_ifgroup?: number;
|
|
41
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.interfaces.js","sourceRoot":"","sources":["../../../src/commands/rule/add.interfaces.ts"],"names":[],"mappings":""}
|