📄 usage.cpp
字号:
/* * Copyright (C) 2006, Binary Ma * Licence: GNU GPL 1991 - version 2 * Bug report: binary@eniak.org*/#include <stdio.h>static const char* _a = "specify remote server address in client mode";static const char* _i = "specify listening network interface in server mode";static const char* _p = "specify communication port";static const char* _t = "set the timeout in seconds";static const char* _x = "specify the absolute path of log file";static const char* _f = "sepcify config file";static const char* _r = "specify the absolute path of root directory for server";static const char* _b = "set listening backlog for server";static const char* _d = "indicate executive cycle for client";static const char* _m = "specify a name of accepted module for client";static const char* _X = "specify the absolute path of tmp directory for client";static const char* _s = "switch to server mode";static const char* _c = "switch to client mode, default";static const char* _v = "print current version";static const char* _h = "print this help page";static const char* _H = "print config file help page";static const char* _g = "turn off log record";static const char* _G = "turn on log record, default";static const char* _u = "turn on overlap mode";static const char* _U = "turn off overlap mode, default";static const char* _o = "display effective configuration";void usage(){ const char* c = "\usage: netkite [HOST] [OPTIONS]\n\\n\HOST:\n\ %s\n\ %s\n\\n\OPTIONS:\n\ -p port : %s\n\ -t second : %s\n\ -x logfile : %s\n\ -f conf : %s\n\ -r root : %s\n\ -b backlog : %s\n\ -d second : %s\n\ -m module : %s\n\ -X tmp : %s\n\ -s : %s\n\ -c : %s\n\ -v : %s\n\ -h : %s\n\ -H : %s\n\ -g : %s\n\ -G : %s\n\ -u : %s\n\ -U : %s\n\ -o : %s\n\\n\NOTE:\n\ the priority of command options is higher than the one of config\n\file, which default path is \"/etc/netkite.conf\"; use \"-H\" to get\n\more details of config file and default values, or see netkite man\n\page for full infomation. bug report to <binary@eniak.org>.\n\"; printf( c, _i, _a, _p, _t, _x, _f, _r, _b, _d, _m, _X, _s, _c, _v, _h, _H, _g, _G, _u, _U, _o );}void usage_conf(){ const char* c = "\# describe the key and default values\n\\n\# %s\n\ address = 127.0.0.1\n\\n\# %s\n\ interface = 0.0.0.0\n\\n\# switch to server or client mode\n\ server_mode = no\n\\n\# turn on/off log record\n\ log_enable = yes\n\\n\# turn on/off overlap mode\n\ overlap = no\n\\n\# %s\n\ port = 7002\n\\n\# %s\n\ timeout = 75\n\\n\# %s\n\ log_file = /var/log/netkite.log\n\\n\# %s\n\ root = /var/netkite\n\\n\# %s\n\ backlog = 1024\n\\n\# %s,\n\ # if 0, then run one time only\n\ idle = 0\n\\n\# %s\n\ module = test\n\\n\# %s\n\ tmp_path = /tmp\n\"; printf( c, _a, _i, _p, _t, _x, _r, _b, _d, _m, _X );}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -