Вы находитесь на странице: 1из 72

ABSTRACT

We study routing misbehavior in MANETs (Mobile Ad Hoc Networks) in this


paper !n general" routing protocols #or MANETs are designed based on the assumption
that all participating nodes are #ully cooperative However" due to the open structure and
scarcely available battery$based energy" node misbehaviors may e%ist &ne such routing
misbehavior is that some sel#ish nodes will participate in the route discovery and
maintenance processes but re#use to #orward data packets !n this paper" we propose the
'A() scheme that serves as an add$on techni*ue #or routing schemes to detect routing
misbehavior and to mitigate their adverse e##ect The main idea o# the 'A() scheme is to
send two$hop acknowledgment packets in the opposite direction o# the routing path !n
order to reduce additional routing overhead" only a #raction o# the received data packets
are acknowledged in the 'A() scheme Analytical and simulation results are presented
to evaluate the per#ormance o# the proposed scheme
1

Table of Contents
Chapter No Title Page No
Abstract.v
1 Introduction.. 1
++ purpose +
+' E%isting ,ystem '
+- .roposed ,ystem '
+/ scope '
Re!uire"ents#
'+ ,01( Methodology -
'' 2unctional 3e*uirement 4
'- Non$ 2unctional 3e*uirements 4
'/ Hardware 3e*uirements 5
'6 ,o#tware 3e*uirements 5
# Revie$ of %iterature...&
-+ !ntroduction 7
-' Technical 1iterature 7
-- &perational 1iterature 7
-/ Economic 1iterature 8
-6 The 'A() scheme 8
' Soft$are Re!uire"ents Anal(sis1
/+ &verview +'
2
/' Modules +/

) Soft$are *esign.1+
6+ 9se (ase 0iagram +5
6' (lass 0iagram '+
6- ,e*uence 0iagram '/
6/ (ollaboration 0iagram '5
66 Activity 0iagram -:
64 (omponent 0iagram --
65 0eployment 0iagram -/
+ Coding,Code Te"plates.#)
- S(ste" Testing.)
& .utput Screens...)/
Conclusion..++
0uture 1nhance"ents+-
References+&
%ist of 0igures
0ig No Title Page No
'+ ,piral Model 6
6+ 9se case 0iagram ':
6' (lass 0iagram '-
3
6- ,e*uence diagram #or connection establishment '/
6/ ,e*uence diagram #or data transmission '6
66 ,e*uence 0iagram #or routing packets '4
64 (ollaboration 0iagram #or connection establishment '5
65 (ollaboration 0iagram #or data transmission '7
67 (ollaboration 0iagram #or routing packets '8
68 Activity diagram #or connection Establishment -:
6+: Activity diagram #or data transmission -+
6++ Activity diagram #or routing packets -'
6+' (omponent 0iagram --
6+- 0eployment 0iagram -/
4+ 0evelopment process o# ;ava .rogram -5
4' ;ava Architecture -7
5+ Testing techni*ue < tool selection process 64
7+ ,tatus display page 68
7' 9ser 1ogin page 4:
7- 0ata 2rom ,ource page 4+
7/ 2ile #rom ,ystem page 4'
76 )ey page 4-
74 )ey generation page 4/
C2APT1R31
INTR.*4CTI.N
The system is acknowledgement based approach #or detection o# routing misbehavior
in MANET Here MANET is e%panded as Mobile Ad$hoc Network !t is collection o#
mobile nodes which communicate with each other via wireless links !n between nodes
4
there will be routers Now" #rom one node to another node packets are transmitted
0uring this process the packets #rom source to destination may be transmitted through
intermediate nodes 2or transmitting packets #rom source to destination there may be
several routes !n this conte%t routing is important operation in the #unction o# MANET
The operation o# MANET also doesn=t depend on e%isting in#rastructure base stations
Thus routing is dynamic in MANET ,ince it is a wireless network" network topology
rapidly changes Now" routing o# packets becomes more comple% in this MANET which
is large scale mobile dynamic network Even in MANET there may be two types>
+ (losed MANET
' &pen MANET
!n closed MANET all nodes co$operate each other with common goals !n open
MANET there is no coordination among nodes This again increases comple%ity o#
routing !n this environment o# comple% routing there may be routing misbehavior
3outing misbehavior means the direction o# routing to destination suddenly changes in a
wrong way Now" we are introducing a system which detects misbehavior more
e##iciently and accurately with acknowledgement This scheme is also called 'A()
scheme The idea is when a packet #orwards to ne%t hop success#ully the ne%t hop will
send an acknowledgement to the previous node to indicate the route is correct up to so
#ar This system is implementing 'A() scheme using 0,3 protocol
1.1 Purpose
The main purpose o# the system is detection o# routing misbehavior in a comple% large
scale heterogeneous mobile dynamic network in transmitting data packets #rom source to
destination !t also aims to detect misbehavior o# routing more e##iciently" accurately"
#astly !ts ob?ective and main purpose is low #alse alarm rate" low missed detection rate
The purpose o# using 'A() scheme is to enhance the e##ect o# 0,3 protocol
1. 15isting S(ste"
The e%isting system works with 0,3 algorithm in which we have the overhead in
sending #ull data packet as acknowledgement This can be eliminated in our proposed
system And in this we also detect the link misbehaviors
5
1.# Proposed S(ste"
!n our proposed system we are using a special scheme called 'A() in order to detect
the routing misbehaviors in mobile ad$hoc networks This scheme is an add on
techni*ue to the dsr algorithm
1.' Pro6ect Scope
The scope o# this system is to provide e##icient" accurate routing o# data packets in
heterogeneous mobile dynamic network MANET" so that the users working at di##erent
workstations in MANET cannot su##er #rom congestion and delay in transmission
C2APT1R3
R174IR181NTS
.1 S*%C 8ethodolog(
This document play a vital role in the development o# li#e cycle (,01() as it describes
the complete re*uirement o# the system !t means #or use by developers and will be the
6
basic during testing phase Any changes made to the re*uirements in the #uture will have
to go through #ormal change approval process
,.!3A1 M&0E1 was de#ined by @arry @oehm in his +877 article" AA spiral Model o#
,o#tware 0evelopment and Enhancement This model was not the #irst model to discuss
iterative development" but it was the #irst model to e%plain why the iteration models
As originally envisioned" the iterations were typically 4 months to ' years long Each
phase starts with a design goal and ends with a client reviewing the progress thus #ar
Analysis and engineering e##orts are applied at each phase o# the pro?ect" with an eye
toward the end goal o# the pro?ect
The steps #or ,piral Model can be generaliBed as #ollows>
The new system re*uirements are de#ined in as much details as possible This
usually involves interviewing a number o# users representing all the e%ternal
or internal users and other aspects o# the e%isting system
A preliminary design is created #or the new system
A #irst prototype o# the new system is constructed #rom the preliminary
design This is usually a scaled$down system" and represents an
appro%imation o# the characteristics o# the #inal product
A second prototype is evolved by a #our#old procedure>
Evaluating the #irst prototype in terms o# its strengths" weakness"
and risks
0e#ining the re*uirements o# the second prototype
.lanning an designing the second prototype
(onstructing and testing the second prototype
7
At the customer option" the entire pro?ect can be aborted i# the risk is deemed
too great 3isk #actors might involved development cost overruns" operating$
cost miscalculation" or any other #actor that could" in the customer=s ?udgment"
result in a less$than$satis#actory #inal product
The e%isting prototype is evaluated in the same manner as was the previous
prototype" and i# necessary" another prototype is developed #rom it according
to the #our#old procedure outlined above
The preceding steps are iterated until the customer is satis#ied that the re#ined
prototype represents the #inal product desired
The #inal system is constructed" based on the re#ined prototype
The #inal system is thoroughly evaluated and tested 3outine maintenance is
carried on a continuing basis to prevent large scale #ailures and to minimiBe
down time
The follo$ing diagra" sho$s ho$ a spiral "odel acts li9e
8
2ig '+ ,piral Model
Advantages
Estimates(ie budget" schedule etc ) become more relistic as work progresses"
because important issues discoved earlier
!t is more able to cope with the changes that are so#tware development
generally entails
,o#tware engineers can get their hands in and start woring on the core o# a
pro?ect earlier
. 0unctional Re!uire"ents
,elect network
9
,elect the nodes" routers
(hose source and destination nodes
,end data packets to destination
Apply 'A() scheme
2inally show the output
.# Non3 0unctional Re!uire"ents
The ma?or non$#unctional 3e*uirements o# the system are as #ollows
9sability
The system is designed with completely automated process hence there is no or
less user intervention
3eliability
The system is more reliable because o# the *ualities that are inherited #rom the
chosen plat#orm ?ava The code built by using ?ava is more reliable
.er#ormance
This system is developing in the high level languages and using the advanced
#ront$end and back$end technologies it will give response to the end user on client
system with in very less time
,upportability
The system is designed to be the cross plat#orm supportable The system is
supported on a wide range o# hardware and any so#tware plat#orm" which is
having ;CM" built into the system
!mplementation
The system is implemented in web environment The apache tomcat is used as the
web server and windows %p pro#essional is used as the plat#orm
!nter#ace The user inter#ace is based on HTM1 and DHTM1
10
.' 2ard$are Re!uire"ents
.entium / processor
+ E@ 3AM
7: E@ Hard 0isk ,pace
.) Soft$are Re!uire"ents
Microso#t Windows D. .ro#essional
;0) 4:
2lash player
11
C2APT1R3#
R1:I1; .0 %IT1RAT4R1
#.1 Introduction
A 3eview o# 1iterature is a high$level capsule version o# the entire ,ystem analysis
and 0esign .rocess The study begins by classi#ying the problem de#inition 2easibility is
to determine i# it=s worth doing &nce an acceptance problem de#inition has been
generated" the analyst develops a logical model o# the system A search #or alternatives is
analyBed care#ully There are - parts in 1iterature ,urvey
#. Technical Surve(
Evaluating the technical #easibility is the trickiest part o# a #easibility study This
is because" at this point in time" not too many detailed design o# the system" making it
di##icult to access issues like per#ormance" costs on (on account o# the kind o# technology
to be deployed) etc A number o# issues have to be considered while doing a technical
analysis 9nderstand the di##erent technologies involved in the proposed system be#ore
commencing the pro?ect we have to be very clear about what are the technologies that are
to be re*uired #or the development o# the new system 2ind out whether the organiBation
currently possesses the re*uired technologies !s the re*uired technology available with
the organiBationF
#.# .perational Surve(
.roposed pro?ect is bene#icial only i# it can be turned into in#ormation systems
that will meet the organiBations operating re*uirements ,imply stated" this test o#
#easibility asks i# the system will work when it is developed and installed Are there
ma?or barriers to !mplementationF Here are *uestions that will help test the operational
#easibility o# a pro?ect !s there su##icient support #or the pro?ect #rom management #rom
usersF !# the current system is well liked and used to the e%tent that persons will not be
able to see reasons #or change" there may be resistance
12
Are the current business methods acceptable to the userF !# they are not" 9sers may
welcome a change that will bring about a more operational and use#ul systems
Have the user been involved in the planning and development o# the pro?ectF
Early involvement reduces the chances o# resistance to the system and in general and
increases the likelihood o# success#ul pro?ect
,ince the proposed system was to help reduce the hardships encountered !n the e%isting
manual system" the new system was considered to be operational #easible
#.' 1cono"ic Surve(
Economic #easibility attempts ' weigh the costs o# developing and implementing
a new system" against the bene#its that would accrue #rom having the new system in
place This #easibility study gives the top management the economic ?usti#ication #or the
new system A simple economic analysis which gives the actual comparison o# costs and
bene#its are much more meaning#ul in this case !n addition" this proves to be a use#ul
point o# re#erence to compare actual costs as the pro?ect progresses There could be
various types o# intangible bene#its on account o# automation These could include
increased customer satis#action" improvement in product *uality better decision making
timeliness o# in#ormation" e%pediting activities" improved accuracy o# operations" better
documentation and record keeping" #aster retrieval o# in#ormation" better employee
morale
#.) The AC< sche"e
The watchdog detection mechanism has a very low overhead 9n#ortunately" the
watchdog techni*ue su##ers #rom several problems such as ambiguous collisions" receiver
collisions" and limited transmission power The main issue is that the event o# success#ul
packet reception can only be accurately determined at the receiver o# the ne%t$hop link"
but the watchdog techni*ue only monitors the transmission #rom the sender o# the ne%t$
hop link Noting that a misbehaving node can either be the sender or the receiver o# the
ne%t$hop link" we #ocus on the problem o# detecting misbehaving links instead o#
13
misbehaving nodes !n the ne%t$hop link" a misbehaving sender or a misbehaving receiver
has a similar adverse e##ect on the data packet> !t will not be #orwarded #urther The result
is that this link will be tagged &ur approach discussed here signi#icantly simpli#ies the
detection mechanism
*etails of the AC< Sche"e
The 'A() scheme is a network$layer techni*ue to detect misbehaving links and to
mitigate their e##ects !t can be implemented as an add$on to e%isting routing protocols #or
MANETs" such as 0,3 The 'A() scheme detects misbehavior through the use o# a new
type o# acknowledgment packet" termed 'A() A 'A() packet is assigned a #i%ed route
o# two hops (three nodes) in the opposite direction o# the data tra##ic route
2ig -+ the 'A() scheme
,uppose that N+" N'" and N- are three consecutive nodes (triplet) along a route The
route #rom a source node" ," to a destination node" 0" is generated in the 3oute 0iscovery
phase o# the 0,3 protocol When N+ sends a data packet to N' and N' #orwards it to N-"
it is unclear to N+ whether N- receives the data packet success#ully or not ,uch an
ambiguity e%ists even when there are no misbehaving nodes The problem becomes much
more severe in open MANETs with potential misbehaving nodes The 'A() scheme
re*uires an e%plicit acknowledgment to be sent by N- to noti#y N+ o# its success#ul
reception o# a data packet> When node N- receives the data packet success#ully" it sends
out a 'A() packet over two hops to N+ (ie" the opposite direction o# the routing path as
shown)" with the !0 o# the corresponding data packet The triplet (N+ $G N' $G N-) is
derived #rom the route o# the original data tra##ic ,uch a triplet is used by N+ to monitor
14
the link N' $G N- 2or convenience o# presentation" we term N+ in the triplet (N+ $G N'
$GN-) the 'A() packet receiver or the observing node and N- the 'A() packet sender
,uch a 'A() transmission takes place #or every set o# triplets along the route There#ore"
only the #irst router #rom the source will not serve as a 'A() packet sender The last
router ?ust be#ore the destination and the destination will not serve as 'A() receivers/
To detect misbehavior" the 'A() packet sender maintains a list o# !0s o# data packets
that have been sent out but have not been acknowledged 2or e%ample" a#ter N+ sends a
data packet on a particular path" say" (N+ $GN' $GN-) it adds the data !0 to 1!,T ie" on
its list corresponding to N' $GN-
A counter o# #orwarded data packets" (pkts" is incremented simultaneously At N+"
each !0 will stay on the list #or H seconds" the timeout #or 'A() reception !# a 'A()
packet corresponding to this !0 arrives be#ore the timer e%pires" the !0 will be removed
#rom the list &therwise" the !0 will be removed at the end o# its timeout interval and a
counter called (mis will be incremented When N- receives a data packet" it determines
whether it needs to send a 'A() packet to N+ !n order to reduce the additional routing
overhead caused by the 'A() scheme" only a #raction o# the data packets will be
acknowledged via 'A() packets ,uch a #raction is termed the acknowledgment ratio"
3ack @y varying 3ack" we can dynamically tune the overhead o# 'A() packet
transmissions Node N+ observes the behavior o# link N' $G N- #or a period o# time
termed Tobs At the end o# the observation period" N+ calculates the ratio o# missing
'A() packets as (misI(pkts and compares it with a threshold 3mis !# the ratio is
greater than 3mis" link N' $G N- is declared misbehaving and N+ sends out an 3E33 (or
the misbehavior report) packet ,ince only a #raction o# the received data packets are
acknowledged" 3mis should satis#y 3mis G + $ 3ack in order to eliminate #alse alarms
caused by such a partial acknowledgment techni*ue Each node receiving or overhearing
such an 3E33 marks the link N' $GN- as misbehaving and adds it to the blacklist o#
such misbehaving links that it maintains When a node starts its own data tra##ic later" it
will avoid using such misbehaving links as a part o# its route The 'A() scheme can be
summariBed in the pseudocode provided in the appendi% #or the 'A() packet sender side
(N-) and the observing node side (N+)
15
C2APT1R3'
S.0T;AR1 R174IR181NT ANA%=SIS
'.1 .vervie$
The #irst step in developing anything is to state the re*uirements This applies ?ust
as much to leading edge research as to simple programs and to personal programs" as well
as to large team e##orts @eing vague about your ob?ective only postpones decisions to a
later stage where changes are much more costly
The problem statement should state what is to be done and not how it is to be
done !t should be a statement o# needs" not a proposal #or a solution A user manual #or
the desired system is a good problem statement The re*uestor should indicate which
#eatures are mandatory and which are optional" to avoid overly constraining design
decisions The re*uestor should avoid describing system internals" as this restricts
implementation #le%ibility .er#ormance speci#ications and protocols #or interaction with
e%ternal systems are legitimate re*uirements ,o#tware engineering standards" such as
modular construction" design #or testability" and provision #or #uture e%tensions" are also
proper
Many problems statements" #rom individuals" companies" and government
agencies" mi%ture re*uirements with design decisions There may sometimes be a
compelling reason to re*uire a particular computer or languageJ there is rarely
?usti#ication to speci#y the use o# a particular algorithm The analyst must separate the
true re*uirements #rom design and implementation decisions disguised as re*uirements
The analyst should challenge such pseudo re*uirements" as they restrict #le%ibility There
may be politics or organiBational reasons #or the pseudo re*uirements" but at least the
analyst should recogniBe that these e%ternally imposed design decisions are not essential
#eatures o# the problem domain
A problem statement may have more or less detail A re*uirement #or a
conventional product" such as a payroll program or a billing system" may have
16
considerable detail A re*uirement #or a research e##ort in a new area may lack many
details" but presumably the research has some ob?ective" which should be clearly stated
Most problem statements are ambiguous" incomplete" or even inconsistent ,ome
re*uirements are ?ust plain wrong ,ome re*uirements" although precisely stated" have
unpleasant conse*uences on the system behavior or impose unreasonable implementation
costs ,ome re*uirements seem reasonable at #irst but do not work out as well as the
re*uest or thought The problem statement is ?ust a starting point #or understanding the
problem" not an immutable document The purpose o# the subse*uent analysis is to #ully
understand the problem and its implications There is no reasons to e%pect that a problem
statement prepared without a #ully analysis will be correct
The analyst must work with the re*uestor to re#ine the re*uirements so they
represent the re*uestor=s true intent This involves challenging the re*uirements and
probing #or missing in#ormation The psychological" organiBational" and political
considerations o# doing this are beyond the scope o# this book" e%cept #or the #ollowing
piece o# advice> !# you do e%actly what the customer asked #or" but the result does not
meet the customer=s real needs" you will probably be blamed anyway
.roblem in the e%isting system> !n general " we are transmitting the data packets
using some routing algorithms such as 0,0C" 0,3 etc These algorithms may allocate
the path to the destination in a network !n 0,3 we have two steps 2irst 3oute 0iscovery
and the second one is 3oute Maintenance !n the 3oute 0iscovery step it chooses
di##erent paths to the corresponding destination !n 3oute Maintenance step it maintains
the route to the destination until it send out the packets @ut in these cases there may be a
chance to lost the data !# we are using the acknowledgement scheme to noti#y the packet
delivery" it may not be #easible #or manets 2or eg a node knows the packet status o# its
neighbors only Then in order to achieve the high packet delivery we are introducing the
'A() scheme which sends two$hop acknowledgements

17
'. 8odules
!n our proposed system we have three modules as #ollows
+ Network connection module
' 0ata transmitting module
- 3outing module
Net$or9 connection "odule This module aims to provide various services to be
accessed by source node in mobile ad$hoc network in order to establish connection with
other dynamic nodes and also destination node !t supports #ollowing services>
Establishing network connection
T(. connection
90. connection
(hange connection
0isconnect
*ata trans"itting "odule This module provides various services related to
transmission o# data #rom source to destination" #orwarding data #rom one node to ne%t
intermediate node" sending acknowledgement to source to destination" acknowledgement
to destination by source so on The #ollowing are various services o##ered by this
module>
0etecting misbehavior
.er#ormance o# routing layer
(ommunicating with other nodes
,haring resources
,ending acknowledgement
,ending packets
3eceiving packets
Routing !n this module we mainly have route discovery and route maintenance This
module is accessed by source node and intermediate nodes during data transmission to
implement dynamic routing process The ob?ective o# this module is>
18
(omputing routing table
2ind route to the destination
2ind route to ne%t hop
9pdating dynamic routing table
(hange routes dynamically
19
C2APT1R3)
S.0T;AR1 *1SI>N
0esign is a meaning#ul engineering representation o# something that is to be built
,o#tware design is a process through which the re*uirements are translated into a
representation o# the so#tware 0esign is the place where *uality is #ostered in so#tware
engineering 0esign is the per#ect way to accurately translate a customer=s re*uirement in
to a #inished so#tware product 0esign creates a representation or model" provides detail
about so#tware data structure" architecture" inter#aces and components that are necessary
to implement a system This chapter discusses about the design part o# the pro?ect Here
in this document the various 9M1 diagrams that are used #or the implementation o# the
pro?ect are discussed
9ni#ied Modeling 1anguage (9M1) is a standardiBed general$purpose modeling
language in the #ield o# so#tware engineering The standard is managed" and was created
by" the &b?ect Management Eroup9M1 includes a set o# graphical notation techni*ues
to create visual models o# so#tware$intensive systems The 9ni#ied Modeling 1anguage
(9M1) is used to speci#y" visualiBe" modi#y" construct and document the arti#acts o# an
ob?ect$oriented so#tware intensive system under development 9M1 o##ers a standard
way to visualiBe a systemKs architectural blueprints" including elements such as>
actors
business processes
components
activities
programming language statements
database schemas" and reusable so#tware components
9M1 combines best techni*ues #rom data modeling (entity relationship diagrams)"
business modeling (work #lows)" ob?ect modeling" and component modeling !t can be
20
used with all processes" throughout the so#tware development li#e cycle" and across
di##erent implementation technologies 9M1 has +/ types o# diagrams divided into two
categories ,even diagram types represent structural in#ormation" and the other seven
represent general types o# behavior" including #our that represent di##erent aspects o#
interactions ,ome o# these diagrams can be categoriBed hierarchically as below>
&b?ect diagram
9se case diagram
(lass diagram
,e*uence diagram
Activity diagram
,tate machine
(omponent diagram
0eployment diagram
5.1 4se3case *iagra"
A 4se case diagra" in the 9ni#ied Modeling 1anguage (9M1) is a type o# behavioral
diagram de#ined by and created #rom a 9se$case analysis !ts purpose is to present a
graphical overview o# the #unctionality provided by a system in terms o# actors" their
goals (represented as use cases)" and any dependencies between those use cases The
main purpose o# a use case diagram is to show what system #unctions are per#ormed #or
which actor 3oles o# the actors in the system can be depicted
,ince our system mainly detects routing misbehavior in mobile ad$hoc networks Here
the role and responsibility o# mobile nodes is very important @y using routing protocols
the mobile nodes continuously communicating with other nodes and involves in detection
21
o# misbehavior o# nodes and mitigation According to this in#ormation the #ollowing
actors are involved in this system
+ ,ource node
' 0estination node
- !ntermediate node
Source node Here source node is a node which may be a computer or mobile device or
any router which tries to communicate with destination node and involves in detecting
routing misbehavior" routing tra##ic be#ore #orwarding packets (data tra##ic) to the ne%t
node in a path to destination
*estination node !t is also either a computer or mobile device or any router which is
sending #eedback" acknowledgement with communication #rom source node be#ore
receiving data packets and a#ter receiving data packets
Inter"ediate node !ntermediate node is an observer node or router in between source
node and destination node !n general it receives the data packet #rom source node and
#orwards it to other nodes towards the destination ,ometimes it may not #orward the data
packet due to sel#ishness
!n our system we may have the #ollowing use cases
+ 0etecting misbehavior
' 2inding per#ormance in routing layer
- (ommunicating with other nodes
/ Establishing network connection with other nodes
6 ,haring resources
4 ,ending acknowledgement
5 (omputing routing table
22
7 Authenticating packets
8 ,ending packets
+: 3eceiving packets
++ .artial data #orwarding
+' 0ata #orwarding in T(. tra##ic
+- 0ata #orwarding in 90. tra##ic
+/ &ne way acknowledgement
+6 Two way acknowledgement
+4 90. connection
+5 T(. connection
+7 3oute discovery
+8 3oute maintenance
': 3etransmit
'+ @u##ering
23
TCP connection
UDP connection
Route discovery
Route maintenance
Establish n/w connection
Sharing resources
Compute routing tables
Send pkt
Receive pkt
send and receive ack
Destination node
uthenticating pkts
Partial data !orwarding
Source node
Detect misbehavior
"ntermediate node
#u!!ering
2ig 6+ 9se (ase 0iagram
24
). Class *iagra"
A class diagra" in the 9ni#ied Modeling 1anguage (9M1) is a type o# static
structure diagram that describes the structure o# a system by showing the systemKs
classes" their attributes" and the relationships between the classes The class diagram is
the main building block in ob?ect oriented modeling They are being used both #or general
conceptual modeling o# the systematic o# the application" and #or detailed modeling
translating the models into programming code The classes in a class diagram represent
both the main ob?ects and or interactions in the application and the ob?ects to be
programmed !n the class diagram these classes are represented with bo%es which contain
three parts>
The upper part holds the name o# the class
The middle part contains the attributes o# the class" and
The bottom part gives the methods or operations the class can take or undertake
The main classes that are identi#ied in our system design are as #ollows>
Network
Node
,ourceNode
0estinationNode
!ntermediateNode
Acknowledgement
3oute
25
,No (lass Name Attributes &perations
+ Network networktype
noo#nodes
establish(on()
tcp(on()
udp(on()
change(on()
disconnect()
' Node nodeno
nodeaddress
#indNe%tNode()
communicate()
sendAck()
drop.kt()
- ,ourceNode address
timeout
targetaddress
delay
send.kt()
setCalidity()
setTimer()
clearTimer()
receiveAck()
/ !ntermediateNode address
counter
observperiod
timeout
#orward.kt()
bu##ering()
#ind.robability()
report()
6 0estinationNode address
srcaddress
receive0ata()
sendAck()
4 3oute distance
avgnoo#hops
#ind3outeto0estination()
#ind3outetoNe%tHop()
update3outingTable()
change3oute()
5 Acknowledgement ackratio
senderaddresss
receiveraddress
ackno
acktype
authenticateAck()
#ragment.kt()
7 .acket pktid
pktsiBe
partitioning()
assembling()
26
2ig 6' (lass 0iagram
*escription? This class diagram contains di##erent classes such as network" node"
packet" route" acknowledgement etc The node may be either source or intermediate or
destination node These nodes are connected in network And the packets can be routed
#rom one node to another node using di##erent routesJ a#ter packet has been received
acknowledgement is sent to sender node
5.3 Sequence Diagram
A se!uence diagra" in 9ni#ied Modeling 1anguage (9M1) is a kind o#
interaction diagram that shows how processes operate with one another and in what order
27
s$Source%ode
address string
timeout !loat
targetaddress string
delay int
sendPkt&'
check(alidity&'
setTimer&'
clearTimer&'
receiveck&'
i$"ntermediate%ode
address string
counter int
observperiod int
timeout int
!orwardPkt&'
bu!!ering&'
!indProbability&'
report&'
d$Destination%ode
address string
srcaddress string
receiveData&'
sendck&'
n$%etwork
networktype string
no)o!nodes int
establishCon&'
tcpCon&'
udpCon&'
changeCon&'
disconnect&'
r$Route
distnace int
avgnoo!hops int
!indRoutetoDestination&'
!indRouteto%e*t+op&'
updateRoutingTable&'
changeRoute&'
a$cknowledgement
ackratio !loat
senderaddress string
receiveraddress string
ackno int
acktype string
authenticateck&'
!ragmentPkt&'
n,$%ode
nodeno int
nodeaddress string
!ind%e*t%ode&'
communicate&'
sendck&'
dropPkt&'
,))- ,))-
--
--
p$Packet
pktid int
pktsi.e int
partitioning&'
assembling&'
--
!t is a construct o# a Message ,e*uence (hart ,e*uence diagrams are sometimes called
Event$trace diagrams" event scenarios" and timing diagrams A se*uence diagram shows"
as parallel vertical lines (li#elines)" di##erent processes or ob?ects that live simultaneously"
and" as horiBontal arrows" the messages e%changed between them" in the order in which
they occur This allows the speci#ication o# simple runtime scenarios in a graphical
manner
Se!uence diagra" for net$or9 connection establish"ent
s$Source n$%etwork i$"ntermediate
%ode
d$Destination
re/uest to establish
connection to intermediate node
connection to destination node
change connection
disconnect
disconnect
2ig 6- ,e*uence diagram #or connection establishment
*escription This se*uence diagram involves the ob?ects o# source" network"
intermediate node and destination ,ource re*uest #or network establishment" then the
network connect the source to intermediate node and then to destination node !# no
connection is needed then it disconnect the connection
Se!uence diagra" for data trans"ission
28
s$Source n$%etwork i$"ntremediate
%ode
d$destination a$cknowledge
ment
,)re/uest !or network
0)connecting to intermediate
1)connecting to
2)send data packet
3)!orward packet
4)receive packet
5)re/ to generate
ack
6)ack prepared
7)send ack
,8)i! no ack report to
source
2ig 6/ ,e*uence diagram #or data transmission

*escription !n this case source is connected to destination through several intermediate
nodes Then source sends packet to intermediate nodes and they #orward the packet to
destination node The destination node receive packet and generates acknowledgement
and this acknowledgement is sent back to previous nodes
29
Se!uence diagra" for routing pac9ets
s9Source r$Rroute i$"ntermediate
%ode
d$Destination n$%etwork
,)re/uest !or connection establishment
0)route discovery
1)connect to intermediate
2)connect to destination
3)change route
4)update routing
5)change the connection
2ig 66 ,e*uence 0iagram #or routing packets
*escription This diagram shows that at #irst network is established" then route is
discovered to connect to destination to route packets !n the network when the routes are
changed then the routing tables are updated" as a result new routes are established
30
5.4 Collaboration Diagram
A Collaboration diagra" also known as (ommunication diagram models the
interactions between ob?ects or parts in terms o# se*uenced messages (ommunication
diagrams represent a combination o# in#ormation taken #rom (lass" ,e*uence" and 9se
(ase 0iagrams describing both the static structure and dynamic behavior o# a system
(ommunication diagrams show a lot o# the same in#ormation as se*uence diagrams" but
because o# how the in#ormation is presented" some o# it is easier to #ind in one diagram
than the other (ommunication diagrams show which elements each one interacts with
better" but se*uence diagrams show the order in which the interactions take place more
clearly
Collaboration *iagra" for net$or9 connection establish"ent
1$ connection to destination node
s$Source n$%etwor
k
i$"ntermedia
te%ode
d$Destin
ation
,$ re/uest to establish connection
4$ disconnect
0$ connection to intermediate node
2$ change connection
3$ disconnect
2ig 64 (ollaboration 0iagram #or network connection establishment
31
Collaboration *iagra" for data trans"ission
2ig 65 (ollaboration 0iagram #or data transmission
Collaboration *iagra" for routing pac9ets
32
s$Source
n$%etwor
k
i$"ntremedia
te%ode
d$destin
ation
a$cknowle
dgement
,$ ,)re/uest !or network connection
0$ 0)connecting to intermediate node
1$ 1)connecting to destination
2$ 2)send data packet
3$ 3)!orward packet
4$ 4)receive packet
5$ 5)re/ to generate ack
6$ 6)ack prepared
7$ 7)send ack
,8$ ,8)i! no ack report to source
i$"ntermedia
te%ode
s9Source
r$Rroute
d$Destin
ation
n$%etwor
k
,$ ,)re/uest !or connection establishment
0$ 0)route discovery
1$ 1)connect to intermediate node
2$ 2)connect to destination node
3$ 3)change route
4$ 4)update routing tables
5$ 5)change the connection
2ig 67 (ollaboration 0iagram #or routing packets

33
5.5 Activity Diagram
An activity is an ongoing non atomic e%ecution with in a state machine Activity
ultimately results in some action" which is made up o# e%ecutable atomic operations that
results in a change in state o# the system or the return o# a value
Activit( diagra" for net$or9 connection establish"ent
Re/ !or n/w
establishment
Establishes
di!!erent routes
Connect to
intermediate nodes
Connect to
destination
%etwork
established
2ig 68 Activity diagram #or connection establishment
*escription This activity diagram shows that #irst the source re*uest #or network
establishment Then it establishes di##erent routes to connect to intermediate nodes and
destination node 2inally the connection is established between source and destination
through several intermediate nodes
34
Activit( diagra" for data trans"ission
"nitiali.e transmission
process by establishing n/w
"denti!y di!!erent routes
Choose appropriate route
Send data pkt to a node
i! it is
destination
Receive pkt and
send ack
& yes '
:orward pkt to another
node and send ack
& no '
i! any data lost
Send report to
previous nodes
& yes '
Transmission
success!ully completed
& no '
& again '
& timeout in receiving ack '
2ig 6+: Activity diagram #or connection establishment
*escription Here source initialiBes the transmission process by establishing the network
!t identi#ies di##erent routes and select appropriate route to send packet to destination
A#ter sending the packet that packet will be received by another node " i# the receiving
node is destination then it will send the acknowledgement to sender node !# the receiving
node is intermediate node then the packet will be #orwarded to ne%t node in the network
towards the destination !# there are any data losses that will be reported to previous
nodes" otherwise ie" i# no data losses are there then data transmission is completed
success#ully
35
Activit( diagra" for routing pac9ets

"nitiali.e routing
Route discovery
Route
maintenance
:orward pkt to
ne*t node
Pkt is received
by another node
Update routing
tables
send ack and routing
completed
i! destination
i! route changes
& yes '
& yes '
& no '

2ig 6++ Activity diagram #or connection establishment
*escription Here the source node initialiBes the routing process by route discovery and
route maintenance steps @y selecting better route packets will be transmitted 0ue to
dynamic changes in network the routing tables are updated regularly and based on those
tables subse*uent transmissions will be done
36
).+ Co"ponent *iagra"
A Co"ponent diagra" in the 9ni#ied Modeling 1anguage" depicts how
components are wired together to #orm larger components and or so#tware systems
(omponents are wired together by using an assembly connector to connect the
re*uired inter#ace o# one component with the provided inter#ace o# another
component (omponents diagrams can be used to illustrate the structure o#
arbitrarily comple% systems
send ack back to previous
nodes
%etwork
Datatransmission
Routing
Routediscovery
cknowledgement
Routemaintenance
2ig 6+' (omponent 0iagram
*escription The component diagram o# our system involves the components such as
network" routing" datatransmissions" and acknowledgement The routing component
associated with route discovery and route maintenance components Network component
is connected to routing and datatransmission components 0atatransmission involves
packet and acknowledgement transmissions
37
5.7 Deployment Diagram
A *eplo("ent diagra" in the 9ni#ied Modeling 1anguage serves to model the
physical deployment o# arti#acts on deployment targets 0eployment diagrams show Lthe
allocation o# Arti#acts to Nodes according to the 0eployments de#ined between themM
0eployment o# an arti#act to a node is indicated by placing the arti#act inside the node
!nstances o# nodes (and devices and e%ecution environments) are used in deployment
diagrams to indicate multiplicity o# these nodes 2or e%ample" multiple instances o# an
application server e%ecution environment may be deployed inside a single device node to
represent application server clustering
2ig 6+-
0eployment 0iagram
*escription This deployment diagram shows the di##erent nodes that involved in our
system This contains the source node" intermediate node and destination nodes
connected to network" which leads to the connections between source and destination
source and intermediate nodes or intermediate nodes and destination
38
Sourcenode
Destinationnode
%etwork
"ntermediatenode, "ntermediatenode0
"ntermediatenode1
C2APT1R3+
C.*IN>,C.*1 T18P%AT1S
A programming tool or so#tware tool is a program or application that so#tware
developers use to create" debug" maintain" or otherwise support other programs and
applications The term usually re#ers to relatively simple programs that can be combined
together to accomplish a task The (hapter describes about the so#tware tool that is used
in our pro?ect
@ava Technolog(
!nitially the language was called as AoakM but it was renamed as A;avaM in +886
The primary motivation o# this language was the need #or a plat#orm$independent (ie"
architecture neutral) language that could be used to create so#tware to be embedded in
various consumer electronic devices
;ava is a programmer=s language
;ava is cohesive and consistent
E%cept #or those constraints imposed by the !nternet environment" ;ava gives
the programmer" #ull control
2inally" ;ava is to !nternet programming where ( was to system programming
0eatures of @ava Securit(
Every time you that you download a AnormalM program" you are risking a viral
in#ection .rior to ;ava" most users did not download e%ecutable programs #re*uently" and
those who did scan them #or viruses prior to e%ecution Most users still worried about the
possibility o# in#ecting their systems with a virus !n addition" another type o# malicious
program e%ists that must be guarded against This type o# program can gather private
in#ormation" such as credit card numbers" bank account balances" and passwords ;ava
answers both these concerns by providing a A#irewallM between a network application and
your computer
39
When you use a ;ava$compatible Web browser" you can sa#ely download ;ava applets
without #ear o# virus in#ection or malicious intent
Portabilit(
2or programs to be dynamically downloaded to all the various types o# plat#orms
connected to the !nternet" some means o# generating portable e%ecutable code is
needed As you will see" the same mechanism that helps ensure security also helps create
portability !ndeed" ;ava=s solution to these two problems is both elegant and e##icient
The B(te code
The key that allows the ;ava to solve the security and portability problems is that
the output o# ;ava compiler is @yte code @yte code is a highly optimiBed set o#
instructions designed to be e%ecuted by the ;ava run$time system" which is called the ;ava
Cirtual Machine (;CM) That is" in its standard #orm" the ;CM is an interpreter #or byte
code
Translating a ;ava program into byte code helps makes it much easier to run a
program in a wide variety o# environments The reason is" once the run$time package
e%ists #or a given system" any ;ava program can run on it
Although ;ava was designed #or interpretation" there is technically nothing about
;ava that prevents on$the$#ly compilation o# byte code into native code ,un has ?ust
completed its ;ust !n Time (;!T) compiler #or byte code When the ;!T compiler is a part
o# ;CM" it compiles byte code into e%ecutable code in real time" on a piece$by$piece"
demand basis !t is not possible to compile an entire ;ava program into e%ecutable code
all at once" because ;ava per#orms various run$time checks that can be done only at run
time The ;!T compiles code" as it is needed" during e%ecution
@ava :irtual 8achine A@:8B
@eyond the language" there is the ;ava virtual machine The ;ava virtual machine is
an important element o# the ;ava technology The virtual machine can be embedded
within a web browser or an operating system &nce a piece o# ;ava code is loaded onto a
40
machine" it is veri#ied As part o# the loading process" a class loader is invoked and does
byte code veri#ication makes sure that the code that=s has been generated by the compiler
will not corrupt the machine that it=s loaded on @yte code veri#ication takes place at the
end o# the compilation process to make sure that is all accurate and correct ,o byte code
veri#ication is integral to the compiling and e%ecuting o# ;ava code
.verall *escription
0ig +.1 Picture sho$ing the develop"ent process of @A:A Progra"
;ava programming uses to produce byte codes and e%ecutes them The #irst bo%
indicates that the ;ava source code is located in a ;ava #ile that is processed with a ;ava
compiler called ?avac The ;ava compiler produces a #ile called a class #ile" which
contains the byte code The (lass #ile is then loaded across the network or loaded locally
on your machine into the e%ecution environment is the ;ava virtual machine" which
interprets and e%ecutes the byte code
@ava Architecture
;ava architecture provides a portable" robust" high per#orming environment #or
development ;ava provides portability by compiling the byte codes #or the ;ava Cirtual
Machine" which is then interpreted on each plat#orm by the run$time environment ;ava is
a dynamic system" able to load code when needed #rom a machine in the same room or
across the planet
Co"pilation of code
When you compile the code" the ;ava compiler creates machine code (called byte
code) #or a hypothetical machine called ;ava Cirtual Machine (;CM) The ;CM is
41
Java
Source
Java byte
code
JavaVM
Java
.Class
supposed to e%ecute the byte code The ;CM is created #or overcoming the issue o#
portability The code is written and compiled #or one machine and interpreted on all
machines This machine is called ;ava Cirtual Machine
2ig 4' ;ava Architecture
0uring run$time the ;ava interpreter tricks the byte code #ile into thinking that it is
running on a ;ava Cirtual Machine !n reality this could be a !ntel .entium Windows 86
or ,un,A3( station running ,olaris or Apple Macintosh running system and all could
receive code #rom any computer through !nternet and run the Applets
Si"ple
;ava was designed to be easy #or the .ro#essional programmer to learn and to use
e##ectively !# you are an e%perienced (NN programmer" learning ;ava will be even easier
@ecause ;ava inherits the (I(NN synta% and many o# the ob?ect oriented #eatures o# (NN
Most o# the con#using concepts #rom (NN are either le#t out o# ;ava or implemented in a
cleaner" more approachable manner !n ;ava there are a small number o# clearly de#ined
ways to accomplish a given task
42
Source
Code
..
..
..

PC Compiler
Macintosh
Compiler
SPARC
Compiler
Java
Byte code
(Platform
Independe
nt)
Java
Interpreter
(PC)
Java
Interpreter
(Macintosh)
Java
Interpreter
(Spare)
.b6ect3.riented
;ava was not designed to be source$code compatible with any other language This
allowed the ;ava team the #reedom to design with a blank slate &ne outcome o# this was
a clean usable" pragmatic approach to ob?ects The ob?ect model in ;ava is simple and
easy to e%tend" while simple types" such as integers" are kept as high$per#ormance non$
ob?ects
Robust
The multi$plat#orm environment o# the Web places e%traordinary demands on a
program" because the program must e%ecute reliably in a variety o# systems The ability
to create robust programs was given a high priority in the design o# ;ava ;ava is strictly
typed languageJ it checks your code at compile time and run time
;ava virtually eliminates the problems o# memory management and de$allocation" which
is completely automatic !n a well$written ;ava program" all run time errors can Oand
should Obe managed by your program
@A:A S;IN>
A S$ing Architecture .vervie$
Most ,wing developers know by now that ,wing components have a
separable model$and$view design And many ,wing users have run across articles
saying that ,wing is based on something called a Lmodi#ied MC( (model$view$
controller) architectureL
@ut accurate e%planations o# how ,wing components are designed" and how
their parts all #it together" have been hard to come by until now
43
The silence ends with the publication o# this article" a ma?or white paper on
,wing component design !t provides a comprehensive technical overview o# ,wingKs
modi#ied MC( structure and demysti#ies many other #acets o# ,wing component
architecture as well
This document presents a technical overview o# the ,wing component
architecture !n particular" it covers the #ollowing areas in detail>
0esign goals
3oots in MC(
,eparable model architecture
.luggable look$and$#eel architecture
*esign >oals
The overall goal for the S$ing pro6ect $as
To build a set o# e%tensible E9! components to enable developers to more
rapidly develop power#ul ;ava #ront ends #or commercial applications
To this end" the ,wing team established a set o# design goals early in the pro?ect
that drove the resulting architecture These guidelines mandated that ,wing would>
@e implemented entirely in ;ava to promote cross$plat#orm consistency and
easier maintenance
.rovide a single A.! capable o# supporting multiple look$and$#eels so that
developers and end$users would not be locked into a single look$and$#eel
Enable the power o# model$driven programming without re*uiring it in the
highest$level A.!
44
Adhere to ;ava@eans design principles to ensure that components behave
well in !0Es and builder tools
.rovide compatibility with AWT A.!s where there is overlapping" to leverage
the AWT knowledge base and ease porting
Roots in 8:C
,wing architecture is rooted in the model$view$controller (MC() design that
dates back to ,mallTalk MC( architecture calls #or a visual application to be
broken up into three separate parts>
A mode l that represents the data #or the application
The view that is the visual representation o# that data
A controller that takes use input on the view and translates that to changes
in the model

Early on" MC( was a logical choice #or ,wing because it provided a basis #or
meeting the #irst three o# our design goals within the bounds o# the latter two
The #irst ,wing prototype #ollowed a traditional MC( separation in which each
component had a separate model ob?ect and delegated its look$and$#eel implementation
to separate view and controller ob?ects
The delegate
45
We *uickly discovered that this split didnKt work well in practical terms because
the view and controller parts o# a component re*uired a tight coupling (#or
e%ample" it was very di##icult to write a generic controller that didnKt know speci#ics
about the view) ,o we collapsed these two entities into a single 9! (user$inter#ace)
ob?ect" as shown in this diagram>
(The 9! delegate ob?ect shown in this picture is sometimes called a delegate
ob?ect" or 9! delegate The 9! delegate used in ,wing is described in more detail in
the .luggable look$and$#eel section o# this article" under the subheading LThe 9!
delegateL)
As the diagram illustrates" ,wing architecture is loosely based O but not strictly
based $$ on the traditional MC( design !n the world o# ,wing " this new *uasi$
MC( design is sometimes re#erred to a separable model architecture
,wingKs separable model design treats the model part o# a component as a
separate element " ?ust as the MC( design does @ut ,wing collapses the view and
controller parts o# each component into a single 9! (user$inter#ace) ob?ect
Separable "odel architecture
!t is generally considered good practice to center the architecture o# an
application around its data rather than around its user inter#ace To support this
paradigm" ,wing de#ines a separate model inter#ace #or each component that has a
logical data or value abstraction This separation provides programs with the option
o# plugging in their own model implementations #or ,wing components
46
The #ollowing table shows the component$to$model mapping #or ,wing
Co"ponent 8odel Interface 8odel T(pe
;@utton @uttonModel E9!
;Toggle@utton @uttonModel E9!Idata
;(heck@o% @uttonModel E9!Idata
;3adio@utton @uttonModel E9!Idata
;Menu @uttonModel E9!
;Menu!tem @uttonModel E9!
;(heck@o%Menu!tem @uttonModel E9!Idata
;3adio@uttonMenu!tem @uttonModel E9!Idata
;(ombo@o% (ombo@o%Model data
;.rogress@ar @ounded3angeModel E9!Idata
;,croll@ar @ounded3angeModel E9!Idata
;,lider @ounded3angeModel E9!Idata
;Tabbed.ane ,ingle,electionModel E9!
;1ist 1istModel data
;1ist 1ist,electionModel E9!
;Table TableModel data
;Table Table(olumnModel E9!
47
;Tree TreeModel data
;Tree Tree,electionModel E9!
;Editor.ane 0ocument data
;Te%t.ane 0ocument data
;Te%tArea 0ocument data
;Te%t2ield 0ocument data
;.assword2ield 0ocument data

!n ,wing " classes that represent E9! components have names beginning with
the letter ; ,ome e%amples are ;@utton" ;1abel" and ;,lider Altogether there are
more than '6: new classes and 56 inter#aces in ,wing P twice as many as in
AWT
@ava S$ing class hierarch(
The class @Co"ponent" descended directly #rom (ontainer" is the root class #or most
o# ,wing=s user inter#ace components
48
,wing contains co"ponents that you=ll use to build a E9! ! am listing you some
o# the commonly used ,wing components To learn and understand these swing
programs" AWT .rogramming knowledge is not re*uired
@ava S$ing 15a"ples
@elow is a ?ava swing code #or the traditional Hello World program
@asically" the idea behind this Hello World program is to learn how to create
a ?ava program" compile and run it To create your ?ava source code you can use any
editor( Te%t padIEdit plus are my #avorites) or you can use an !0E like 1clipse
import ?ava%swing;2rameJ
import ?ava%swing;1abelJ
IIimport statements
II(heck i# window closes automatically &therwise add suitable code
public class HelloWorld2rame e%tends ;2rame Q
49
public static void main(,tring argsRS) Q
new HelloWorld2rame()J
T
HelloWorld2rame() Q
;1abel ?lbHelloWorld U new ;1abel(LHello WorldL)J
add(?lbHelloWorld)J
thisset,iBe(+::" +::)J
II pack()J
setCisible(true)J
T
T
&utput
Note? @elow are some links to ?ava swing tutorials that #orms a helping hand to
get started with ?ava programming swing
;.anel is ,wing=s version o# the AWT class .anel and uses the same de#ault
layout" 2low1ayout ;.anel is descended directly #rom ;(omponent
;2rame is ,wing=s version o# 2rame and is descended directly #rom that class
The components added to the #rame are re#erred to as its contentsJ these are
50
managed by the content.ane To add a component to a ;2rame" we must use its
content.ane instead
;!nternal2rame is con#ined to a visible area o# a container it is placed in !t
can be iconi#ied " ma%imiBed and layered
;Window is ,wing=s version o# Window and is descended directly #rom that
class 1ike Window" it uses @order1ayout by de#ault
;0ialog is ,wing=s version o# 0ialog and is descended directly #rom that class
1ike 0ialog" it uses @order 1ayout by de#ault 1ike ;2rame and ;Window"
;0ialog contains a root.ane hierarchy including a content.ane" and !t allows
layered and glass panes All dialogs are modal" which means the current
thread is blocked until user interaction with it has been completed ;0ialog class
is intended as the basis #or creating custom dialogsJ however " some o# the most
common dialogs are provided through static methods in the class ;&ption.ane
;1abel" descended #rom ;(omponent" is used to create te%t labels
The abstract class Abstract@utton e%tends class ;(omponent and provides a
#oundation #or a #amily o# button classes"including ;@utton
;Te%t2ield allows editing o# a single line o# te%t New #eatures include the ability to
?usti#y the te%t le#t" right" or center" and to set the te%t=s #ont
;.assword2ield (a direct subclass o# ;Te%t2ield) you can suppress the display o#
input Each character entered can be replace by an echo characterThis allows
con#idential input #or passwords" #or e%ample @y de#ault" the echo character is the
asterisk" V
;Te%tArea allows editing o# multiple lines o# te%t ;Te%tArea can be used in
con?unction with class ;,croll.ane to achieve scrolling The underlying ;,croll.ane
can be #orced to always or never have either the vertical or horiBontal scrollbarJ
;@utton is a component the user clicks to trigger a speci#ic action
;3adio@utton is similar to ;(heckbo%" e%cept #or the de#ault icon #or each class A set
o# radio buttons can be associated as a group in which only one button at a time can
be selected
51
;(heck@o% is not a member o# a checkbo% group A checkbo% can be selected and
deselected" and it also displays its current state
,wing is a widget toolkit #or ?ava The main characteristics o# the ,wing toolkit are
plat#orm independent" customiBable" e%tensible" con#igurable and lightweight !t has a
rich set o# widgets 2rom basic widgets like @uttons" 1abels" ,crollbars to advanced
widgets like Trees and Tables
,wing is a part o# ;2(" ;ava 2oundation (lasses !t is a collection o# packages #or
creating #ull #eatured desktop applications ;2( consists o# AWT" ,wing" and
Accessibility" ;ava '0" and 0rag and 0rop
@Co"ponent
All ,wing components whose names begin with L;L descend #rom the ?component
A.! class 2or e%ample" ;.anel" ;,croll.ane" ;@utton" and ;Table all inherit #rom
;(omponent However" ;2rame doesnKt because it implements a top$level container The
;(omponent class e%tends the (ontainer api class" which itsel# e%tends (omponent api
The (omponent class includes everything #rom providing layout hints to supporting
painting and events The (ontainer class has support #or adding components to the
container and laying them out
@Panel
The ;.anel class provides general$purpose containers #or lightweight components
@y de#ault" panels do not add colors to anything e%cept their own backgroundJ however"
you can easily add borders to them and otherwise customiBe their painting
@0ra"e
;2rame is ,wingKs version o# 2rame and is descended directly #rom that class !t is
used to create Windows in a ,wing program The components added to the #rame are
re#erred to as its contentsJ these are managed by the content.ane To add a component to
a ;2rame" we must use its content.ane instead
@Button
52
The ;@utton ob?ect generally consists o# a te%t label andIor image icon that
describes the purpose o# the button " an empty area around the te%tIicon and border
@%abel
;1abel" descended #rom ;(omponent" is used to create te%t labels !t can display
te%t but images as well
@Te5tArea
;Te%tArea component is used to accept several lines o# te%t #rom user ;Te%tArea
can be used in con?unction with class ;,croll.ane to achieve scrolling The underlying
;,croll.ane can be #orced to always or never have either the vertical or horiBontal
scrollbar
@%ist
;1ist provides a scrollable set o# items #rom which one or more may be selected
;1ist can be populated #rom an Array or Cector ;s1ist does not support scrolling directly"
instead" the list must be associated with a scrollpane The view port used by the scroll
pane can also have a user$de#ined border ;1ist actions are handled using
1ist,election1istener
The S$ing 8essage Bo5
Windowing environments commonly contain a standard set o# message bo%es that
allow you to *uickly post in#ormation to the user or to capture in#ormation #rom the user
!n ,wing" these message bo%es are contained in ;&ption.ane sophisticated)" but the ones
most commonly used are probably the message dialog and con#irmation dialog" invoked
using the static ;&ption.aneshowMessage0ialog( ) and ;&ption.ane
show(on#irm0ialog( )

@ScrollPane
53
;,croll.ane is a ?*uery plugin which allows you to replace the browsers de#ault
vertical scrollbars on any block level element with an over#low>auto style ?,croll.ane is
crossbrowser" working on all browsers that support ?*uery and it also degrades grace#ully
!# a userKs browser doesnKt support ?Wuery or has ;ava,cript turned o## then they will see
the browsers de#ault scrollbars !# the mouse wheel plugin is included in the page then the
scroll panes will respond to mouse wheel events as well ?,croll.ane is built on top o# the
awesome ?Wuery library and utilises the dimensions plugin and (optionally) the mouse
wheel plugin
To place a component in one o# the corners o# the ;,croll.ane" call set(orner(,tring
key" (omponent corner) key is
;,croll.ane1&WE3X1E2TX(&3NE3"
;,croll.ane1&WE3X3!EHTX(&3NE3"
;,croll.ane9..E3X1E2TX(&3NE3" or
;,croll.ane9..E3X3!EHTX(&3NE3
@Creator
;(reator is a power#ul !0E #or ?ava ;(reator is the best development tool #or
programming !t is #aster" more e##icient and more reliable than other !0E=s There#ore it
is the per#ect tool #or programmers o# every level" #rom learning programmer to ;ava$
specialist
;(reator provides the user with a wide range o# #unctionality such as .ro?ect
management" pro?ect templates" code$completion" debugger inter#ace" editor with synta%
highlighting" wiBards and a #ully customiBable user inter#ace
54
With ;(reator you can directly compile or run your ;ava program without
activating the main document #irst ;(reator will automatically #ind the #ile with the main
method or the html #ile holding the ?ava applet" then it will start the appropriate tool
;(reator is written entirely in (NNC which makes it #ast and e##icient compared to
the ;ava based editorsI!0EKs
C2APT1R3-
S=ST18 T1STIN>
55
,o#tware Testing is the process used to help identi#y the correctness" completeness"
security and *uality o# developed computer so#tware Testing is a process o# technical
investigation" per#ormed on behal# o# stakeholders" that is intended to reveal *uality$
related in#ormation about the product with respect to the conte%t in which it is intended to
operate !n general" so#tware engineers distinguish so#tware #aults #rom so#tware #ailures
&ur pro?ectL Cisual cryptography 2or (heating .reventionM is tested with the #ollowing
testing methodologies
*eveloping 8ethodologies
The test process begins by developing a comprehensive plan to test the general
#unctionality and special #eatures on a variety o# plat#orm combinations ,trict *uality
control procedures are used The process veri#ies that the application meets the
re*uirements speci#ied in the system re*uirements document and is bug #ree The
#ollowing are the considerations used to develop the #ramework #or developing the test
methodologies
Ac!uire and stud( the test strateg(
A team very #amiliar with the business risks associated with the so#tware normally
develops test strategy" the test team develops tactics Thus the test team needs to ac*uire
and study the test strategy The test tactics are analyBed and studied #or #inding our
various test #actors" risks and e##ects The risk involved in our pro?ect is implementing
the acknowledgement scheme ,o" the proper knowledge about the testing strategies
should be gained in order to avoid such high level risks
*eter"ine the t(pe of develop"ent pro6ect
The type o# the development re#ers to the plat#orm or methodology #or developing
the pro?ect As it is been a simulation pro?ect we go #or the prototyping The prototypes
are simply prede#ined structure or model" which can be used #or #urther modeling @y
using the prototypes we can modi#y the e%isting module o# the application #or some other
speci#ic operations Here the test tactics is to veri#y that all the tools are used properly
and to test #unctionality
56
*eter"ine the t(pe of soft$are s(ste"
The type o# so#tware system relates to the type o# processing which will be
encountered by the system !n this pro?ect" the so#tware system we pre#er to use is ;ava
We have chosen ;ava #or its portability and its support to graphics < #lash speci#ically #or
simulation
*eter"ine the scope of the soft$are s(ste"
The scope o# the pro?ect re#ers to the overall activities or operation to be included
into the system being tested The scope o# the new system varies #rom that o# the e%isting
one !n the e%isting system" a large overhead occurs in sending acknowledgements !n this
pro?ect" the acknowledgement transmission is optimal because only #raction o# data
packet is transmitted as acknowledgement rather than #ull packet
Identif( the tactical ris9s
The tactical risk is the subsets at a lower level o# the strategic risks The risks
related to the application and its methodologies are identi#ied The risk involved in our
pro?ect is implementing the identi#ying the misbehaving link
*eter"ine $hen the testing should occur
!n the above processes we have identi#ied the type o# processing" scope and risks
associated with our pro?ect The testing can occur throughout all the phases o# the pro?ect
0uring the analysis phase" the testing strategy and re*uirements are determined !n design
phase" the comple%ities in design with respect to the re*uirements are determined and
structural and #unctional test conditions are also tested 0uring implementation" the
design consistency is determined !n test phase" the overall testing o# the application is
being done and previously the ade*uacy o# the testing plan is also determined !n
maintenance phase" the testing #or modi#ying and reusing the system is done
Build the s(ste" test plan
The test plan o# the pro?ect should provide all the in#ormation on the application
that is being tested The test plan is simply a model that has to be #ollowed during the
57
progression o# the testing The test plan consists o# the se*uential set o# procedures to test
the application !nitially" the identi#ication process o# misbehaving links are tested Then
the test is carried out #or 'ack scheme
Build the unit test plan
!n this case we are dividing the system into three di##erent components or units
each having speci#ic #unctions The three di##erent components o# the system are
connection establishment" nodes events handling and change the connection These units
have their own test plan The main purpose o# the unit test plan is to eliminate the errors
and bugs during the initial stage o# the implementation As the errors get debugged in the
initial stage" the less comple% the overall testing a#ter integrating all the units o# the
system The unit testing plan can be either simple or comple% based on the #unctionality
o# that unit
Testing Techni!ue D Tool selection Process
!n this process the appropriate testing process is selected #rom various testing
methodologies such as prototyping model" water#all model etc and the selection is done
by the means o# analyBing the nature o# the pro?ect We go #or Water#all model
Select test factor
This phase selects the appropriate test #actor The particular module o# the pro?ect
which is essential #or the testing methodologies is sorted out #irst This will help the
testing process to be completed within time The test #actors #or our pro?ect include
encoding" veri#ication and decoding process
*eter"ine S*%C phase
This phase involves the structural testing o# the pro?ect which will be used #or
easy implementations o# the #unctions Though structural testing is so much associated
with the coding phase" the structural testing should be carried out at all the phases o# the
li#ecycle These evaluates that all the structures are tested and sound
Identif( the criteria to test
58
!n this phase the testing unit is trained with the necessary constraints and limit
with which the pro?ect is to be tested !n our pro?ect the testing unit is trained to test
whether all the misbehaving nodes are correctly identi#ied or not
Select t(pe of test
!ndividual responsible #or testing may pre#er to select their own techni*ue and
tool based on the test situation 2or selecting the appropriate testing process the pro?ect
should be analyBed with the #ollowing three testing concepts>
,tructural versus #unctional testing
0ynamic versus static testing
Manual versus automatic testing
A#ter analyBing through the above testing concepts we divided to test our pro?ect
in Water#all model testing methodology
59
2ig 5+ Testing techni*ue and tool selection process
Structural Testing
,tructural analysis based test sets are tend to uncover errors that occur during
coding o# the program The properties o# the test set are to re#lect the internal structure o#
the program ,tructural testing is designed to veri#y that the developed system and
programs work as speci#ied in the re*uirement The ob?ective is to ensure that the product
is designed structurally sound and will #unction correctly
0unctional Testing
2unctional testing ensures that the re*uirements are properly satis#ied by the
application system The #unctions are those tasks that the system is designed to
accomplish This is not concerned with how processing occurs but rather with the results
o# the processing The #unctional analysis based test sets tend to uncover errors that
occurred in implementing re*uirements or design speci#ications
Select techni!ue
A#ter selecting the appropriate testing methodology we have to select the
necessary testing techni*ue such as stress testing" e%ecution testing" recovery testing"
operation testing" compliance testing and security testing We are per#orming operation
testing by testing whether all the components per#orm its intended operations
Select test "ethod
We have to select the testing method which is to be carried out throughout the
li#ecycle The two di##erent methods are static and dynamic 0ynamic testing needs the
program to be e%ecuted completely be#ore testing This is a traditional concept where the
#aults detected at the end will be very hard to recti#y !n static process the program is
tested #or each and every line and the testing process is allowed to pass through only a#ter
recti#ying the occurred #ault These make this process more e%pensive" so a combination
o# both static and dynamic testing method
8ode of testing
60
!t is necessary to select the test mode in which the testing method to be carried
out The two di##erent modes are manual and automated tool The real time pro?ects
needs #re*uent interactions ,o" it is impossible to carry out the testing process by
means o# automated tool &ur pro?ect uses manual testing
4nit test techni!ue
This phase e%amines the techni*ues" assessment and management o# unit testing
and analysis Testing and analysis strategies are categoriBed according to whether they
goal is #unctional or structural or combination o# these !t will assist a so#tware engineer
to de#ine" conduct and evaluate unit tests and to assess new unit test techni*ues
S(ste" Testing
&nce the entire system has been built then it has to be tested against the L,ystem
,peci#icationL to check i# it delivers the #eatures re*uired !t is still developer #ocused"
although specialist developers known as systems testers are normally employed to do it
!n essence ,ystem Testing is not about checking the individual parts o# the design" but
about checking the system as a whole !n e##ect it is one giant component ,ystem testing
can involve a number o# specialist types o# test to see i# all the #unctional and non$
#unctional re*uirements have been met
Regression Testing
This involves assurance that all aspects o# an application system remain
#unctional a#ter testing The introduction o# change is the cause o# problems in previously
tested segments !t is retesting unchanged segments o# the application system !t normally
involves rerunning tests that have been previously e%ecuted to ensure that the same
results can be achieved currently as achieved when the segments were last tested
61
C2APT1R3&
.4TP4T SCR11NS
Status *ispla( Page
62
4ser %oign Page
63
*ata 0ro" Source page
64
0ile 0ro" S(ste" page
65
<e( :alue page
66
<e( >eneration Page
67
68
69
C.NC%4SI.NS
Mobile Ad Hoc Networks (MANETs) have been an area #or active research over the
past #ew years due to their potentially widespread application in military and civilian
communications ,uch a network is highly dependent on the cooperation o# all o# its
members to per#orm networking #unctions This makes it highly vulnerable to sel#ish
nodes &ne such misbehavior is related to routing When such misbehaving nodes
participate in the 3oute 0iscovery phase but re#use to #orward the data packets" routing
per#ormance may be degraded severely
We have proposed and evaluated a techni*ue" termed 'A()" to detect and mitigate
the e##ect o# such routing misbehavior The 'A() techni*ue is based on a simple '$hop
acknowledgment packet that is sent back by the receiver o# the ne%t$hop link (ompared
with other approaches to combat the problem" such as the overhearing techni*ue" the
'A() scheme overcomes several problems including ambiguous collisions" receiver
collisions" and limited transmission powers The 'A() scheme can be used as an add$on
techni*ue to routing protocols such as 0,3 in MANETs E%tensive simulations o# the
'A() scheme have been per#ormed to evaluate its per#ormance &ur simulation results
show that the 'A() scheme maintains up to 8+ percent packet delivery ratio even when
there are /: percent misbehaving nodes in the MANETs t The regular 0,3 scheme can
only o##er a packet delivery ratio o# /: percent &ne advantage o# the 'A() scheme is its
#le%ibility to control overhead with the use o# the 3ack parameter
70
04RT21R 1N2ANC181NTS
!n this work" we have #ocused only on link misbehavior !t is more di##icult to
decide the behavior o# a single node This is mainly due to the #act that communication
takes place between two nodes and is not the sole e##ort o# a single node There#ore" care
must be taken be#ore punishing any node associated with the misbehaving links When a
link misbehaves" either o# the two nodes associated with the link may be misbehaving !n
order to decide the behavior o# a node and punish it" we may need to check the behavior
o# links around that node This is a potential direction #or our #uture work. The 'A()
scheme has been implemented on top o# 0,3 !t is also possible to implement the 'A()
scheme over other routing schemes The main challenge is how to derive the triplet
in#ormation so that the 'A() sender and the observing node are in#ormed o# such
in#ormation )nowledge o# topology o# the '$hop neighborhood may be used !n our
#uture work" we will investigate how to add the 'A() scheme to other types o# routing
schemes and open networks Theoretical analysis o# the per#ormance gain o# the 'A()
scheme is o# interest as well
71
R101R1NC1S,BIB%I.>RAP2=
Here we have mentioned various re#erences #rom which we collected our problem
and several others that supported us to design the solution #or our problem These
re#erences include either books" papers published through some standards and several
websites links with 931=s>$
+) )e?un 1iu" ;ing 0eng" Member" !EEE" .ramod ) Carshney" 2ellow"
!EEE" and )ashyap @alakrishnan" Member" !EEE
') 1 @uttyan and ;$. Hubau%" A,timulating (ooperation in ,el#$&rganiBing
Mobile Ad Hoc Networks"M A(MI)luwer Mobile Networks and
Applications" vol 7" no 6" '::-
-) ) @alakrishnan is with the ,ecurity ,ervices Eroup" 0eloitte and Touche
11." +56: Tysons @oulevard" ,uite 7::" Mc1ean" CA ''+:'
E$mail> kbalakrishnanYdeloittecom
/) , Marti" T Eiuli" ) 1ai" and M @aker" AMitigating 3outing Misbehavior
in Mobile Ad Hoc Networks"M .roc Mobi(om" Aug ':::
6) C$N .admanabhan and 0$3 ,imon" A,ecure Traceroute to 0etect 2aulty
or Malicious 3outing"M ,!E(&MM (omputer (omm 3ev" vol --" no +"
;an '::-
4) C ,rinivasan" . Nuggehalli" (2 (hiasserini" and 33 3ao" A(ooperation
in Wireless Ad Hoc Networks"M .roc !N2&(&M" Mar$Apr '::-
5) 0 ;ohnson" 0 MaltB" Z( Hu" and ; ;etcheva" AThe 0ynamic ,ource
3outing .rotocol #or Mobile Ad Hoc Networks (0,3)"M !nternet dra#t"
2eb '::'
72

Вам также может понравиться