|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gregoire.portknock.server.Server
Abstract server from which all other servers should extend.
Field Summary | |
protected java.lang.String |
host
|
protected java.util.LinkedList |
list
|
protected static Logger |
logger
|
protected int |
port
|
protected int |
portDelay
|
protected int[] |
ports
|
static java.lang.String |
REGEX_IPADDRESS
|
protected int |
timeout
|
protected java.lang.String |
type
|
Constructor Summary | |
Server(java.lang.String type)
|
Method Summary | |
static long |
getClientTimeout()
Returns the ammount of time in milliseconds that a client will be kept active in the knock list. |
java.net.InetAddress |
getInetAddress(java.lang.String hostName)
Utility method that will return an InetAddress for a given host name or IP address string. |
java.lang.String |
getType()
Returns the servers type, currently this consists of either "sequence" for sequenced handling or "dummy" used for intrusion or port scan detection. |
abstract void |
init()
Initializes the server. |
abstract void |
listen()
Accept connections for current server. |
static void |
setClientTimeout(long cTimeout)
Sets the ammount of time in milliseconds that a client will be kept active in the knock list. |
void |
setHost(java.lang.String host)
Sets the host name or IP address to listen on. |
void |
setPort(int port)
Sets the final port to open. |
void |
setPortDelay(int portDelay)
Sets time that the server will listen to follow on ports. |
void |
setPorts(int[] ports)
Sets the ports to open. |
void |
setSocketTimeout(int timeout)
Sets timeout for all sockets created |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String type
protected java.lang.String host
protected int port
protected int[] ports
protected int timeout
protected int portDelay
public static final java.lang.String REGEX_IPADDRESS
protected static Logger logger
protected java.util.LinkedList list
Constructor Detail |
public Server(java.lang.String type)
Method Detail |
public abstract void init() throws java.io.IOException
java.io.IOException
public abstract void listen()
public void setHost(java.lang.String host)
host
- public void setPort(int port)
port
- public void setPorts(int[] ports)
ports
- public void setSocketTimeout(int timeout)
timeout
- socket timeoutpublic static void setClientTimeout(long cTimeout)
public void setPortDelay(int portDelay)
portDelay
- time that threads wait listening on follow on portspublic java.lang.String getType()
public static long getClientTimeout()
public java.net.InetAddress getInetAddress(java.lang.String hostName)
hostName
- host name or IP address string
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |