Commit 9e3a306d authored by Gergo Ujhelyi's avatar Gergo Ujhelyi

add GlobalConnOpts and IPAddrLease class

Signed-off-by: Gergo Ujhelyi's avatarGergo Ujhelyi <ujhelyi.gergo@ericsson.com>
parent cd256a91
......@@ -31,8 +31,25 @@ public class IPL4asp__PT_PROVIDER extends TitanPort {
private static final int SOCK_LIST_SIZE_MIN = 16;
private static final int IPL4_COOKIE_SECRET_LENGTH = 16;
private static final int SO_MAX_CONN = 50;
private InetAddress sockAddr;
private boolean debugAllowed;
private boolean alreadyComplainedAboutMsgLen;
private boolean mapped;
private int sockListSize;
private String defaultLocHost;
private int defaultLocPort;
private String defaultRemHost;
private int defaultRemPort;
private int default_mode;
private int default_proto;
private boolean connId_release_confirmed;
public static enum SSL_STATES {
STATE_DONT_RECEIVE, STATE_WAIT_FOR_RECEIVE_CALLBACK, STATE_BLOCK_FOR_SENDING, STATE_DONT_CLOSE, STATE_NORMAL,
STATE_CONNECTING, STATE_HANDSHAKING
......@@ -53,6 +70,17 @@ public class IPL4asp__PT_PROVIDER extends TitanPort {
}
public IPL4asp__PT_PROVIDER(String port_name) {
//TODO: IPL4debug()
System.out.println("IPL4asp__PT_PROVIDER.IPL4asp__PT_PROVIDER: enter");
debugAllowed = false;
alreadyComplainedAboutMsgLen = false;
mapped = false;
sockListSize = SOCK_LIST_SIZE_MIN;
defaultLocHost = "";
defaultLocPort = 9999;
defaultRemHost = null;
defaultRemPort = -1;
connId_release_confirmed = false;
// TODO Auto-generated constructor stub
}
......@@ -289,4 +317,93 @@ public class IPL4asp__PT_PROVIDER extends TitanPort {
this.arpMaxParallelRequestCount = 50;
}
}
public static class IPAddrLease {
public TitanCharString ifName;
public TitanCharString leaseFile;
}
public static class GlobalConnOpts {
private static final int NOT_SET = -1;
private static final int NO = 0;
private static final int YES = 1 ;
private static final int METHOD_ZERO = 0;
private static final int METHOD_ONE= 1;
private static final int METHOD_TWO = 2;
int connection_method; /* METHOD_ZERO, METHOD_ONE, METHOD_TWO*/
int tcpReuseAddr; /* YES, NO, NOT_SET */
int udpReuseAddr; /* YES, NO, NOT_SET */
int sctpReuseAddr; /* YES, NO, NOT_SET */
int sslReuseAddr; /* YES, NO, NOT_SET */
int tcpKeepAlive; /* YES, NO, NOT_SET */
int tcpKeepCnt; /* NOT_SET, 0.. */
int tcpKeepIdle; /* NOT_SET, 0.. */
int tcpKeepIntvl; /* NOT_SET, 0.. */
int sslKeepAlive; /* YES, NO, NOT_SET */
int sslKeepCnt; /* NOT_SET, 0.. */
int sslKeepIdle; /* NOT_SET, 0.. */
int sslKeepIntvl; /* NOT_SET, 0.. */
int extendedPortEvents;/* YES, NO, NOT_SET */
int sinit_num_ostreams; /* 64, 0.. */ //sctp specific params starts here
int sinit_max_instreams; /* 64, 0.. */
int sinit_max_attempts; /* 0, 0.. */
int sinit_max_init_timeo; /* 0, 0.. */
int sctp_data_io_event; /* YES, NO, NOT_SET */
int sctp_association_event; /* YES, NO, NOT_SET */
int sctp_address_event; /* YES, NO, NOT_SET */
int sctp_send_failure_event; /* YES, NO, NOT_SET */
int sctp_peer_error_event; /* YES, NO, NOT_SET */
int sctp_shutdown_event; /* YES, NO, NOT_SET */
int sctp_partial_delivery_event; /* YES, NO, NOT_SET */
int sctp_adaptation_layer_event; /* YES, NO, NOT_SET */
int sctp_authentication_event; /* YES, NO, NOT_SET */;
int sctp_sender_dry_event;
int tcp_nodelay; /* YES, NO, NOT_SET */
int sctp_nodelay; /* YES, NO, NOT_SET */
int freebind;
SSL_Suport ssl_supp;
String dtlsSrtpProfiles; /* SRTP_AES128_CM_SHA1_32:SRTP_AES128_CM_SHA1_80 */;
int dscp; /* NOT_SET, 0.. */
public GlobalConnOpts() {
this.connection_method = METHOD_ZERO;
this.tcpReuseAddr = YES;
this.udpReuseAddr = YES;
this.sctpReuseAddr = YES;
this.sslReuseAddr = YES;
this.tcpKeepAlive = NOT_SET;
this.tcpKeepCnt = NOT_SET;
this.tcpKeepIdle = NOT_SET;
this.tcpKeepIntvl = NOT_SET;
this.sslKeepAlive = NOT_SET;
this.sslKeepCnt = NOT_SET;
this.sslKeepIdle = NOT_SET;
this.sslKeepIntvl = NOT_SET;
this.extendedPortEvents = NO;
this.sinit_num_ostreams = 64;
this.sinit_max_instreams = 64;
this.sinit_max_attempts = 0;
this.sinit_max_init_timeo = 0;
this.sctp_data_io_event = YES;
this.sctp_association_event = YES;
this.sctp_address_event = YES;
this.sctp_send_failure_event = YES;
this.sctp_peer_error_event = YES;
this.sctp_shutdown_event = YES;
this.sctp_partial_delivery_event = YES;
this.sctp_adaptation_layer_event = YES;
this.sctp_authentication_event = NO;
this.sctp_sender_dry_event = NO;
this.tcp_nodelay = NOT_SET;
//this.ssl_nodelay = NOT_SET;
this.sctp_nodelay = NOT_SET;
this.freebind=NOT_SET;
this.ssl_supp= new SSL_Suport(YES, YES, YES, YES, YES, YES, YES);
this.dtlsSrtpProfiles = null;
this.dscp = NOT_SET;
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment