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
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2014-2024 Diosney Sarmiento
|
|
4
|
+
Copyright (c) 2026 jakguel
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in
|
|
14
|
+
all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22
|
+
THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
# iproutejs
|
|
2
|
+
|
|
3
|
+
Show and manipulate network devices, addresses, routing, policy routing, tunnels, IP forwarding, address labels and other `iproute` objects.
|
|
4
|
+
|
|
5
|
+
Wrapper around native **iproute** suite to allow its functionality to be used in Node.js space.
|
|
6
|
+
|
|
7
|
+
[](https://ko-fi.com/diosney)
|
|
8
|
+
[](https://github.com/jakguel/iproutejs/actions/workflows/docs.yml)
|
|
9
|
+
[](https://github.com/jakguel/iproutejs/actions/workflows/tests.yml)
|
|
10
|
+
[](https://www.npmjs.com/package/iproute)
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
$ npm install iproutejs --save
|
|
15
|
+
|
|
16
|
+
## Supported Functionality
|
|
17
|
+
|
|
18
|
+
| Command | Description | Operations |
|
|
19
|
+
|----------------------------------------------------------------------|---------------------------------------------------------|----------------------------------------------------------------------------------------|
|
|
20
|
+
| [batch](https://jakguel.github.io/iproutejs/modules/batch.html) | Batch mode. | `fromFile`, `fromStdin` |
|
|
21
|
+
| [link](https://jakguel.github.io/iproutejs/modules/link.html) | Network devices configuration. | `add`, `del`, `show`, `set`, `change` |
|
|
22
|
+
| [address](https://jakguel.github.io/iproutejs/modules/address.html) | Protocol address management. | `add`, `change`, `replace`, `del`, `flush`, `save`, `restore`, `showdump`, `show` |
|
|
23
|
+
| [route](https://jakguel.github.io/iproutejs/modules/route.html) | Routing table management. | `show`, `flush`, `save`, `restore`, `get`, `add`, `del`, `change`, `append`, `replace` |
|
|
24
|
+
| [rule](https://jakguel.github.io/iproutejs/modules/rule.html) | Routing policy database (RPDB) management. | `add`, `del`, `save`, `restore`, `flush`, `show`, `list` |
|
|
25
|
+
| [monitor](https://jakguel.github.io/iproutejs/modules/monitor.html) | State monitoring. | `on`, `close` |
|
|
26
|
+
| [addrlabel](https://jakguel.github.io/iproutejs/modules/addrlabel.html) | Protocol address label management. | `add`, `del`, `list`, `flush` |
|
|
27
|
+
| [neighbour](https://jakguel.github.io/iproutejs/modules/neighbour.html) | Neighbour/ARP tables management. | `add`, `del`, `change`, `replace`, `flush`, `show`, `get` |
|
|
28
|
+
| [ntable](https://jakguel.github.io/iproutejs/modules/ntable.html) | Neighbour table configuration. | `change`, `show` |
|
|
29
|
+
| [tunnel](https://jakguel.github.io/iproutejs/modules/tunnel.html) | Tunnel configuration. | `add`, `change`, `del`, `show`, `prl`, `6rd` |
|
|
30
|
+
| [tuntap](https://jakguel.github.io/iproutejs/modules/tuntap.html) | TunTap tunnel configuration. | `add`, `del`, `show`, `list`, `lst` |
|
|
31
|
+
| [maddress](https://jakguel.github.io/iproutejs/modules/maddress.html) | Multicast addresses management. | `add`, `del`, `show` |
|
|
32
|
+
| [mroute](https://jakguel.github.io/iproutejs/modules/mroute.html) | Multicast routing cache management. | `show` |
|
|
33
|
+
| [utils](https://jakguel.github.io/iproutejs/modules/utils.html) | Custom utility library that complements `iproute` suite. | - |
|
|
34
|
+
| [utils.ipForwarding](https://jakguel.github.io/iproutejs/modules/utils.ipForwarding.html) | Manipulates IP forwarding. | `enable`, `disable`, `status`, `v{4\|6}.enable`, `v{4\|6}.disable`, `v{4\|6}.status` |
|
|
35
|
+
| [utils.routingTables](https://jakguel.github.io/iproutejs/modules/utils.routingTables.html) | Manipulates routing tables. | `show`, `add`, `del`, `clear` |
|
|
36
|
+
|
|
37
|
+
## Docs
|
|
38
|
+
|
|
39
|
+
The documentation is divided across several files:
|
|
40
|
+
|
|
41
|
+
| Link | Description |
|
|
42
|
+
|--------------------------------------------------------------------------------|------------------------------------------------------------------------------------------|
|
|
43
|
+
| [Public API site](https://jakguel.github.io/iproutejs) | Provides a comprehensive index of the library interfaces, constants, enums, and classes. |
|
|
44
|
+
| [README.md](https://github.com/jakguel/iproutejs/blob/master/README.md) | This document. |
|
|
45
|
+
| [EXAMPLES.md](https://github.com/jakguel/iproutejs/blob/master/EXAMPLES.md) | Code samples showcasing how to use the library. |
|
|
46
|
+
| [TODO.md](https://github.com/jakguel/iproutejs/blob/master/TODO.md) | A checklist of several items to add or improve upon. |
|
|
47
|
+
|
|
48
|
+
## Motivation
|
|
49
|
+
|
|
50
|
+
Given the current Node.js version (`v20.5.1`), the network-related functionality provided by the built-in modules is
|
|
51
|
+
somewhat limited. These modules mainly offer read-only information through the `os.networkInterfaces()` method. This
|
|
52
|
+
design ensures consistency across the various operating systems that Node.js supports. However, it restricts us from
|
|
53
|
+
performing common networking operations, such as adding, editing, or deleting links, addresses, or routes.
|
|
54
|
+
|
|
55
|
+
This module bridges this gap for the Unix/Linux platform by introducing methods that wrap the **iproute** user-space suite.
|
|
56
|
+
|
|
57
|
+
With this module, you can:
|
|
58
|
+
|
|
59
|
+
- Interact seamlessly with **iproute** commands, without the need to directly execute commands or verify option validations.
|
|
60
|
+
- Access numerous utilities to modify routing tables and manage forwarding capabilities.
|
|
61
|
+
- Eliminate the redundancy of boilerplate code, as the module handles these shared operations across all commands for you.
|
|
62
|
+
- Use the provided interfaces and types to help you to discover the IP command options.
|
|
63
|
+
- Use the Typedoc documentation to navigate between options, its descriptions and its types.
|
|
64
|
+
|
|
65
|
+
## Requirements
|
|
66
|
+
|
|
67
|
+
### Having **iproute** available in the system
|
|
68
|
+
|
|
69
|
+
The primary requirement is the presence of the **iproute** utility on the system.
|
|
70
|
+
|
|
71
|
+
On Debian-based OSes, if it's not already installed, you can do it by issuing:
|
|
72
|
+
|
|
73
|
+
sudo apt-get install iproute # Or `iproute2`
|
|
74
|
+
|
|
75
|
+
Regarding the **iproute** version, the `-json` option is used for display operations and was introduced in `v4.10.0`.
|
|
76
|
+
<br>
|
|
77
|
+
Ensure that your system has at least this version installed.
|
|
78
|
+
|
|
79
|
+
**Note:** JSON support for the `ip neighbour get` command was added at a later version, if you need this specific
|
|
80
|
+
command check the output in case it is not supported in your version.
|
|
81
|
+
|
|
82
|
+
### Permission Level
|
|
83
|
+
|
|
84
|
+
Another requirement concerns permission levels.
|
|
85
|
+
For the successful execution of write methods such as `add()`, `set()`, and `delete()` the application using the
|
|
86
|
+
module must have the appropriate `sudo` privileges.
|
|
87
|
+
|
|
88
|
+
One approach to achieve this is by adding a custom user to the system:
|
|
89
|
+
|
|
90
|
+
`sudo adduser --system --no-create-home iproute`
|
|
91
|
+
|
|
92
|
+
then add its permissions in the `/etc/sudoers` file:
|
|
93
|
+
|
|
94
|
+
`iproute ALL=NOPASSWD: /sbin/ip, /sbin/sysctl`
|
|
95
|
+
|
|
96
|
+
You can determine the command paths by issuing `which ip` and `which sysctl`.
|
|
97
|
+
|
|
98
|
+
> **Note:** Modifying the `/etc/sudoers` file directly can be dangerous. It's generally recommended to use the `visudo`
|
|
99
|
+
> command when editing this file to prevent syntax errors, which could lock you out of `sudo` capabilities.
|
|
100
|
+
|
|
101
|
+
And lastly execute the commands with the `sudo: true` global option:
|
|
102
|
+
|
|
103
|
+
link.show({}, {
|
|
104
|
+
sudo: true
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
ipForwarding.v4.enable({
|
|
108
|
+
sudo: true
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
## Usage
|
|
112
|
+
|
|
113
|
+
As a general guideline, the module identifiers and options match those provided by **iproute**. This means you can easily use
|
|
114
|
+
the module with a basic understanding of **iproute**.
|
|
115
|
+
|
|
116
|
+
For autocompletion, you can rely on the type definitions supplied within the library or refer to the interface documentation
|
|
117
|
+
at the [API documentation](https://jakguel.github.io/iproutejs/modules.html).
|
|
118
|
+
|
|
119
|
+
### How to Import
|
|
120
|
+
|
|
121
|
+
If you are using Javascript, you can import using the regular CommonJS `require` as follows:
|
|
122
|
+
|
|
123
|
+
const { link } = require('iproutejs').default;
|
|
124
|
+
const { link } = require('iproutejs');
|
|
125
|
+
const iproute = require('iproutejs');
|
|
126
|
+
|
|
127
|
+
If you are using Typescript, you can use the aforementioned `require` calls, or just Ecmascript modules import:
|
|
128
|
+
|
|
129
|
+
import { link } from 'iproutejs';
|
|
130
|
+
import iproute, { link } from 'iproutejs';
|
|
131
|
+
import * as iproute from 'iproutejs';
|
|
132
|
+
|
|
133
|
+
### How to Use
|
|
134
|
+
|
|
135
|
+
All methods return Promises, so you can use them directly with `.then().catch()` or you can use `async/await`.
|
|
136
|
+
Both of these calls are valid:
|
|
137
|
+
|
|
138
|
+
const { utils } = require('iproutejs');
|
|
139
|
+
|
|
140
|
+
// Using Promises.
|
|
141
|
+
utils
|
|
142
|
+
.ipForwarding
|
|
143
|
+
.enable({ sudo: true })
|
|
144
|
+
.then(() => {
|
|
145
|
+
// Do something;
|
|
146
|
+
})
|
|
147
|
+
.catch(() => {
|
|
148
|
+
// Do something;
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
// Using async/await.
|
|
152
|
+
await utils.ipForwarding.enable({ sudo: true });
|
|
153
|
+
|
|
154
|
+
### Some Important Notes
|
|
155
|
+
|
|
156
|
+
- All `show` operations use the native `iproute` `-json` flag, which prevents many errors if parsed manually but also
|
|
157
|
+
means the output interfaces are different that the ones provided by this library `1.x.x` version.
|
|
158
|
+
|
|
159
|
+
- In `2.x.x` you must have to call `ip route flush table cache` by yourself after modifying the **rules** or the **routing tables**.
|
|
160
|
+
This is by design to match the native `iproute` behavior, so one can do several operations before making the changes active.
|
|
161
|
+
|
|
162
|
+
You can do it by using the following code:
|
|
163
|
+
|
|
164
|
+
import { route } from 'iproutejs';
|
|
165
|
+
|
|
166
|
+
await route.flush({
|
|
167
|
+
table: RouteRoutingTables.Cache // 'cache'
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
- Need help to complete the interfaces:
|
|
171
|
+
- [RuleInfo](https://jakguel.github.io/iproutejs/interfaces/RuleInfo.html)
|
|
172
|
+
- [RouteInfo](https://jakguel.github.io/iproutejs/interfaces/RouteInfo.html)
|
|
173
|
+
- [LinkInfo](https://jakguel.github.io/iproutejs/interfaces/LinkInfo.html)
|
|
174
|
+
- [LinkWithAddressInfo](https://jakguel.github.io/iproutejs/interfaces/LinkWithAddressInfo.html)
|
|
175
|
+
- [NeighbourInfo](https://jakguel.github.io/iproutejs/interfaces/NeighbourInfo.html)
|
|
176
|
+
- [NtableInfo](https://jakguel.github.io/iproutejs/interfaces/NtableInfo.html)
|
|
177
|
+
- [TunnelInfo](https://jakguel.github.io/iproutejs/interfaces/TunnelInfo.html)
|
|
178
|
+
- [TunTapTunnelInfo](https://jakguel.github.io/iproutejs/interfaces/TunTapTunnelInfo.html)
|
|
179
|
+
- [MaddressInfo](https://jakguel.github.io/iproutejs/interfaces/MaddressInfo.html)
|
|
180
|
+
- [MrouteInfo](https://jakguel.github.io/iproutejs/interfaces/MrouteInfo.html)
|
|
181
|
+
|
|
182
|
+
A **PR** is more than welcome.
|
|
183
|
+
|
|
184
|
+
## Issues
|
|
185
|
+
|
|
186
|
+
The source code can be accessed on [GitHub](https://github.com/jakguel/iproutejs).
|
|
187
|
+
<br>
|
|
188
|
+
If you encounter any bugs or need a new feature, please report them on the
|
|
189
|
+
[issue tracker](https://github.com/jakguel/iproutejs/issues).
|
|
190
|
+
|
|
191
|
+
## Contributing
|
|
192
|
+
|
|
193
|
+
If you want to contribute just follow the project organization and code style and submit a **PR**.
|
|
194
|
+
<br>
|
|
195
|
+
If you want to be an official maintainer or contributor just say so, this library is bigger that it seems and there are a
|
|
196
|
+
lot of features to add or to improve.
|
|
197
|
+
|
|
198
|
+
For potential features to contribute to, please refer to the [TODO.md](https://github.com/jakguel/iproutejs/blob/master/TODO.md) in the project root directory.
|
|
199
|
+
This can be specially helpful if you're unsure of what to contribute or if the [issues](https://github.com/jakguel/iproutejs/issues) board is empty.
|
|
200
|
+
|
|
201
|
+
## Tests
|
|
202
|
+
|
|
203
|
+
### tldr;
|
|
204
|
+
|
|
205
|
+
You can run `npm test`, which is safe to execute as explained below, since it doesn't really execute any commands.
|
|
206
|
+
|
|
207
|
+
### Detailed Explanation
|
|
208
|
+
|
|
209
|
+
Since manipulating the interfaces, routes and routing tables can let your box without access to the Internet, to ease
|
|
210
|
+
the library development the tests are divided in three npm scripts:
|
|
211
|
+
|
|
212
|
+
- `test:safe`, which are safe to execute even in your regular computer and don't really run any `iproute` commands,
|
|
213
|
+
- `test:exec`, which **do** execute real commands and can leave the box in an unexpected state if they fail, in which case a simple reboot
|
|
214
|
+
should be enough to restore the default interfaces, addresses and route information.
|
|
215
|
+
- `test:all`, which as implies executes both the `test:safe` and the `test:exec` tests.
|
|
216
|
+
- `test:github-actions`, which are all except `exec/utils` since Github Actions doesn't allow to modify `rt_tables` nor
|
|
217
|
+
the `sysctl` variables (if you find a way, a **PR** is more than welcome!).
|
|
218
|
+
|
|
219
|
+
For that reason, the default set of tests that are called by `npm test` are the `safe` ones.
|
|
220
|
+
|
|
221
|
+
If you want to execute all the tests, you can set up a **virtual machine** and execute `npm run test:all` there.
|
|
222
|
+
|
|
223
|
+
## License
|
|
224
|
+
|
|
225
|
+
The MIT License (MIT)
|
|
226
|
+
|
|
227
|
+
Copyright (c) 2014-2024 Diosney Sarmiento
|
|
228
|
+
|
|
229
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
230
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
231
|
+
in the Software without restriction, including without limitation the rights
|
|
232
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
233
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
234
|
+
furnished to do so, subject to the following conditions:
|
|
235
|
+
|
|
236
|
+
The above copyright notice and this permission notice shall be included in
|
|
237
|
+
all copies or substantial portions of the Software.
|
|
238
|
+
|
|
239
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
240
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
241
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
242
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
243
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
244
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
245
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { AddressScopes } from '../address.constants';
|
|
2
|
+
/**
|
|
3
|
+
* Address add options.
|
|
4
|
+
* @category Interfaces
|
|
5
|
+
*/
|
|
6
|
+
export interface AddressAddOptions {
|
|
7
|
+
/**
|
|
8
|
+
* The address of the interface. The format of the address depends on the protocol.
|
|
9
|
+
*
|
|
10
|
+
* It is a dotted quad for IP and a sequence of hexadecimal halfwords separated by colons for IPv6.
|
|
11
|
+
* The ADDRESS may be followed by a slash and a decimal number which encodes the network prefix length.
|
|
12
|
+
*/
|
|
13
|
+
local: string;
|
|
14
|
+
/**
|
|
15
|
+
* The address of the remote endpoint for pointopoint interfaces.
|
|
16
|
+
*
|
|
17
|
+
* Again, the ADDRESS may be followed by a slash and a decimal number, encoding the network prefix length.
|
|
18
|
+
* If a peer address is specified, the local address cannot have a prefix length.
|
|
19
|
+
* The network prefix is associated with the peer rather than with the local address.
|
|
20
|
+
*/
|
|
21
|
+
peer?: string;
|
|
22
|
+
/**
|
|
23
|
+
* The broadcast address on the interface.
|
|
24
|
+
*
|
|
25
|
+
* It is possible to use the special symbols '+' and '-' instead of the broadcast address.
|
|
26
|
+
* In this case, the broadcast address is derived by setting/resetting the host bits of the interface prefix.
|
|
27
|
+
*/
|
|
28
|
+
broadcast?: '+' | '-' | string;
|
|
29
|
+
/** TODO: Missing from manpage. */
|
|
30
|
+
anycast?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Each address may be tagged with a label string.
|
|
33
|
+
* In order to preserve compatibility with Linux-2.0 net aliases, this string must coincide with the
|
|
34
|
+
* name of the device or must be prefixed with the device name followed by colon.
|
|
35
|
+
* The maximum allowed total length of label is 15 characters.
|
|
36
|
+
*/
|
|
37
|
+
label?: string;
|
|
38
|
+
/**
|
|
39
|
+
* The scope of the area where this address is valid.
|
|
40
|
+
* The available scopes are listed in file `/etc/iproute2/rt_scopes`.
|
|
41
|
+
*/
|
|
42
|
+
scope?: AddressScopes | number;
|
|
43
|
+
/** The name of the device to add the address to. */
|
|
44
|
+
dev: string;
|
|
45
|
+
/**
|
|
46
|
+
* The valid lifetime of this address; see section 5.5.4 of RFC 4862.
|
|
47
|
+
* When it expires, the address is removed by the kernel.
|
|
48
|
+
* Defaults to `forever`.
|
|
49
|
+
*/
|
|
50
|
+
valid_lft?: 'forever' | number;
|
|
51
|
+
/**
|
|
52
|
+
* The preferred lifetime of this address; see section 5.5.4 of RFC 4862.
|
|
53
|
+
* When it expires, the address is no longer used for new outgoing connections.
|
|
54
|
+
* Defaults to `forever`.
|
|
55
|
+
*/
|
|
56
|
+
preferred_lft?: 'forever' | number;
|
|
57
|
+
/** (IPv6 only) designates this address the "home address" as defined in RFC 6275. */
|
|
58
|
+
home?: true;
|
|
59
|
+
/**
|
|
60
|
+
* (IPv6 only) make the kernel manage temporary addresses created from this one as template on behalf of
|
|
61
|
+
* Privacy Extensions (RFC3041).
|
|
62
|
+
*
|
|
63
|
+
* For this to become active, the `use_tempaddr` sysctl setting has to be set to a value greater than zero.
|
|
64
|
+
* The given address needs to have a prefix length of 64.
|
|
65
|
+
*
|
|
66
|
+
* This flag allows to use privacy extensions in a manually configured network, just like if stateless
|
|
67
|
+
* auto-configuration was active.
|
|
68
|
+
*/
|
|
69
|
+
mngtmpaddr?: true;
|
|
70
|
+
/** (IPv6 only) do not perform Duplicate Address Detection (RFC 4862) when adding this address. */
|
|
71
|
+
nodad?: true;
|
|
72
|
+
/** (IPv6 only) When performing Duplicate Address Detection, use the RFC 4429 optimistic variant. */
|
|
73
|
+
optimistic?: true;
|
|
74
|
+
/**
|
|
75
|
+
* Do not automatically create a route for the network prefix of the added address, and don't search for one
|
|
76
|
+
* to delete when removing the address.
|
|
77
|
+
*
|
|
78
|
+
* Changing an address to add this flag will remove the automatically added prefix route, changing it
|
|
79
|
+
* to remove this flag will create the prefix route automatically.
|
|
80
|
+
*/
|
|
81
|
+
noprefixroute?: true;
|
|
82
|
+
/**
|
|
83
|
+
* Joining multicast groups on Ethernet level via ip maddr command does not work if connected to an Ethernet
|
|
84
|
+
* switch that does IGMP snooping since the switch would not replicate multicast packets on ports that did
|
|
85
|
+
* not have IGMP reports for the multicast addresses.
|
|
86
|
+
*
|
|
87
|
+
* Linux VXLAN interfaces created via ip link add vxlan have the group option that enables them to do the required
|
|
88
|
+
* join.
|
|
89
|
+
*
|
|
90
|
+
* Using the autojoin flag when adding a multicast address enables similar functionality for Openvswitch VXLAN
|
|
91
|
+
* interfaces as well as other tunneling mechanisms that need to receive multicast traffic.
|
|
92
|
+
*/
|
|
93
|
+
autojoin?: true;
|
|
94
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.interfaces.js","sourceRoot":"","sources":["../../../src/commands/address/add.interfaces.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AddressAddSchema = void 0;
|
|
4
|
+
const schemas_1 = require("../../common/constants/schemas");
|
|
5
|
+
const address_constants_1 = require("../address.constants");
|
|
6
|
+
exports.AddressAddSchema = {
|
|
7
|
+
$id: schemas_1.SchemaIds.AddressAdd,
|
|
8
|
+
type: 'object',
|
|
9
|
+
required: ['local', 'dev'],
|
|
10
|
+
properties: {
|
|
11
|
+
local: {
|
|
12
|
+
type: 'string',
|
|
13
|
+
format: 'ip-with-optional-mask'
|
|
14
|
+
},
|
|
15
|
+
peer: {
|
|
16
|
+
type: 'string',
|
|
17
|
+
format: 'ip-with-optional-mask',
|
|
18
|
+
nullable: true
|
|
19
|
+
},
|
|
20
|
+
broadcast: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
format: 'ip-with-optional-mask',
|
|
23
|
+
nullable: true
|
|
24
|
+
},
|
|
25
|
+
anycast: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
format: 'ip-with-optional-mask',
|
|
28
|
+
nullable: true
|
|
29
|
+
},
|
|
30
|
+
label: {
|
|
31
|
+
type: 'string',
|
|
32
|
+
minLength: 1,
|
|
33
|
+
maxLength: 15,
|
|
34
|
+
nullable: true
|
|
35
|
+
},
|
|
36
|
+
scope: {
|
|
37
|
+
type: ['string', 'integer'],
|
|
38
|
+
nullable: true,
|
|
39
|
+
oneOf: [
|
|
40
|
+
{
|
|
41
|
+
type: 'string',
|
|
42
|
+
enum: Object.values(address_constants_1.AddressScopes),
|
|
43
|
+
nullable: true
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
type: 'integer',
|
|
47
|
+
minimum: 0,
|
|
48
|
+
nullable: true
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
dev: {
|
|
53
|
+
type: 'string',
|
|
54
|
+
minLength: 1,
|
|
55
|
+
maxLength: 15
|
|
56
|
+
},
|
|
57
|
+
valid_lft: {
|
|
58
|
+
type: ['string', 'integer'],
|
|
59
|
+
nullable: true,
|
|
60
|
+
oneOf: [
|
|
61
|
+
{
|
|
62
|
+
type: 'string',
|
|
63
|
+
enum: ['forever'],
|
|
64
|
+
nullable: true
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
type: 'integer',
|
|
68
|
+
minimum: 0,
|
|
69
|
+
nullable: true
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
preferred_lft: {
|
|
74
|
+
type: ['string', 'integer'],
|
|
75
|
+
nullable: true,
|
|
76
|
+
oneOf: [
|
|
77
|
+
{
|
|
78
|
+
type: 'string',
|
|
79
|
+
enum: ['forever'],
|
|
80
|
+
nullable: true
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
type: 'integer',
|
|
84
|
+
minimum: 0,
|
|
85
|
+
nullable: true
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
home: {
|
|
90
|
+
type: 'boolean',
|
|
91
|
+
enum: [true],
|
|
92
|
+
nullable: true
|
|
93
|
+
},
|
|
94
|
+
mngtmpaddr: {
|
|
95
|
+
type: 'boolean',
|
|
96
|
+
enum: [true],
|
|
97
|
+
nullable: true
|
|
98
|
+
},
|
|
99
|
+
nodad: {
|
|
100
|
+
type: 'boolean',
|
|
101
|
+
enum: [true],
|
|
102
|
+
nullable: true
|
|
103
|
+
},
|
|
104
|
+
optimistic: {
|
|
105
|
+
type: 'boolean',
|
|
106
|
+
enum: [true],
|
|
107
|
+
nullable: true
|
|
108
|
+
},
|
|
109
|
+
noprefixroute: {
|
|
110
|
+
type: 'boolean',
|
|
111
|
+
enum: [true],
|
|
112
|
+
nullable: true
|
|
113
|
+
},
|
|
114
|
+
autojoin: {
|
|
115
|
+
type: 'boolean',
|
|
116
|
+
enum: [true],
|
|
117
|
+
nullable: true
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
//# sourceMappingURL=add.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.schema.js","sourceRoot":"","sources":["../../../src/commands/address/add.schema.ts"],"names":[],"mappings":";;;AAEA,4DAAmE;AACnE,4DAAyD;AAG5C,QAAA,gBAAgB,GAAsC;IACjE,GAAG,EAAS,mBAAS,CAAC,UAAU;IAChC,IAAI,EAAQ,QAAQ;IACpB,QAAQ,EAAI,CAAC,OAAO,EAAE,KAAK,CAAC;IAC5B,UAAU,EAAE;QACV,KAAK,EAAM;YACT,IAAI,EAAI,QAAQ;YAChB,MAAM,EAAE,uBAAuB;SAChC;QACD,IAAI,EAAO;YACT,IAAI,EAAM,QAAQ;YAClB,MAAM,EAAI,uBAAuB;YACjC,QAAQ,EAAE,IAAI;SACf;QACD,SAAS,EAAE;YACT,IAAI,EAAM,QAAQ;YAClB,MAAM,EAAI,uBAAuB;YACjC,QAAQ,EAAE,IAAI;SACf;QACD,OAAO,EAAI;YACT,IAAI,EAAM,QAAQ;YAClB,MAAM,EAAI,uBAAuB;YACjC,QAAQ,EAAE,IAAI;SACf;QACD,KAAK,EAAM;YACT,IAAI,EAAO,QAAQ;YACnB,SAAS,EAAE,CAAC;YACZ,SAAS,EAAE,EAAE;YACb,QAAQ,EAAG,IAAI;SAChB;QACD,KAAK,EAAM;YACT,IAAI,EAAM,CAAE,QAAQ,EAAE,SAAS,CAAE;YACjC,QAAQ,EAAE,IAAI;YACd,KAAK,EAAK;gBACR;oBACE,IAAI,EAAM,QAAQ;oBAClB,IAAI,EAAM,MAAM,CAAC,MAAM,CAAC,iCAAa,CAAoB;oBACzD,QAAQ,EAAE,IAAI;iBACf;gBACD;oBACE,IAAI,EAAM,SAAS;oBACnB,OAAO,EAAG,CAAC;oBACX,QAAQ,EAAE,IAAI;iBACf;aACF;SACF;QACD,GAAG,EAAQ;YACT,IAAI,EAAO,QAAQ;YACnB,SAAS,EAAE,CAAC;YACZ,SAAS,EAAE,EAAE;SACd;QACD,SAAS,EAAM;YACb,IAAI,EAAM,CAAC,QAAQ,EAAE,SAAS,CAAC;YAC/B,QAAQ,EAAE,IAAI;YACd,KAAK,EAAK;gBACR;oBACE,IAAI,EAAM,QAAQ;oBAClB,IAAI,EAAM,CAAC,SAAS,CAAC;oBACrB,QAAQ,EAAE,IAAI;iBACf;gBACD;oBACE,IAAI,EAAM,SAAS;oBACnB,OAAO,EAAG,CAAC;oBACX,QAAQ,EAAE,IAAI;iBACf;aACF;SACF;QACD,aAAa,EAAE;YACb,IAAI,EAAM,CAAC,QAAQ,EAAE,SAAS,CAAC;YAC/B,QAAQ,EAAE,IAAI;YACd,KAAK,EAAK;gBACR;oBACE,IAAI,EAAM,QAAQ;oBAClB,IAAI,EAAM,CAAC,SAAS,CAAC;oBACrB,QAAQ,EAAE,IAAI;iBACf;gBACD;oBACE,IAAI,EAAM,SAAS;oBACnB,OAAO,EAAG,CAAC;oBACX,QAAQ,EAAE,IAAI;iBACf;aACF;SACF;QACD,IAAI,EAAW;YACb,IAAI,EAAM,SAAS;YACnB,IAAI,EAAM,CAAC,IAAI,CAAC;YAChB,QAAQ,EAAE,IAAI;SACf;QACD,UAAU,EAAK;YACb,IAAI,EAAM,SAAS;YACnB,IAAI,EAAM,CAAC,IAAI,CAAC;YAChB,QAAQ,EAAE,IAAI;SACf;QACD,KAAK,EAAU;YACb,IAAI,EAAM,SAAS;YACnB,IAAI,EAAM,CAAC,IAAI,CAAC;YAChB,QAAQ,EAAE,IAAI;SACf;QACD,UAAU,EAAK;YACb,IAAI,EAAM,SAAS;YACnB,IAAI,EAAM,CAAC,IAAI,CAAC;YAChB,QAAQ,EAAE,IAAI;SACf;QACD,aAAa,EAAE;YACb,IAAI,EAAM,SAAS;YACnB,IAAI,EAAM,CAAC,IAAI,CAAC;YAChB,QAAQ,EAAE,IAAI;SACf;QACD,QAAQ,EAAO;YACb,IAAI,EAAM,SAAS;YACnB,IAAI,EAAM,CAAC,IAAI,CAAC;YAChB,QAAQ,EAAE,IAAI;SACf;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { AddressScopes } from '../address.constants';
|
|
2
|
+
/**
|
|
3
|
+
* Address delete options.
|
|
4
|
+
* @category Interfaces
|
|
5
|
+
*/
|
|
6
|
+
export interface AddressDeleteOptions {
|
|
7
|
+
/**
|
|
8
|
+
* The address of the interface. The format of the address depends on the protocol.
|
|
9
|
+
*
|
|
10
|
+
* It is a dotted quad for IP and a sequence of hexadecimal halfwords separated by colons for IPv6.
|
|
11
|
+
* The ADDRESS may be followed by a slash and a decimal number which encodes the network prefix length.
|
|
12
|
+
*/
|
|
13
|
+
local: string;
|
|
14
|
+
/**
|
|
15
|
+
* The address of the remote endpoint for pointopoint interfaces.
|
|
16
|
+
*
|
|
17
|
+
* Again, the ADDRESS may be followed by a slash and a decimal number, encoding the network prefix length.
|
|
18
|
+
* If a peer address is specified, the local address cannot have a prefix length.
|
|
19
|
+
* The network prefix is associated with the peer rather than with the local address.
|
|
20
|
+
*/
|
|
21
|
+
peer?: string;
|
|
22
|
+
/**
|
|
23
|
+
* The broadcast address on the interface.
|
|
24
|
+
*
|
|
25
|
+
* It is possible to use the special symbols '+' and '-' instead of the broadcast address.
|
|
26
|
+
* In this case, the broadcast address is derived by setting/resetting the host bits of the interface prefix.
|
|
27
|
+
*/
|
|
28
|
+
broadcast?: '+' | '-' | string;
|
|
29
|
+
/** TODO: Missing from manpage. */
|
|
30
|
+
anycast?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Each address may be tagged with a label string.
|
|
33
|
+
* In order to preserve compatibility with Linux-2.0 net aliases, this string must coincide with the
|
|
34
|
+
* name of the device or must be prefixed with the device name followed by colon.
|
|
35
|
+
* The maximum allowed total length of label is 15 characters.
|
|
36
|
+
*/
|
|
37
|
+
label?: string;
|
|
38
|
+
/**
|
|
39
|
+
* The scope of the area where this address is valid.
|
|
40
|
+
* The available scopes are listed in file `/etc/iproute2/rt_scopes`.
|
|
41
|
+
*/
|
|
42
|
+
scope?: AddressScopes | number;
|
|
43
|
+
/** The name of the device. */
|
|
44
|
+
dev: string;
|
|
45
|
+
/**
|
|
46
|
+
* (IPv6 only) make the kernel manage temporary addresses created from this one as template on behalf of
|
|
47
|
+
* Privacy Extensions (RFC3041).
|
|
48
|
+
*
|
|
49
|
+
* For this to become active, the `use_tempaddr` sysctl setting has to be set to a value greater than zero.
|
|
50
|
+
* The given address needs to have a prefix length of 64.
|
|
51
|
+
*
|
|
52
|
+
* This flag allows to use privacy extensions in a manually configured network, just like if stateless
|
|
53
|
+
* auto-configuration was active.
|
|
54
|
+
*/
|
|
55
|
+
mngtmpaddr?: true;
|
|
56
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete.interfaces.js","sourceRoot":"","sources":["../../../src/commands/address/delete.interfaces.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AddressDeleteSchema = void 0;
|
|
4
|
+
const schemas_1 = require("../../common/constants/schemas");
|
|
5
|
+
const address_constants_1 = require("../address.constants");
|
|
6
|
+
exports.AddressDeleteSchema = {
|
|
7
|
+
$id: schemas_1.SchemaIds.AddressDelete,
|
|
8
|
+
type: 'object',
|
|
9
|
+
required: ['local', 'dev'],
|
|
10
|
+
properties: {
|
|
11
|
+
local: {
|
|
12
|
+
type: 'string',
|
|
13
|
+
format: 'ip-with-optional-mask'
|
|
14
|
+
},
|
|
15
|
+
peer: {
|
|
16
|
+
type: 'string',
|
|
17
|
+
format: 'ip-with-optional-mask',
|
|
18
|
+
nullable: true
|
|
19
|
+
},
|
|
20
|
+
broadcast: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
format: 'ip-with-optional-mask',
|
|
23
|
+
nullable: true
|
|
24
|
+
},
|
|
25
|
+
anycast: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
format: 'ip-with-optional-mask',
|
|
28
|
+
nullable: true
|
|
29
|
+
},
|
|
30
|
+
label: {
|
|
31
|
+
type: 'string',
|
|
32
|
+
minLength: 1,
|
|
33
|
+
maxLength: 15,
|
|
34
|
+
nullable: true
|
|
35
|
+
},
|
|
36
|
+
scope: {
|
|
37
|
+
type: ['string', 'integer'],
|
|
38
|
+
nullable: true,
|
|
39
|
+
oneOf: [
|
|
40
|
+
{
|
|
41
|
+
type: 'string',
|
|
42
|
+
enum: Object.values(address_constants_1.AddressScopes),
|
|
43
|
+
nullable: true
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
type: 'integer',
|
|
47
|
+
minimum: 0,
|
|
48
|
+
nullable: true
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
dev: {
|
|
53
|
+
type: 'string',
|
|
54
|
+
minLength: 1,
|
|
55
|
+
maxLength: 15
|
|
56
|
+
},
|
|
57
|
+
mngtmpaddr: {
|
|
58
|
+
type: 'boolean',
|
|
59
|
+
enum: [true],
|
|
60
|
+
nullable: true
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=delete.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete.schema.js","sourceRoot":"","sources":["../../../src/commands/address/delete.schema.ts"],"names":[],"mappings":";;;AAEA,4DAAsE;AAEtE,4DAA4D;AAE/C,QAAA,mBAAmB,GAAyC;IACvE,GAAG,EAAS,mBAAS,CAAC,aAAa;IACnC,IAAI,EAAQ,QAAQ;IACpB,QAAQ,EAAI,CAAE,OAAO,EAAE,KAAK,CAAE;IAC9B,UAAU,EAAE;QACV,KAAK,EAAO;YACV,IAAI,EAAI,QAAQ;YAChB,MAAM,EAAE,uBAAuB;SAChC;QACD,IAAI,EAAQ;YACV,IAAI,EAAM,QAAQ;YAClB,MAAM,EAAI,uBAAuB;YACjC,QAAQ,EAAE,IAAI;SACf;QACD,SAAS,EAAG;YACV,IAAI,EAAM,QAAQ;YAClB,MAAM,EAAI,uBAAuB;YACjC,QAAQ,EAAE,IAAI;SACf;QACD,OAAO,EAAK;YACV,IAAI,EAAM,QAAQ;YAClB,MAAM,EAAI,uBAAuB;YACjC,QAAQ,EAAE,IAAI;SACf;QACD,KAAK,EAAO;YACV,IAAI,EAAO,QAAQ;YACnB,SAAS,EAAE,CAAC;YACZ,SAAS,EAAE,EAAE;YACb,QAAQ,EAAG,IAAI;SAChB;QACD,KAAK,EAAO;YACV,IAAI,EAAM,CAAE,QAAQ,EAAE,SAAS,CAAE;YACjC,QAAQ,EAAE,IAAI;YACd,KAAK,EAAK;gBACR;oBACE,IAAI,EAAM,QAAQ;oBAClB,IAAI,EAAM,MAAM,CAAC,MAAM,CAAC,iCAAa,CAAoB;oBACzD,QAAQ,EAAE,IAAI;iBACf;gBACD;oBACE,IAAI,EAAM,SAAS;oBACnB,OAAO,EAAG,CAAC;oBACX,QAAQ,EAAE,IAAI;iBACf;aACF;SACF;QACD,GAAG,EAAS;YACV,IAAI,EAAO,QAAQ;YACnB,SAAS,EAAE,CAAC;YACZ,SAAS,EAAE,EAAE;SACd;QACD,UAAU,EAAE;YACV,IAAI,EAAM,SAAS;YACnB,IAAI,EAAM,CAAE,IAAI,CAAE;YAClB,QAAQ,EAAE,IAAI;SACf;KACF;CACF,CAAC"}
|