Ejemplo n.º 1
0
        public Options()
            : base()
        {
            pcapLogFile = new CLStringArgument("pcap-log", "Log data to this pcap file");
            Add(pcapLogFile);

            //communicationLogFile = new CLStringArgument('l', "CommunicationLogFile");
            //Add(communicationLogFile);

            specialPortList = new CLStringArgument('c', "Connect Request Port List", "Special list of ports that when connected, must establish a connection request. A connection request must be established with incoming connections if the connection is to another instance of NetworkAdapter where it's opposite end is a client that is waiting for a connection request.");
            Add(specialPortList);

            readBufferSize = new CLUInt32Argument('b', "Read Buffer Size", "The size of the buffer used to hold the bytes being read from a socket");
            readBufferSize.SetDefault(4096);
            Add(readBufferSize);

            socketBackLog = new CLInt32Argument('s', "Server Socket BackLog", "The maximum length of the pending connections queue");
            socketBackLog.SetDefault(32);
            Add(socketBackLog);

            logData = new CLSwitch('d', "log-data", "Log the socket data");
            Add(logData);

            noTransferMessages = new CLSwitch('t', "no-transfer-messages", "Do not log transfer messages");
            Add(noTransferMessages);

            this.adapterTypeModeIsSet = false;
        }
Ejemplo n.º 2
0
    public Options()
        : base()
    {
        listenMode = new CLSwitch('l', "listen mode", "Specifies that NetCat will listen for a tcp connection");
        Add(listenMode);

        localPort = new CLGenericArgument <UInt16>(UInt16.Parse, 'p', "the local port to bind to");
        localPort.SetDefault(0);
        Add(localPort);

        localHost = new CLStringArgument('i', "the local host or ip address to bind to");
        localHost.SetDefault("0.0.0.0");
        Add(localHost);

        bufferSizes = new CLInt32Argument('s', "tunnel buffer sizes");
        bufferSizes.SetDefault(8192);
        Add(bufferSizes);

        tcpSendWindow = new CLInt32Argument("send-window", "Size of TCP send window (0 means network stack window size)");
        tcpSendWindow.SetDefault(0);
        Add(tcpSendWindow);
        tcpReceiveWindow = new CLInt32Argument("recv-window", "Size of TCP recv window (0 means network stack window size)");
        tcpReceiveWindow.SetDefault(0);
        Add(tcpReceiveWindow);
    }
Ejemplo n.º 3
0
        public NfsServerProgramOptions()
        {
            listenIPAddress = new CLGenericArgument <IPAddress>(IPAddress.Parse, 'l', "Listen IP Address");
            listenIPAddress.SetDefault(IPAddress.Parse("0.0.0.0"));
            Add(listenIPAddress);

            //
            // Debug Server
            //
            debugListenPort = new CLGenericArgument <UInt16>(UInt16.Parse, 'd', "DebugListenPort", "The TCP port that the debug server will be listening to (If no port is specified, the debug server will not be running)");
            Add(debugListenPort);

            //
            // Npc Server
            //
            npcListenPort = new CLGenericArgument <UInt16>(UInt16.Parse, 'n', "NpcListenPort", "The TCP port that the NPC server will be listening to (If no port is specified, the NPC server will not be running)");
            Add(npcListenPort);

            logFile = new CLStringArgument('f', "LogFile", "Log file (logs to stdout if not specified)");
            Add(logFile);


            logLevel = new CLEnumArgument <LogLevel>('v', "LogLevel", "Level of statements to log");
            logLevel.SetDefault(LogLevel.None);
            Add(logLevel);

            performanceLog = new CLStringArgument('p', "PerformanceLog", "Where to log performance ('internal',<filename>)");
            Add(performanceLog);

#if WindowsCE
            jediTimer = new CLSwitch('j', "JediTimer", "Adds the jedi timer timestamp to printed commands");
            Add(jediTimer);
#endif
        }
Ejemplo n.º 4
0
        public CopyProjectOptions()
        {
            namespaceChange = new CLStringArgument('n', "namespace", "Change the namespace (OldNamespace.Library:NewNamespace.NewLibrary)");
            Add(namespaceChange);

            assemblyName = new CLStringArgument('a', "assembly", "Change the assembly name");
            Add(assemblyName);

            propChanges = new CLStringArgument('p', "props", "Change the semicolon list of properties 'name:value;name:value;...'");
            Add(propChanges);

            templateFile = new CLStringArgument('t', "template", "src:name or dst:name Use a csproj template file ....");
            Add(templateFile);
        }
Ejemplo n.º 5
0
        public DnsServerOptions()
            : base()
        {
            notificationHost = new CLStringArgument('n', "Notification Host", "Host [and port] to send notifications when an address is handed out");
            Add(notificationHost);

            port = new CLGenericArgument <UInt16>(UInt16.Parse, 'p', "Listen Port");
            port.SetDefault(53);
            Add(port);

            socketBackLog = new CLInt32Argument('b', "Socket Back Log", "The maximum length of the pending connections queue");
            socketBackLog.SetDefault(32);
            Add(socketBackLog);
        }
Ejemplo n.º 6
0
    public Options()
        : base()
    {
        localPort = new CLGenericArgument <UInt16>(UInt16.Parse, 'p', "the local port to bind to");
        localPort.SetDefault(0);
        Add(localPort);

        localHost = new CLStringArgument('i', "the local host or ip address to bind to");
        localHost.SetDefault("0.0.0.0");
        Add(localHost);

        bufferSizes = new CLInt32Argument('s', "tunnel buffer sizes");
        bufferSizes.SetDefault(8192);
        Add(bufferSizes);
    }
Ejemplo n.º 7
0
        public Options()
        {
            heartbeatSeconds = new CLGenericArgument <UInt16>(UInt16.Parse, 'h', "heartbeat-time", "The number of seconds between heartbeats");
            heartbeatSeconds.SetDefault(Tmp.DefaultHeartbeatSeconds);
            Add(heartbeatSeconds);

            reconnectWaitSeconds = new CLGenericArgument <UInt16>(UInt16.Parse, 'w', "reconnect-wait-seconds", "The time between reconnect attempts");
            reconnectWaitSeconds.SetDefault(Tmp.DefaultReconnectWaitSeconds);
            Add(reconnectWaitSeconds);

            authenticationFile = new CLStringArgument('a', "auth", "Authentication file");
            Add(authenticationFile);

            receiveBufferLength = new CLGenericArgument <UInt32>(UInt32.Parse, 'r', "receive-buffer-length", "Receive buffer length");
            receiveBufferLength.SetDefault(4096);
            Add(receiveBufferLength);
        }
Ejemplo n.º 8
0
        public AppLayerProxyOptions()
        {
            listenIP = new CLGenericArgument <IPAddress>(IPAddress.Parse, 'l', "listenip", "IP address of the interface to listen on");
            listenIP.SetDefault(IPAddress.Any);
            Add(listenIP);

            forwardProxy = new CLStringArgument('p', "proxy", "Set a proxy to forward all connections to");
            Add(forwardProxy);

            backlog = new CLGenericArgument <UInt16>(UInt16.Parse, 'b', "backlog", "Listen socket backlog");
            backlog.SetDefault(32);
            Add(backlog);

            bufferSize = new CLInt32Argument("buffer-size", "Size of the buffer used for receiving data from the client");
            bufferSize.SetDefault(8192);
            Add(bufferSize);

            help = new CLSwitch('h', "help", "Show the usage");
            Add(help);
        }
Ejemplo n.º 9
0
        public WebServerOptions()
            : base()
        {
            port = new CLGenericArgument <UInt16>(UInt16.Parse, 'p', "Listen Port", "The port number to listen on");
            port.SetDefault(80);
            Add(port);

            defaultIndexFile = new CLStringArgument('i', "Default Index File", "Filename of the default file to send when the client requests a directory");
            defaultIndexFile.SetDefault("index.html");
            Add(defaultIndexFile);

            socketBackLog = new CLInt32Argument('b', "Socket Back Log", "The maximum length of the pending connections queue");
            socketBackLog.SetDefault(32);
            Add(socketBackLog);

            logFile = new CLStringArgument("log", "File for message log");
            Add(logFile);

            logData = new CLSwitch('d', "log-data", "Use to turn on data logging");
            Add(logData);
        }
Ejemplo n.º 10
0
 public CopySourceOptions()
 {
     namespaceChange = new CLStringArgument('n', "namespace", "Change the namespace (OldNamespace.Library:NewNamespace.NewLibrary)");
     Add(namespaceChange);
 }