ÿþU n i c o d e . {SO-NeÁTJSèR
/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* E x p l i c i t D i s t r i b u t i o n D e c l a r a t i o n *
* T h i s p r o g r a m i s n o t w e l c o m e d t o b e m o d i f i e d o r u s e d b y , o r , i f *
* p o s s i b l e , r e d i s t r i b u t e d t o p e o p l e w h o d i s c r i m i n a t e a g a i n s t p e o p l e *
* b a s e d s o l e l y o n r a c e , g e n d e r o r s e x u a l o r i e n t a t i o n . *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
C o p y r i g h t 2 0 1 0 A l l e n T s e
L i c e n s e d u n d e r t h e A p a c h e L i c e n s e , V e r s i o n 2 . 0 ( t h e " L i c e n s e " ) ;
y o u m a y n o t u s e t h i s f i l e e x c e p t i n c o m p l i a n c e w i t h t h e L i c e n s e .
Y o u m a y o b t a i n a c o p y o f t h e L i c e n s e a t
h t t p : / / w w w . a p a c h e . o r g / l i c e n s e s / L I C E N S E - 2 . 0
U n l e s s r e q u i r e d b y a p p l i c a b l e l a w o r a g r e e d t o i n w r i t i n g , s o f t w a r e
d i s t r i b u t e d u n d e r t h e L i c e n s e i s d i s t r i b u t e d o n a n " A S I S " B A S I S ,
W I T H O U T W A R R A N T I E S O R C O N D I T I O N S O F A N Y K I N D , e i t h e r e x p r e s s o r i m p l i e d .
S e e t h e L i c e n s e f o r t h e s p e c i f i c l a n g u a g e g o v e r n i n g p e r m i s s i o n s a n d
l i m i t a t i o n s u n d e r t h e L i c e n s e .
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
E Z C o m m i s a n e a s y T C P / U D P c o m m u n i c a t i o n t o o l d i s p l a y i n g e v e r y t h i n g i t
r e c e i v e s a n d s e n d i n g e v e r y t h i n g y o u i n p u t . O n l y g r a p h i c a l i n t e r f a c e
s u p p o r t e d s o f a r . I f s o u r c e c o d e i s d o w n l o a d e d a n d y o u w a n t t o b u i l d t h e
a p p l i c a t i o n y o u r s e l f , U l t i m a t e + + i s n e e d e d .
T h e i n t e r f a c e i s s p l i t i n t o t w o p a r t s , l o c a l a n d r e m o t e . I f n o l o c a l
a d d r e s s i s i n p u t , a l l i n t e r f a c e s a r e t r i e d . I f n o l o c a l p o r t i s i n p u t ,
a v a l i d o n e i s a u t o m a t i c a l l y c h o s e n . I f l i s t e n i n g i s r e q u e s t e d , r e m o t e
a d d r e s s a n d p o r t a r e n o t n e e d e d t o b e p r o v i d e d . W h e n a n a c t i o n i s r e q u e s t e d
w i t h o u t n e c e s s a r y i n f o r m a t i o n , s u c h a s a d d r e s s o r p o r t , c o r r e s p o n d i n g
i n p u t f i e l d s w i l l b e m a r k e d o u t .
I f a n a d d r e s s f r e q u e n t l y s e n d s d a t a t o a n o t h e r a d d r e s s w i t h i n a p e r i o d , i t
m a y b e f l o o d i n g o r a t t a c k i n g . W h e n a n t i - f l o o d i s e n a b l e d , t h e l e n g t h o f t h i s
p e r i o d a n d t h e n u m b e r o f m e s s a g e s t h a t t r i g g e r s t h i s f u n c t i o n c a n b o t h b e
c o n f i g u r e d . T h e f l o o d i n g p a r t y w i l l b e d i s c o n n e c t e d a n d i t s a d d r e s s w i l l b e
a d d e d t o b l a c k l i s t , s o t h a t w i t h i n s o m e t i m e ( t h e l e n g t h o f t h i s p e r i o d c a n
b e c o n f i g u r e d , t o o ) i t w i l l s t i l l b e b l o c k e d .
L o g g i n g c a n b e e n a b l e d . A l o g f i l e i s a n X M L f i l e , v e r s i o n e d 1 . 0 . T h e r o o t
n o d e i s D o c u m e n t . T h e f i r s t c h i l d n o d e ' s n a m e i s E Z _ C o m m a n d t h e f i l e ' s
t y p e , p r o g r a m ' s v e r s i o n a n d l i n k a r e t h e n o d e ' s a t t r i b u t e s . T y p e c a n b e
l o g ( d e s c r i b e d i n t h i s p a r a g r a p h ) , b a t ( a u t o m a t i c m o d e g u i d e f i l e , d e s c r i b e d
i n t h e n e x t p a r a g r a p h ) o r c f g ( n o t s u p p o r t e d y e t ) . I n f o r m a t i o n i s a d d e d a s
o t h e r n o d e s a n d s y s t e m ' s t i m e w i l l b e t h e i r a t t r i b u t e s .
T h r e e m o d e s a r e s u p p o r t e d , k e y b o a r d , f i l e a n d a u t o m a t i c m o d e . A u t o m a t i c
m o d e i s u n d e r c o n s t r u c t i o n .
I n k e y b o a r d m o d e , w h a t u s e r i n p u t i s s e n t d i r e c t l y i n A S C I I .
I n f i l e m o d e , u s e r c h o o s e s a f i l e t o s e n d . A n A S C I I 1 i s t h e f i r s t b y t e i n
t h e o u t g o i n g b u f f e r . T h e n c o m e s t h e f i l e n a m e , p a c k e t n u m b e r a n d f i l e c o n t e n t
l e n g t h , a l l i n s e p a r a t e a n g l e b r a c k e t s . A n d a f t e r t h a t , t h e f i l e ' s c o n t e n t i s
a p p e n d e d . W h e n a f i l e i s r e c e i v e d i n t h i s m o d e , u s e r i s p r o m p t e d t o s a v e i t o r
d i s c a r d i t . O n l y a f t e r a f o r m e r i n c o m i n g f i l e i s d e a l t w i t h w i l l a n o t h e r f i l e
b e p r o m p t e d .
I n a u t o m a t i c m o d e , a b a t c h f i l e i s n e e d e d s o t h a t t h i s p r o g r a m c a n w o r k o n
i t s o w n . R e f e r t o l o g f i l e f o r m a t f o r g e n e r a l i n f o r m a t i o n . T h e E Z _ C o m m n o d e
c a n h a v e a n o p t i o n a l a t t r i b u t e t o s a v e l o g f i l e . I t s n a m e i s l o g a n d i t s v a l u e
i s t h e f i l e ' s n a m e . T h e l i n k a t t r i b u t e i s o p t i o n a l .
A l l n o d e s a f t e r t h e f i r s t a c t i o n n o d e ( r e f e r t o t h e t e x t b e l o w ) , i n c l u d i n g
t h e f i r s t a c t i o n n o d e , c a n h a v e a t t r i b u t e b o o k m a r k , w h o s e v a l u e s h o u l d b e
u n i q u e a c r o s s t h e f i l e , t o m a r k a p o s i t i o n i n t h e p r o c e d u r e . T h e n a m e
e z c o m m . s t a r t i s r e s e r v e d w h i c h m a r k s t h e f i r s t a c t i o n n o d e .
O t h e r n o d e s w i t h t h e n a m e s i n t h e t a b l e b e l o w a r e p r o c e s s e d . T h e s e n o d e s
a r e r e f e r r e d t o a s a c t i o n n o d e s . T h e f i r s t a c t i o n n o d e m u s t b e o n t h e s a m e
l e v e l a s E Z _ C o m m n o d e . I f a n d o n l y i f a n a c t i o n ' s r e s u l t i s s u c c e s s f u l ( r e f e r
t o i f d e s c r i p t i o n i n t h e t a b l e b e l o w ) , i t s s u b - n o d e s w i l l b e p r o c e s s e d . N o t e
t h a t t h o u g h s o m e a t t r i b u t e v a l u e s a r e i g n o r e d , t h e y m u s t b e p r o v i d e d a c c o r d i n g
t o X M L f o r m a t .
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
| n o d e n a m e | a t t r i b u t e o r B O D Y | r e s u l t ( o r v a r i a b l e R E S U L T ) |
| - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| c o m p u t e | * g e t - v a r i a b l e n a m e . T h a t | A v a r i a b l e n a m e f o l l o w e d b y |
| | v a r i a b l e ' s v a l u e w i l l b e | a n u m b e r , s t r i n g , b o o l e a n , |
| | u s e d a s a n o p e r a n d . | o r a n o t h e r v a r i a b l e n a m e , |
| | * n u m b e r - v a r i a b l e n a m e w h e n | c a n s e t t h e l e f t o p e r a n d . |
| | s e t t i n g a n n u m b e r . | C o n v e r t i n g a n n u m b e r t o o r |
| | * s t r i n g - v a r i a b l e n a m e w h e n | f r o m a s t r i n g i s a l l o w e d . |
| | s e t t i n g a s t r i n g . | R T T P _ R G H T - s u c c e e d e d |
| | * b o o l e a n - v a r i a b l e n a m e w h e n | R T T P _ M N E R - d a t a t y p e s |
| | s e t t i n g a b o o l e a n . | m i s m a t c h |
| | * o p e r a t o r - o n e o f o p e r a t o r s , | R T T P _ C R E R - i n c o m p l e t e |
| | + , - , * , / f o r i n t e g e r s . O n e | a t t r i b u t e s |
| | o f o p e r a t o r s , a p p e n d , f i n d , | V a r i a b l e V A L U E s t o r e s f i n a l |
| | l e n g t h , r e m o v e f o r s t r i n g s . | r e s u l t w h e n n o t s e t t i n g a |
| | ( A t t r i b u t e s b e l o w c a n n o t b e | v a r i a b l e . T h e r e s u l t s o f |
| | o p e r a n d s . ) | f i n d a n d l e n g t h a r e n u m b e r s . |
| | * t i m e - t o g e t c u r r e n t t i m e | r e m o v e s e t s n o r e s u l t . |
| | | V a r i a b l e V A L U E s t o r e s c u r r e n t |
| | * t i c k - t o g e t c u r r e n t s y s t e m | d a t e a n d t i m e . |
| | t i c k | V a r i a b l e V A L U E s t o r e s c u r r e n t |
| | | s y s t e m t i c k . |
| - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| i f | * g e t , i n t e g e r , s t r i n g , o r | B o o l e a n s a r e c h e c k e d a g a i n s t |
| | b o o l e a n - s a m e a s i n c o m p u t e | T R U E . N u m b e r s a r e c h e c k e d |
| | * o p e r a t o r - o n e o f o p e r a t o r s , | a g a i n s t n o n - z e r o . R e f e r t o |
| | <