浏览代码

cmd_tcp: added command for tcp connections management

Daniel-Constantin Mierla 6 年之前
父节点
当前提交
4d8663d053
共有 1 个文件被更改,包括 51 次插入0 次删除
  1. 51 0
      kamcli/commands/cmd_tcp.py

+ 51 - 0
kamcli/commands/cmd_tcp.py

@@ -0,0 +1,51 @@
+import click
+from kamcli.cli import pass_context
+from kamcli.iorpc import command_ctl
+
+
+##
+#
+#
[email protected]('tcp', help='Manage TCP options and connections')
+@pass_context
+def cli(ctx):
+    pass
+
+
+##
+#
+#
[email protected]('options', short_help='Show details for TCP options in memory')
+@pass_context
+def tcp_options(ctx):
+    """Show details for TCP options in memory
+
+    \b
+    """
+    command_ctl(ctx, 'core.tcp_options', [ ])
+
+
+##
+#
+#
[email protected]('list', short_help='List current TCP connections')
+@pass_context
+def tcp_list(ctx):
+    """List current TCP connections
+
+    \b
+    """
+    command_ctl(ctx, 'core.tcp_list', [ ])
+
+
+##
+#
+#
[email protected]('info', short_help='Summary of TCP usage')
+@pass_context
+def tcp_info(ctx):
+    """Summary of TCP usage
+
+    \b
+    """
+    command_ctl(ctx, 'core.tcp_info', [ ])