Provides listing, adding, deleting, dump information or link establishing

CLI Example

Command syntax:

net link {list | add | del | info [-addr] | disconnect_all}
-net <chain net name>  

Options:

-net - name of the Cellframe Network. The list of networks can be found in the <Config_dir> \ etc \ network folder or received by The Cellframe-Node-CLI using command - net list
-link {list|add|del|info[-addr]|disconnect_all} - lists\ adds\ deletes\ gets additional information (optional)\ disconnects all links

Example:

Command:

cellframe-node-cli net link list
-net foobar  

Response:

        links:
                node_addr: ABCD::0000::0000::0001
                alias:
                cell_id: 0x0000000000000000
                ext_ipv4: 172.28.0.11
                ext_ipv6: ::
                port: 8079
                state: CONNECT

JSON-RPC Example

Command:

curl --unix-socket /opt/cellframe-node/var/run/node_cli 
-X POST http://localhost/connect 
-d '{"method":"net", "params":["net;link;list;-net;foobar;"], "id":"1"}'

Response:

{
  "type": 2,
  "result": [
    {
      "links": [
        {
          "node_addr": "ABCD::0000::0000::0001",
          "alias": "",
          "cell_id": "0x0000000000000000",
          "ext_ipv4": "172.28.0.11",
          "ext_ipv6": "::",
          "port": 8079,
          "state": "CONNECT"
        }
      ]
    }
  ],
  "errors": null,
  "id": 1
}