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,182 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RuleAddSchema = void 0;
|
|
4
|
+
const schemas_1 = require("../../common/constants/schemas");
|
|
5
|
+
const rule_constants_1 = require("../rule.constants");
|
|
6
|
+
exports.RuleAddSchema = {
|
|
7
|
+
$id: schemas_1.SchemaIds.RuleAdd,
|
|
8
|
+
type: 'object',
|
|
9
|
+
required: [],
|
|
10
|
+
properties: {
|
|
11
|
+
type: {
|
|
12
|
+
type: 'string',
|
|
13
|
+
enum: Object.values(rule_constants_1.RuleTypes),
|
|
14
|
+
nullable: true
|
|
15
|
+
},
|
|
16
|
+
not: {
|
|
17
|
+
type: 'boolean',
|
|
18
|
+
enum: [true],
|
|
19
|
+
nullable: true
|
|
20
|
+
},
|
|
21
|
+
from: {
|
|
22
|
+
type: 'string',
|
|
23
|
+
format: 'ip-with-optional-mask',
|
|
24
|
+
nullable: true
|
|
25
|
+
},
|
|
26
|
+
to: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
format: 'ip-with-optional-mask',
|
|
29
|
+
nullable: true
|
|
30
|
+
},
|
|
31
|
+
tos: {
|
|
32
|
+
type: 'integer',
|
|
33
|
+
nullable: true,
|
|
34
|
+
minimum: 0,
|
|
35
|
+
maximum: 255
|
|
36
|
+
},
|
|
37
|
+
fwmark: {
|
|
38
|
+
type: 'string',
|
|
39
|
+
nullable: true,
|
|
40
|
+
pattern: '^(0x[0-9a-fA-F]+|[0-9]+)(/(0x[0-9a-fA-F]+|[0-9]+))?$'
|
|
41
|
+
},
|
|
42
|
+
iif: {
|
|
43
|
+
type: 'string',
|
|
44
|
+
minLength: 1,
|
|
45
|
+
maxLength: 15,
|
|
46
|
+
nullable: true
|
|
47
|
+
},
|
|
48
|
+
oif: {
|
|
49
|
+
type: 'string',
|
|
50
|
+
minLength: 1,
|
|
51
|
+
maxLength: 15,
|
|
52
|
+
nullable: true
|
|
53
|
+
},
|
|
54
|
+
l3mdev: {
|
|
55
|
+
type: 'boolean',
|
|
56
|
+
enum: [true],
|
|
57
|
+
nullable: true
|
|
58
|
+
},
|
|
59
|
+
uidrange: {
|
|
60
|
+
type: 'string',
|
|
61
|
+
minLength: 1,
|
|
62
|
+
pattern: '^[0-9]+-[0-9]+$',
|
|
63
|
+
nullable: true
|
|
64
|
+
},
|
|
65
|
+
ipproto: {
|
|
66
|
+
type: ['string', 'integer'],
|
|
67
|
+
nullable: true,
|
|
68
|
+
oneOf: [
|
|
69
|
+
{
|
|
70
|
+
type: 'string',
|
|
71
|
+
minLength: 1,
|
|
72
|
+
nullable: true
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
type: 'integer',
|
|
76
|
+
minimum: 0,
|
|
77
|
+
nullable: true
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
sport: {
|
|
82
|
+
type: ['string', 'integer'],
|
|
83
|
+
nullable: true,
|
|
84
|
+
oneOf: [
|
|
85
|
+
{
|
|
86
|
+
type: 'string',
|
|
87
|
+
pattern: '^[0-9]+-[0-9]+$',
|
|
88
|
+
nullable: true
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
type: 'integer',
|
|
92
|
+
minimum: 0,
|
|
93
|
+
nullable: true
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
dport: {
|
|
98
|
+
type: ['string', 'integer'],
|
|
99
|
+
nullable: true,
|
|
100
|
+
oneOf: [
|
|
101
|
+
{
|
|
102
|
+
type: 'string',
|
|
103
|
+
pattern: '^[0-9]+-[0-9]+$',
|
|
104
|
+
nullable: true
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
type: 'integer',
|
|
108
|
+
minimum: 0,
|
|
109
|
+
nullable: true
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
preference: {
|
|
114
|
+
type: 'integer',
|
|
115
|
+
minimum: 0,
|
|
116
|
+
nullable: true
|
|
117
|
+
},
|
|
118
|
+
tun_id: {
|
|
119
|
+
type: 'integer',
|
|
120
|
+
minimum: 0,
|
|
121
|
+
nullable: true
|
|
122
|
+
},
|
|
123
|
+
table: {
|
|
124
|
+
type: ['string', 'integer'],
|
|
125
|
+
nullable: true,
|
|
126
|
+
oneOf: [
|
|
127
|
+
{
|
|
128
|
+
type: 'string',
|
|
129
|
+
enum: Object.values(rule_constants_1.RoutingTables),
|
|
130
|
+
nullable: true
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
type: 'integer',
|
|
134
|
+
minimum: 0,
|
|
135
|
+
nullable: true
|
|
136
|
+
}
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
protocol: {
|
|
140
|
+
type: ['string', 'integer'],
|
|
141
|
+
nullable: true,
|
|
142
|
+
oneOf: [
|
|
143
|
+
{
|
|
144
|
+
type: 'string',
|
|
145
|
+
minLength: 1,
|
|
146
|
+
nullable: true
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
type: 'integer',
|
|
150
|
+
minimum: 0,
|
|
151
|
+
nullable: true
|
|
152
|
+
}
|
|
153
|
+
]
|
|
154
|
+
},
|
|
155
|
+
nat: {
|
|
156
|
+
type: 'string',
|
|
157
|
+
format: 'ip',
|
|
158
|
+
nullable: true
|
|
159
|
+
},
|
|
160
|
+
realms: {
|
|
161
|
+
type: 'string',
|
|
162
|
+
pattern: '^[0-9]+(/[0-9]+)?$',
|
|
163
|
+
nullable: true
|
|
164
|
+
},
|
|
165
|
+
goto: {
|
|
166
|
+
type: 'integer',
|
|
167
|
+
minimum: 0,
|
|
168
|
+
nullable: true
|
|
169
|
+
},
|
|
170
|
+
suppress_prefixlength: {
|
|
171
|
+
type: 'integer',
|
|
172
|
+
minimum: 0,
|
|
173
|
+
nullable: true
|
|
174
|
+
},
|
|
175
|
+
suppress_ifgroup: {
|
|
176
|
+
type: 'integer',
|
|
177
|
+
minimum: 0,
|
|
178
|
+
nullable: true
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
//# sourceMappingURL=add.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.schema.js","sourceRoot":"","sources":["../../../src/commands/rule/add.schema.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { RoutingTables, RuleTypes } from '../rule.constants';
|
|
2
|
+
/**
|
|
3
|
+
* Rule show options.
|
|
4
|
+
* @category Interfaces
|
|
5
|
+
*/
|
|
6
|
+
export interface RuleShowOptions {
|
|
7
|
+
/** The type of this rule. */
|
|
8
|
+
type?: RuleTypes;
|
|
9
|
+
/** Invert the rule. */
|
|
10
|
+
not?: true;
|
|
11
|
+
/** Select the source prefix to match. */
|
|
12
|
+
from?: string;
|
|
13
|
+
/** Select the destination prefix to match. */
|
|
14
|
+
to?: string;
|
|
15
|
+
/** Select the TOS value to match. */
|
|
16
|
+
tos?: number;
|
|
17
|
+
/** Select the fwmark value to match. */
|
|
18
|
+
fwmark?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Select the incoming device to match.
|
|
21
|
+
*
|
|
22
|
+
* If the interface is loopback, the rule only matches packets originating from this host.
|
|
23
|
+
* This means that you may create separate routing tables for forwarded and local packets and, hence,
|
|
24
|
+
* completely segregate them.
|
|
25
|
+
*/
|
|
26
|
+
iif?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Sselect the outgoing device to match.
|
|
29
|
+
* The outgoing interface is only available for packets originating from local sockets that are bound to a device.
|
|
30
|
+
*/
|
|
31
|
+
oif?: string;
|
|
32
|
+
/**
|
|
33
|
+
* The priority of this rule.
|
|
34
|
+
*
|
|
35
|
+
* PREFERENCE is an unsigned integer value, higher number means lower priority, and rules get processed in
|
|
36
|
+
* order of increasing number.
|
|
37
|
+
*
|
|
38
|
+
* Each rule should have an explicitly set unique priority value. The options preference and order are synonyms
|
|
39
|
+
* with priority.
|
|
40
|
+
*/
|
|
41
|
+
preference?: number;
|
|
42
|
+
/** Pertains to layer 3 master device-based routing, particularly relevant when using Virtual Routing and Forwarding (VRF) tables. */
|
|
43
|
+
l3mdev?: true;
|
|
44
|
+
/** Select the uid value to match. */
|
|
45
|
+
uidrange?: string;
|
|
46
|
+
/** Select the ip protocol value to match. */
|
|
47
|
+
ipproto?: string | number;
|
|
48
|
+
/**
|
|
49
|
+
* Select the source port value to match.
|
|
50
|
+
* Supports port range.
|
|
51
|
+
*/
|
|
52
|
+
sport?: string | number;
|
|
53
|
+
/**
|
|
54
|
+
* Select the destination port value to match.
|
|
55
|
+
* Supports port range.
|
|
56
|
+
*/
|
|
57
|
+
dport?: string | number;
|
|
58
|
+
/**
|
|
59
|
+
* Attribute is used to match packets based on their tunnel ID, typically relevant for
|
|
60
|
+
* VXLAN (Virtual eXtensible Local Area Network) or other tunneling protocols that utilize tunnel IDs.
|
|
61
|
+
* The tunnel ID helps identify individual tunnels in scenarios where multiple tunnels are used.
|
|
62
|
+
*/
|
|
63
|
+
tun_id?: number;
|
|
64
|
+
/**
|
|
65
|
+
* The routing table identifier to lookup if the rule selector matches.
|
|
66
|
+
* It is also possible to use lookup instead of table.
|
|
67
|
+
*/
|
|
68
|
+
table?: number | RoutingTables;
|
|
69
|
+
/**
|
|
70
|
+
* The routing protocol who installed the rule in question.
|
|
71
|
+
* As an example when zebra installs a rule it would get RTPROT_ZEBRA as the installing protocol.
|
|
72
|
+
*/
|
|
73
|
+
protocol?: string | number;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Rule info.
|
|
77
|
+
* TODO: Need help to build this undocumented & comprehensive interface.
|
|
78
|
+
*
|
|
79
|
+
* @category Interfaces
|
|
80
|
+
*/
|
|
81
|
+
export interface RuleInfo {
|
|
82
|
+
priority: number;
|
|
83
|
+
src: string;
|
|
84
|
+
table: RoutingTables | string;
|
|
85
|
+
protocol: string | number;
|
|
86
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"show.interfaces.js","sourceRoot":"","sources":["../../../src/commands/rule/show.interfaces.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RuleShowSchema = void 0;
|
|
4
|
+
const schemas_1 = require("../../common/constants/schemas");
|
|
5
|
+
const rule_constants_1 = require("../rule.constants");
|
|
6
|
+
exports.RuleShowSchema = {
|
|
7
|
+
$id: schemas_1.SchemaIds.RuleShow,
|
|
8
|
+
type: 'object',
|
|
9
|
+
required: [],
|
|
10
|
+
properties: {
|
|
11
|
+
type: {
|
|
12
|
+
type: 'string',
|
|
13
|
+
enum: Object.values(rule_constants_1.RuleTypes),
|
|
14
|
+
nullable: true
|
|
15
|
+
},
|
|
16
|
+
not: {
|
|
17
|
+
type: 'boolean',
|
|
18
|
+
enum: [true],
|
|
19
|
+
nullable: true
|
|
20
|
+
},
|
|
21
|
+
from: {
|
|
22
|
+
type: 'string',
|
|
23
|
+
format: 'ip-with-optional-mask',
|
|
24
|
+
nullable: true
|
|
25
|
+
},
|
|
26
|
+
to: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
format: 'ip-with-optional-mask',
|
|
29
|
+
nullable: true
|
|
30
|
+
},
|
|
31
|
+
tos: {
|
|
32
|
+
type: 'integer',
|
|
33
|
+
nullable: true,
|
|
34
|
+
minimum: 0,
|
|
35
|
+
maximum: 255
|
|
36
|
+
},
|
|
37
|
+
fwmark: {
|
|
38
|
+
type: 'string',
|
|
39
|
+
nullable: true,
|
|
40
|
+
pattern: '^(0x[0-9a-fA-F]+|[0-9]+)(/(0x[0-9a-fA-F]+|[0-9]+))?$'
|
|
41
|
+
},
|
|
42
|
+
iif: {
|
|
43
|
+
type: 'string',
|
|
44
|
+
minLength: 1,
|
|
45
|
+
maxLength: 15,
|
|
46
|
+
nullable: true
|
|
47
|
+
},
|
|
48
|
+
oif: {
|
|
49
|
+
type: 'string',
|
|
50
|
+
minLength: 1,
|
|
51
|
+
maxLength: 15,
|
|
52
|
+
nullable: true
|
|
53
|
+
},
|
|
54
|
+
l3mdev: {
|
|
55
|
+
type: 'boolean',
|
|
56
|
+
enum: [true],
|
|
57
|
+
nullable: true
|
|
58
|
+
},
|
|
59
|
+
uidrange: {
|
|
60
|
+
type: 'string',
|
|
61
|
+
minLength: 1,
|
|
62
|
+
pattern: '^[0-9]+-[0-9]+$',
|
|
63
|
+
nullable: true
|
|
64
|
+
},
|
|
65
|
+
ipproto: {
|
|
66
|
+
type: ['string', 'integer'],
|
|
67
|
+
nullable: true,
|
|
68
|
+
oneOf: [
|
|
69
|
+
{
|
|
70
|
+
type: 'string',
|
|
71
|
+
minLength: 1,
|
|
72
|
+
nullable: true
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
type: 'integer',
|
|
76
|
+
minimum: 0,
|
|
77
|
+
nullable: true
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
sport: {
|
|
82
|
+
type: ['string', 'integer'],
|
|
83
|
+
nullable: true,
|
|
84
|
+
oneOf: [
|
|
85
|
+
{
|
|
86
|
+
type: 'string',
|
|
87
|
+
pattern: '^[0-9]+-[0-9]+$',
|
|
88
|
+
nullable: true
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
type: 'integer',
|
|
92
|
+
minimum: 0,
|
|
93
|
+
nullable: true
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
dport: {
|
|
98
|
+
type: ['string', 'integer'],
|
|
99
|
+
nullable: true,
|
|
100
|
+
oneOf: [
|
|
101
|
+
{
|
|
102
|
+
type: 'string',
|
|
103
|
+
pattern: '^[0-9]+-[0-9]+$',
|
|
104
|
+
nullable: true
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
type: 'integer',
|
|
108
|
+
minimum: 0,
|
|
109
|
+
nullable: true
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
preference: {
|
|
114
|
+
type: 'integer',
|
|
115
|
+
minimum: 0,
|
|
116
|
+
nullable: true
|
|
117
|
+
},
|
|
118
|
+
tun_id: {
|
|
119
|
+
type: 'integer',
|
|
120
|
+
minimum: 0,
|
|
121
|
+
nullable: true
|
|
122
|
+
},
|
|
123
|
+
table: {
|
|
124
|
+
type: ['string', 'integer'],
|
|
125
|
+
nullable: true,
|
|
126
|
+
oneOf: [
|
|
127
|
+
{
|
|
128
|
+
type: 'string',
|
|
129
|
+
enum: Object.values(rule_constants_1.RoutingTables),
|
|
130
|
+
nullable: true
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
type: 'integer',
|
|
134
|
+
minimum: 0,
|
|
135
|
+
nullable: true
|
|
136
|
+
}
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
protocol: {
|
|
140
|
+
type: ['string', 'integer'],
|
|
141
|
+
nullable: true,
|
|
142
|
+
oneOf: [
|
|
143
|
+
{
|
|
144
|
+
type: 'string',
|
|
145
|
+
minLength: 1,
|
|
146
|
+
nullable: true
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
type: 'integer',
|
|
150
|
+
minimum: 0,
|
|
151
|
+
nullable: true
|
|
152
|
+
}
|
|
153
|
+
]
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
//# sourceMappingURL=show.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"show.schema.js","sourceRoot":"","sources":["../../../src/commands/rule/show.schema.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Routing table special names.
|
|
3
|
+
* @category Constants
|
|
4
|
+
*/
|
|
5
|
+
export declare enum RoutingTables {
|
|
6
|
+
/**
|
|
7
|
+
* The `local` table is a special routing table containing high priority control routes for local
|
|
8
|
+
* and broadcast addresses.
|
|
9
|
+
*/
|
|
10
|
+
Local = "local",
|
|
11
|
+
/** The `main` table is the normal routing table containing all non-policy routes. */
|
|
12
|
+
Main = "main",
|
|
13
|
+
/**
|
|
14
|
+
* The `default` table is empty.
|
|
15
|
+
* It is reserved for some post-processing if no previous default rules selected the packet.
|
|
16
|
+
*/
|
|
17
|
+
Default = "default"
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Rule special values.
|
|
21
|
+
* @category Constants
|
|
22
|
+
*/
|
|
23
|
+
export declare enum RuleTypes {
|
|
24
|
+
/** The rule prescribes to return the route found in the routing table referenced by the rule. */
|
|
25
|
+
Unicast = "unicast",
|
|
26
|
+
/** The rule prescribes to silently drop the packet. */
|
|
27
|
+
Blackhole = "blackhole",
|
|
28
|
+
/** The rule prescribes to generate a 'Network is unreachable' error. */
|
|
29
|
+
Unreachable = "unreachable",
|
|
30
|
+
/** The rule prescribes to generate 'Communication is administratively prohibited' error. */
|
|
31
|
+
Prohibit = "prohibit",
|
|
32
|
+
/** The rule prescribes to translate the source address of the IP packet into some other value. */
|
|
33
|
+
Nat = "nat"
|
|
34
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RuleTypes = exports.RoutingTables = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Routing table special names.
|
|
6
|
+
* @category Constants
|
|
7
|
+
*/
|
|
8
|
+
var RoutingTables;
|
|
9
|
+
(function (RoutingTables) {
|
|
10
|
+
/**
|
|
11
|
+
* The `local` table is a special routing table containing high priority control routes for local
|
|
12
|
+
* and broadcast addresses.
|
|
13
|
+
*/
|
|
14
|
+
RoutingTables["Local"] = "local";
|
|
15
|
+
/** The `main` table is the normal routing table containing all non-policy routes. */
|
|
16
|
+
RoutingTables["Main"] = "main";
|
|
17
|
+
/**
|
|
18
|
+
* The `default` table is empty.
|
|
19
|
+
* It is reserved for some post-processing if no previous default rules selected the packet.
|
|
20
|
+
*/
|
|
21
|
+
RoutingTables["Default"] = "default";
|
|
22
|
+
})(RoutingTables || (exports.RoutingTables = RoutingTables = {}));
|
|
23
|
+
/**
|
|
24
|
+
* Rule special values.
|
|
25
|
+
* @category Constants
|
|
26
|
+
*/
|
|
27
|
+
var RuleTypes;
|
|
28
|
+
(function (RuleTypes) {
|
|
29
|
+
/** The rule prescribes to return the route found in the routing table referenced by the rule. */
|
|
30
|
+
RuleTypes["Unicast"] = "unicast";
|
|
31
|
+
/** The rule prescribes to silently drop the packet. */
|
|
32
|
+
RuleTypes["Blackhole"] = "blackhole";
|
|
33
|
+
/** The rule prescribes to generate a 'Network is unreachable' error. */
|
|
34
|
+
RuleTypes["Unreachable"] = "unreachable";
|
|
35
|
+
/** The rule prescribes to generate 'Communication is administratively prohibited' error. */
|
|
36
|
+
RuleTypes["Prohibit"] = "prohibit";
|
|
37
|
+
/** The rule prescribes to translate the source address of the IP packet into some other value. */
|
|
38
|
+
RuleTypes["Nat"] = "nat";
|
|
39
|
+
})(RuleTypes || (exports.RuleTypes = RuleTypes = {}));
|
|
40
|
+
//# sourceMappingURL=rule.constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rule.constants.js","sourceRoot":"","sources":["../../src/commands/rule.constants.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,IAAY,aAaX;AAbD,WAAY,aAAa;IACvB;;;OAGG;IACH,gCAAiB,CAAA;IACjB,sFAAsF;IACtF,8BAAgB,CAAA;IAChB;;;OAGG;IACH,oCAAmB,CAAA;AACrB,CAAC,EAbW,aAAa,6BAAb,aAAa,QAaxB;AAED;;;GAGG;AACH,IAAY,SAWX;AAXD,WAAY,SAAS;IACnB,iGAAiG;IACjG,gCAAuB,CAAA;IACvB,uDAAuD;IACvD,oCAAyB,CAAA;IACzB,wEAAwE;IACxE,wCAA2B,CAAA;IAC3B,4FAA4F;IAC5F,kCAAwB,CAAA;IACxB,kGAAkG;IAClG,wBAAmB,CAAA;AACrB,CAAC,EAXW,SAAS,yBAAT,SAAS,QAWpB"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import Command from '../common/classes/command';
|
|
2
|
+
import { Empty, GlobalOptions, GlobalOptionsWithRequiredFilePath } from '../common/interfaces/common';
|
|
3
|
+
import { RuleAddOptions } from './rule/add.interfaces';
|
|
4
|
+
import { RuleInfo, RuleShowOptions } from './rule/show.interfaces';
|
|
5
|
+
/**
|
|
6
|
+
* Insert a new rule.
|
|
7
|
+
*
|
|
8
|
+
* Warning: Changes to the RPDB made with these commands do not become active immediately.
|
|
9
|
+
* It is assumed that after a script finishes a batch of updates, it flushes the routing cache with
|
|
10
|
+
* `ip route flush cache`.
|
|
11
|
+
*
|
|
12
|
+
* @param options - Parameters options to be passed down to `ip`.
|
|
13
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
14
|
+
*
|
|
15
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
16
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
*
|
|
20
|
+
* Import module
|
|
21
|
+
* ```
|
|
22
|
+
* import { rule } from 'iproutejs';
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* Unicast type rule (the default if not specified)
|
|
26
|
+
* ```
|
|
27
|
+
* await rule.add({
|
|
28
|
+
* from: '192.203.80.0/24',
|
|
29
|
+
* table: 300,
|
|
30
|
+
* preference: 220
|
|
31
|
+
* });
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* NAT type rule
|
|
35
|
+
* ```
|
|
36
|
+
* await rule.add({
|
|
37
|
+
* from: '193.233.7.83',
|
|
38
|
+
* table: 1,
|
|
39
|
+
* preference: 320,
|
|
40
|
+
* nat: '192.203.80.144'
|
|
41
|
+
* });
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export declare function add(options: RuleAddOptions, globalOptions?: GlobalOptions): Promise<Command<RuleAddOptions>>;
|
|
45
|
+
/**
|
|
46
|
+
* Delete a rule.
|
|
47
|
+
*
|
|
48
|
+
* @param options - Parameters options to be passed down to `ip`.
|
|
49
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
50
|
+
*
|
|
51
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
52
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
*
|
|
56
|
+
* Import module
|
|
57
|
+
* ```
|
|
58
|
+
* import { rule } from 'iproutejs';
|
|
59
|
+
* ```
|
|
60
|
+
*
|
|
61
|
+
* Delete the unused default rule
|
|
62
|
+
* ```
|
|
63
|
+
* await rule.del({
|
|
64
|
+
* preference: 32767
|
|
65
|
+
* });
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
export declare function del(options: RuleAddOptions, globalOptions?: GlobalOptions): Promise<Command<RuleAddOptions>>;
|
|
69
|
+
/**
|
|
70
|
+
* Save rule configuration into a file.
|
|
71
|
+
*
|
|
72
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
73
|
+
*
|
|
74
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
75
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
76
|
+
*/
|
|
77
|
+
export declare function save(globalOptions: GlobalOptionsWithRequiredFilePath): Promise<Command<Empty>>;
|
|
78
|
+
/**
|
|
79
|
+
* Restore rule configuration from a file previously generated by {@link save}.
|
|
80
|
+
*
|
|
81
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
82
|
+
*
|
|
83
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
84
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
85
|
+
*/
|
|
86
|
+
export declare function restore(globalOptions: GlobalOptionsWithRequiredFilePath): Promise<Command<Empty>>;
|
|
87
|
+
/**
|
|
88
|
+
* Deletes all rules.
|
|
89
|
+
*
|
|
90
|
+
* Warning: Changes to the RPDB made with these commands do not become active immediately.
|
|
91
|
+
* It is assumed that after a script finishes a batch of updates, it flushes the routing cache with
|
|
92
|
+
* `ip route flush cache`.
|
|
93
|
+
*
|
|
94
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
95
|
+
*
|
|
96
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
97
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
*
|
|
101
|
+
* Import module
|
|
102
|
+
* ```
|
|
103
|
+
* import { rule } from 'iproutejs';
|
|
104
|
+
* ```
|
|
105
|
+
*
|
|
106
|
+
* Flush the rules
|
|
107
|
+
* ```
|
|
108
|
+
* await rule.flush();
|
|
109
|
+
* ```
|
|
110
|
+
*/
|
|
111
|
+
export declare function flush(globalOptions?: GlobalOptions): Promise<Command<Empty>>;
|
|
112
|
+
/**
|
|
113
|
+
* Shows installed rules.
|
|
114
|
+
*
|
|
115
|
+
* @param options - Parameters options to be passed down to `ip`.
|
|
116
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
117
|
+
*
|
|
118
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
119
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
*
|
|
123
|
+
* Import module
|
|
124
|
+
* ```
|
|
125
|
+
* import { rule } from 'iproutejs';
|
|
126
|
+
* ```
|
|
127
|
+
*
|
|
128
|
+
* Show all rules
|
|
129
|
+
* ```
|
|
130
|
+
* const rules = await rule.show();
|
|
131
|
+
* ```
|
|
132
|
+
*/
|
|
133
|
+
export declare function show(options?: RuleShowOptions, globalOptions?: GlobalOptions): Promise<Command<RuleShowOptions> | RuleInfo[]>;
|
|
134
|
+
declare const _default: {
|
|
135
|
+
add: typeof add;
|
|
136
|
+
del: typeof del;
|
|
137
|
+
save: typeof save;
|
|
138
|
+
restore: typeof restore;
|
|
139
|
+
flush: typeof flush;
|
|
140
|
+
show: typeof show;
|
|
141
|
+
list: typeof show;
|
|
142
|
+
};
|
|
143
|
+
export default _default;
|