To prevent normal routing of packets in main connection after connecting new connection like vpn, should disable use default gateway on remote network on vpn connection properties->Networking->IP Properties->General Advanced, and to enable routing of packets of vpn to appropriate destination add the following to the route table:
route add dest-addresses mask dest-addr-mask gateway-ip
route add 192.168.0.0 mask 255.255.0.0 192.168.100.120
Wednesday, February 6, 2008
Wednesday, January 30, 2008
Presenting of Point Code in SCCP Called Party
The way to set Present of PC in Called and Calling Party of SCCP layer in dialogic host software is setting ext_options of SCCP_Config command which is 16 MSB of 32bits option parameter.
Presence of PC in CDPA is equal to set bit #2.
SCCP_CONFIG 10278 0x8 0x00020102 0x00000001
Detail of setting these bits is discussed on SCCP Programmers Manual, ext_options section.
Presence of PC in CDPA is equal to set bit #2.
SCCP_CONFIG 10278 0x8 0x00020102 0x00000001
Detail of setting these bits is discussed on SCCP Programmers Manual, ext_options section.
Sunday, January 27, 2008
Cisco Telnet Session Timeout
line vty 0 4
-->exec-timeout 5 0 // Session will be disconected after 5 min of inactivity
-->logout-warning 60 //Warning timeout before automatically logoff
-->absolute-timeout 15 //After 15 min router wil disconnect telnet session
-->exec-timeout 5 0 // Session will be disconected after 5 min of inactivity
-->logout-warning 60 //Warning timeout before automatically logoff
-->absolute-timeout 15 //After 15 min router wil disconnect telnet session
Sunday, January 20, 2008
Change Structure Member Alignmment
To change memory alignment in VC++ or diable it(set it to 1 byte) use /Zp[num] (num 1,2,4,8,16) in compiler command line or set it through ProjProp->C/C++->Code generation->Struct Member Alignment
Thursday, January 17, 2008
Randomization
srand(time(0)); // for seed based on current time
int k = 1 + rand() % 80; // for random number 1 to 80
int k = 1 + rand() % 80; // for random number 1 to 80
Monday, January 14, 2008
Start & Stop IN Application
In Siemens IN classic 7b, we can stop and start only SCP application with the following commands, without any need to restart SCP machine:
stop: mkup -dtK
start: mkup -rstK
*These command have to be run in instscp user context.
** The first application which comes up will become the master counter manager.
Other useful command in this subject:
Check Up & Down of process on local and remote hosts
mkup -iploc
mkup -iprem
Check master and slave Counter Manager
cmctx_ls -l
stop: mkup -dtK
start: mkup -rstK
*These command have to be run in instscp user context.
** The first application which comes up will become the master counter manager.
Other useful command in this subject:
Check Up & Down of process on local and remote hosts
mkup -iploc
mkup -iprem
Check master and slave Counter Manager
cmctx_ls -l
Wednesday, January 9, 2008
Unsigned Primitive Type in Java
1- You can use Javalution.org packages to use unsigned types.
2- Converting unsigned types to standard java types:
byte b;
int i = b & 0xff;
int i;
long l = i & 0xffffffffL;
3- Combining two unsigned shorts into an unsigned int.
short ush = 4;
short usl = 9999;
int ucombined = ( ush & 0xffff ) << 16 | ( usl & 0xffff );
4-/**
* Convert an unsigned int to a String.
* @param i the int to convert.
* @return the equivalent unsigned String
*/
public static void unsignedToString( int i )
{
return Long.toString( i & 0xffffffffL )
}
2- Converting unsigned types to standard java types:
byte b;
int i = b & 0xff;
int i;
long l = i & 0xffffffffL;
3- Combining two unsigned shorts into an unsigned int.
short ush = 4;
short usl = 9999;
int ucombined = ( ush & 0xffff ) << 16 | ( usl & 0xffff );
4-/**
* Convert an unsigned int to a String.
* @param i the int to convert.
* @return the equivalent unsigned String
*/
public static void unsignedToString( int i )
{
return Long.toString( i & 0xffffffffL )
}
Subscribe to:
Posts (Atom)
