aboutsummaryrefslogtreecommitdiff
path: root/options.h
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2017-12-11 16:00:21 +0100
committerToni Uhlig <matzeton@googlemail.com>2017-12-11 16:00:21 +0100
commit78237fb6560e984b032650f6e50305dfb40b1f9d (patch)
treebaecbe8964f7399320cd960a4ffe5334a8ae60cb /options.h
parent2d7031c57b1177442280ac1ebcac463d0a035b4b (diff)
ptunnel-ng:
* options parsing * fixed perms for text/source files
Diffstat (limited to 'options.h')
-rw-r--r--options.h29
1 files changed, 15 insertions, 14 deletions
diff --git a/options.h b/options.h
index af89489..b2f17aa 100644
--- a/options.h
+++ b/options.h
@@ -14,20 +14,19 @@
struct options {
- /** proxy or forwarder? */
- int proxy_mode;
/** user defined magic value (prevent Cisco WSA/IronPort fingerprint scan) */
uint32_t magic;
+ /** proxy or forwarder? */
+ int mode;
/** Proxy's internet address */
- uint32_t given_proxy_ip;
- /** Password-Digest (must be the same on proxy and client for authentication to succeed) */
- unsigned char *password_digest;
+ uint32_t given_proxy_ip;
/** Port the client listens on */
- uint16_t tcp_listen_port;
- /** Proxy's internet address */
+ uint32_t tcp_listen_port;
+ /** Forward/Proxy destination internet address */
+ char *given_dst_hostname;
uint32_t given_dst_ip;
- /** Port to send data to from the proxy */
- int tcp_port;
+ /** Forward/Proxy destination port */
+ uint32_t given_dst_port;
/** Default maximum number of tunnels to support at once */
uint32_t max_tunnels;
/** Default log level */
@@ -38,15 +37,21 @@ struct options {
FILE *log_file;
/** Print more detailed traffic statistics if non zero value */
int print_stats;
+ /** Password-Digest (must be the same on proxy and client for authentication to succeed) */
+ unsigned char *password_digest;
/** use UDP instead of ICMP */
int udp;
/** unpriviledged mode */
- int unprivledged;
+ int unprivileged;
#ifdef HAVE_SELINUX
char *selinux_context;
#endif
#ifndef WIN32
+ /** run as daemon if non zero value */
+ int daemonize;
+ /** log to syslog if non zero value */
+ int use_syslog;
/** UID of the running process */
uid_t uid;
/** GID of the running process */
@@ -55,10 +60,6 @@ struct options {
char *root_dir;
/** PIDFILE */
FILE *pid_file;
- /** run as daemon */
- bool daemonize;
- /** log to syslog if non zero value */
- int syslog;
#endif
};