You are on page 1of 74

c 

‘  

‘ ‘ 
  

 

HCL Enterprise is a $ 5.2 billion leading Global Technology and IT Enterprise


that comprises two companies listed in India - HCL Technologies & HCL
Infosystems. The 3-decade-old enterprise, founded in 1976, is one of India's original
IT garage start-ups. Its range of offerings span Product Engineering, Custom &
Package Applications, BPO, IT Infrastructure Services, IT Hardware, Systems
Integration, and distribution of ICT products. The HCL team comprises over 59,000
professionals of diverse nationalities, who operate from 20 countries including 360
points of presence in India. HCL has global partnerships with several leading Fortune
1000 firms, including leading IT and Technology firms.

  

HCL Infosystems portfolio of products covers the entire spectrum of the


information technology needs of its customers. By virtue of the immense diversity of
markets and customers that it address, HCL Infosystems products offerings include
everything from high end enterprise level servers for mission critical applications to
multimedia home computers. HCL Infosystems also offers all IT Infrastructure
services including infrastructure management, networking, security and facility
management etc.

HCL Infinet, a division of HCL Infosystems offers a range of


telecom and imaging products including enterprise networking. To provide world -
class solutions and services to the customers, HCL has formed Alliances and
Partnerships with leading IT companies worldwide.
c


HCL Infosystems has alliances with global technology leaders like !"

"
#" $!!" %&" '&" (
#" #" ) "
( " (#&" ( " 
" )&" *" ( " &#!" $
" 
#&"  &" #" !" +(, (-# ' " (&. & 
-!! 

These alliances on one hand give us access to best technology & products as well
enhancing our understanding of the latest in technology. On the other hand they
enhance our product portfolio, and enable us to be one stop shop for our customers.

The strengths of HCL can be summarized as:


- Ability to understand customer's business and offer right technology
- Long standing relationship with customers
- Pan India support & service infrastructure
- Best-vale-for-money offerings

  #&

The company had ventured into the field of IT education and training with an
objective to meet the increasing demand for skilled professionals from organizations
across different domains.

HCL Infosystems provide specially designed courses in high -end Software,


Hardware, Networking, computer integrated management, life skills etc. to groom
professionals for the present day industry. With a view to bridge the demand-supply
gap in skilled manpower, HCL has set up education centres across the country under
the name ³HCL Career Development Centre (HCL CDC)´. Presently there are sixty
three fully operational HCL CDCs in over fifty cities across the country and the
number is likely to reach 100 before end of the year.

As the fountainhead of the most significant pursuit of human mind (IT), HCL
strongly believes, "Only a Leader can transform you into a Leader". HCL CDC is a
c


formalization of this experience and credo which has been perfected over three
decades.

It is an initiative that enables aspiring individuals to benefit from HCL¶s


longstanding expertise in the space and become Industry ready IT professionals.

(.%

HCL CDC has a focus to become the best independent training organisation in
India. We offer more courses, with affiliations and in more locations. There are many
reasons, but most important are the Technological and Quality imperatives.

1.Ê ü! /#!& #%#&! * based on our quality instructors & delivery
methods ensure excellent training at our centers and corporate venues.

2.Ê  /!& . # # -! for hands on training in the
classroom including onsite labs for real skill transfer to corporate.

3.Ê .!& .&   # # and course materials in line with the
breakthroughs in IT industry.

4.Ê &  0&! We have a strong reputation among employers, who hire
our graduates as a training organization that prepares students to evaluate
situations, analyze solutions and apply practical knowledge to produce effective
results.

5.Ê  &#! &  &#%.


% !. HCL CDC¶s faculty of instructors is
comprised of Superior, Certified Instructors who are highly skilled, dedicated
professionals who possess expertise in their chosen field, and teach using
curriculum designed to prepare students with real-world, hands-on projects and
labs in a blended learning environment

6.Ê #&& &.!! Our goal is to provide the


highest quality training that enables a person to start or enhance their career as an
c


IT professional, in the shortest amount of time. Our difference lies in the quality of
our courses, delivery, infrastructure and instructors, exam preparatory sessions.
HCL also runs authorised # .  where the students can take
up global certification exams.

7.Ê &% 1% 1!  !&   #%!. Our partnership with world
leaders in technology ± Microsoft, Oracle, Red Hat, IBM etc. translates into world
class course contents and cutting edge technologies.

&-

Literature survey is the most important step in software development


process. Before developing the tool it is necessary to determine the time factor,
economy n company strength. Once these things r satisfied, then next step is to
determine which operating system and language can be used for developing the
tool. Once the programmers start building the tool the programmers need lot of
external support. This support can be obtained from senior programmers, from
book or from websites. Before building the system the above consideration r
taken into account for developing the proposed system.


c


‘ 2--1%(

 THE proliferation of IEEE 802.11 networks in recent years demonstrates a


dramatic shift in the primary mechanism for the Internet access. According to a survey
conducted by the Pew Internet Project in February 2007, about one third of the
population of Internet users in the USA connects via wireless networks. IEEE 802.11
networks, in the form of WLANs or citywide multi hop mesh networks are now
expected to support the connectivity requirements of hundreds to thousands of users
simultaneously. The increased usage of 802.11 networks and devices, however,
exposes many problems in current networks. IEEE 802.11 is a CSMA/CA -based
medium access scheme. All the users in the vicinity of each other share the medium as
a common resource. A large number of users in a network can lead to excessive load
or congestion in the network. Jardosh et al. present an example case study of a large
congested WLAN and describe the adverse effects of such congestion. 

In this network, more than 1,000 clients attempted to use the network
simultaneously. The network could not sustain this high load: users obtained
unacceptably low throughput, and many users were unable to even maintain
association with the access points (APs). Eventually the network broke down, causing
frustration among the users. Congestion has an adverse impact on current rate
adaptation algorithms, an important aspect of the IEEE 802.11 MAC protocol that
determines the network throughput. In a multi rate 802.11 network, rate adaptation is
the operation of selecting the best transmission rate, and dynamically adapting this
selection to the channel quality variations. The data rates offered by 802.11a/b/g
networks vary from a low of 1 Mbps to the high rate of 54 Mbps. This wide range in
the choice of data rates makes the behavior of the rate adaptation algorithm critical to
the throughput performance, especially in congested scenarios. Current rate adaptation
solutions are typically designed for operation in uncongested networks, where packet
c


loss is more likely to correlate with poor link quality rather than congestion. These
solutions have been shown to exhibit inferior performance in congested networks.

These solutions do not distinguish congestion-related packet losses from those


caused by poor link quality, and react to all packet losses by switching to a lower
transmission rate. This rate switch, in turn, increases the channel occupancy time of
packet transmissions and ads to the already existing congestion. In this work, our goal
is to design a rate adaptation scheme that provides high network performance in
congested networks as well as lightly loaded networks. In order to design such a rate
adaptation scheme, however, our approach is to develop mechanisms that can identify
and measure the network congestion level in real time. Traditional metrics, such as
network throughput, do not accurately characterize congestion in a wireless network
because of the locally shared channel and the use of multiple transmission rates.
Current congestion metrics proposed for wireless networks are processor intensive,
and, therefore, are not suitable for real-time operation. Hence, there is a need for
lightweight congestion measurement solutions that can identify congestion in a
wireless network in real time. These mechanisms enable the rate adaptation scheme to
respond to the network congestion levels and make intelligent decisions about the
choice of transmission rate.

In summary, we require congestion measurement solutions to assist in the


development of a congestion-aware rate adaptation scheme. To this end, we present a
measurement-driven approach to the characterization of congestion in wireless
networks and to the design of a congestion-aware rate adaptation scheme. Our two
main contributions are as follows: First, we develop two measurement techniques that
can identify wireless network congestion in real time. The first technique is active and
measures the channel access delay, the minimum time delay for a packet transmission
in the network. The second technique is passive and measures the channel busy time,
the fraction of time for which the medium was utilized during some time interval. We
evaluate and compare the performance of these techniques in a test bed as well as a
large WLAN with active users connected to the Internet. We show that the channel
busy time can accurately measure network congestion in real time.
c


2 ( (
   ((

2 ‘3(4( (


Existing solutions have been shown to exhibit inferior performance in


congested networks. In heavily utilized wireless networks, the wireless portion of the
network is a major performance bottleneck. Understanding the behavior of the
wireless portion of such networks is critical to ensure their robust operation. This
understanding can also help optimize network performance.

These solutions do not distinguish congestion- related packet losses


from those caused by poor link quality, and react to all packet losses by switching to a
lower transmission rate. This rate switch, in turn, increases the channel occupancy
time of packet transmissions and ads to the existing congestion use of channel busy-
time as a direct measure of channel utilization and show how channel utilization along
with network throughput and good put can be used to define highly congested,
moderately congested, and un-congested network states.
c 


2 2  (( (


In this paper, we presented two techniques, an active technique (CAD) and a


passive technique (CBT), that measure the utilization of the wireless medium in real
time. We then used the CBT measurement technique to develop a rate adaptation
scheme, WOOF, for IEEE 802.11. Performance evaluation shows up to a three-fold
gain in throughput in a congested network. Simulations demonstrated the utility of
using WOOF in a large WLAN. In addition to our congestion-aware rate adaptation
algorithm, we believe that the measurement techniques proposed in this paper can be
used to design new protocols or solutions that perform well under congested
scenarios.

In this work, we first propose two real-time congestion measurement


techniques, namely an active probe-based method called Channel Access Delay, and a
passive method called Channel Busy Time. We evaluate the two techniques in a test
bed network and a large WLAN connected to the Internet. We then present the design
and evaluation of Wireless congestion Optimized Fallback (WOOF), a rate adaptation
scheme that uses congestion measurement to identify congestion-related packet losses.

Through simulation and test bed implementation we show that, compared to


other well-known rate adaptation algorithms, WOOF achieves up to 300 percent
throughput improvement in congested networks. Current congestion metrics proposed
for wireless networks are processor intensive, and, therefore, are not suitable for real-
time operation. Hence, there is a need for lightweight congestion measurement
solutions that can identify congestion in a wireless network in real time.
c



u u ($ ( 

The feasibility of the project is analyzed in this phase and business proposal is
put forth with a very general plan for the project and some cost estimates. During
system analysis the feasibility study of the proposed system is to be carried out. This
is to ensure that the proposed system is not a burden to the company. For feasibility
analysis, some understanding of the major requirements for the system is essential.

Three key considerations involved in the feasibility analysis are

åÊ ECONOMICAL FEASIBILITY
åÊ TECHNICAL FEASIBILITY
åÊ SOCIAL FEASIBILITY


u u ‘ 
  ($ 

This study is carried out to check the economic impact that the system
will have on the organization. The amount of fund that the company can pour into the
research and development of the system is limited. The expenditures must be justified.
Thus the developed system as well within the budget and this was achieved because
most of the technologies used are freely available. Only the customized products had
to be purchased.

u u 2   ($ 

This study is carried out to check the technical feasibility, that is, the technical
requirements of the system. Any system developed must not have a high demand on
the available technical resources. This will lead to high demands on the available
technical resources. This will lead to high demands being placed on the client. The
developed system must have a modest requirement, as only minimal or null changes
are required for implementing this system.
c 


u u u(   ($ 

The aspect of study is to check the level of acceptance of the system by the
user. This includes the process of training the user to use the system efficiently. The
user must not feel threatened by the system, instead must accept it as a necessity. The
level of acceptance by the users solely depends on the methods that are employed to
educate the user about the system and to make him familiar with it. His level of
confidence must be raised so that he is also able to make some constructive criticism,
which is welcomed, as he is the final user of the system.
c 


u ( (
(   

5 ‘ ü (   ˜

Processor : Pentium IV 2.8GHz.

RAM : 512 MB RAM.

Hard Disk : 40 GB.

Input device : Standard Keyboard and Mouse.

Output device : VGA and High Resolution Monitor.

5 2(ü (   

Operating System : Windows XP

Language Techniques : JDK 1.5.


c 


5 (ü (  

6&-&#%!.

Java technology is both a programming language and a platform.

%6&-& .&.&.&.

The Java programming language is a high-level language that can be


characterized by all of the following buzzwords:

šÊ Simple
šÊ Architecture neutral
šÊ Object oriented
šÊ Portable
šÊ Distributed
šÊ High performance
šÊ Interpreted
šÊ Multithreaded
šÊ Robust
šÊ Dynamic
šÊ Secure

With most programming languages, you either compile or interpret a program


so that you can run it on your computer. The Java programming language is unusual in
that a program is both compiled and interpreted. With the compiler, first you translate
a program into an intermediate language called Java byte codes ²the platform-
c 


independent codes interpreted by the interpreter on the Java platform. The interpreter
parses and runs each Java byte code instruction on the computer. Compilation happens
just once; interpretation occurs each time the program is executed. The following
figure illustrates how this works.

You can think of Java byte codes as the machine code instructions for the Java
Virtual Machine (Java VM). Every Java interpreter, whether it¶s a development tool or
a Web browser that can run applets, is an implementation of the Java VM. Java byte
codes help make ³write once, run anywhere´ possible. You can compile your program
into byte codes on any platform that has a Java compiler. The byte codes can then be
run on any implementation of the Java VM. That means that as long as a computer has
a Java VM, the same program written in the Java programming language can run on
Windows 2000, a Solaris workstation, or on an iMac.

Ê
c 


%6&-& !&


A !latform is the hardware or software environment in which a program runs. We¶ve


already mentioned some of the most popular platforms like Windows 2000, Linux,
Solaris, and MacOS. Most platforms can be described as a combination of the
operating system and hardware. The Java platform differs from most other platforms
in that it¶s a software-only platform that runs on top of other hardware-based
platforms.

The Java platform has two components:


ëÊ The Java Virtual Machine (Java VM)
ëÊ The Java A!!lication Programming Interface (Java API)
You¶ve already been introduced to the Java VM. It¶s the base for the Java platform
and is ported onto various hardware-based platforms.

The Java API is a large collection of ready-made software components that provide
many useful capabilities, such as graphical user interface (GUI) widgets. The Java
API is grouped into libraries of related classes and interfaces; these libraries are
known as !ackages. The next section, What Can Java Technology Do? Highlights
what functionality some of the packages in the Java API provide.
The following figure depicts a program that¶s running on the Java platform. As the
figure shows, the Java API and the virtual machine insulate the program from the
hardware.

Native code is code that after you compile it, the compiled code runs on a specific
hardware platform. As a platform-independent environment, the Java platform can be
a bit slower than native code. However, smart compilers, well-tuned interpreters, and
c 


just-in-time byte code compilers can bring performance close to that of native code
without threatening portability.

ü 
   

The most common types of programs written in the Java programming


language are a!!lets and a!!lications. If you¶ve surfed the Web, you¶re probably
already familiar with applets. An applet is a program that adheres to certain
conventions that allow it to run within a Java-enabled browser.

However, the Java programming language is not just for writing cute,
entertaining applets for the Web. The general-purpose, high-level Java programming
language is also a powerful software platform. Using the generous API, you can write
many types of programs.

An application is a standalone program that runs directly on the Java platform.


A special kind of application known as a server serves and supports clients on a
network. Examples of servers are Web servers, proxy servers, mail servers, and print
servers. Another specialized program is a servlet. A servlet can almost be thought of
as an applet that runs on the server side. Java Servlets are a popular choice for
building interactive web applications, replacing the use of CGI scripts. Servlets are
similar to applets in that they are runtime extensions of applications. Instead of
working in browsers, though, servlets run within Java Web servers, configuring or
tailoring the server.

How does the API support all these kinds of programs? It does so with packages of
software components that provides a wide range of functionality. Every full
implementation of the Java platform gives you the following features:
c 


ëÊ % &!: Objects, strings, threads, numbers, input and output, data
structures, system properties, date and time, and so on.
ëÊ !: The set of conventions used by applets.
ëÊ 1'.: URLs, TCP (Transmission Control Protocol), UDP (User Data
gram Protocol) sockets, and IP (Internet Protocol) addresses.
ëÊ &&!7&: Help for writing programs that can be localized for users
worldwide. Programs can automatically adapt to specific locales and be displayed in
the appropriate language.
ëÊ (#: Both low level and high level, including electronic signatures, public
and private key management, access control, and certificates.
ëÊ (1& #: Known as JavaBeansTM, can plug into existing
component architectures.
ëÊ 8# &!7&: Allows lightweight persistence and communication via
Remote Method Invocation (RMI).
ëÊ 6&-& &&& #- +6$ 
,: Provides uniform access to a wide
range of relational databases.
The Java platform also has APIs for 2D and 3D graphics, accessibility, servers,
collaboration, telephony, speech, animation, and more. The following figure depicts
what is included in the Java 2 SDK.

Ê
c 



 ü 
    
We can¶t promise you fame, fortune, or even a job if you learn the Java
programming language. Still, it is likely to make your programs better and requires
less effort than other languages. We believe that Java technology will help you do the
following:
ëÊ 4 &  9#'!: Although the Java programming language is a powerful
object-oriented language, it¶s easy to learn, especially for programmers already
familiar with C or C++.
ëÊ ü ! # : Comparisons of program metrics (class counts, method
counts, and so on) suggest that a program written in the Java programming language
can be four times smaller than the same program in C++.
ëÊ ü  # : The Java programming language encourages good coding
practices, and its garbage collection helps you avoid memory leaks. Its object
orientation, its JavaBeans component architecture, and its wide-ranging, easily
extendible API let you reuse other people¶s tested code and introduce fewer bugs.
ëÊ -!.&9#'!: Your development time may be as much as
twice as fast versus writing the same program in C++. Why? You write fewer lines of
code and it is a simpler programming language than C++.
ëÊ -  !&  # 1% ‘::;  6&-&: You can keep your
program portable by avoiding the use of libraries written in other languages. The
100% Pure JavaTM Product Certification Program has a repository of historical process
manuals, white papers, brochures, and similar materials online.
ëÊ ü #"  &1%: Because 100% Pure Java programs are compiled
into machine-independent byte codes, they run consistently on any Java platform.
ëÊ  1&  &!: You can upgrade applets easily from a
central server. Applets take advantage of the feature of allowing new classes to be
loaded ³on the fly,´ without recompiling the entire program.
c 


$ 


Microsoft Open Database Connectivity (ODBC) is a standard programming
interface for application developers and database systems providers. Before ODBC
became a de facto standard for Windows programs to interface with database systems,
programmers had to use proprietary languages for each database they wanted to
connect to. Now, ODBC has made the choice of the database system almost irrelevant
from a coding perspective, which is as it should be. Application developers have much
more important things to worry about than the syntax that is needed to port their
program from one database to another when business needs suddenly change.

Through the ODBC Administrator in Control Panel, you can specify the
particular database that is associated with a data source that an ODBC application
program is written to use. Think of an ODBC data source as a door with a name on it.
Each door will lead you to a particular database. For example, the data source named
Sales Figures might be a SQL Server database, whereas the Accounts Payable data
source could refer to an Access database. The physical database referred to by a data
source can reside anywhere on the LAN.

The ODBC system files are not installed on your system by Windows 95.
Rather, they are installed when you setup a separate database application, such as SQL
Server Client or Visual Basic 4.0. When the ODBC icon is installed in Control Panel,
it uses a file called ODBCINST.DLL. It is also possible to administer your ODBC
data sources through a stand-alone program called ODBCADM.EXE. There is a 16-
bit and a 32-bit version of this program and each maintains a separate list of ODBC
data sources.
c



From a programming perspective, the beauty of ODBC is that the application


can be written to use the same set of function calls to interface with any data source,
regardless of the database vendor. The source code of the application doesn¶t change
whether it talks to Oracle or SQL Server. We only mention these two as an example.
There are ODBC drivers available for several dozen popular database systems. Even
Excel spreadsheets and plain text files can be turned into data sources. The operating
system uses the Registry information written by ODBC Administrator to determine
which low-level ODBC drivers are needed to talk to the data source (such as the
interface to Oracle or SQL Server). The loading of the ODBC drivers is transparent to
the ODBC application program. In a client/server environment, the ODBC API even
handles many of the network issues for the application programmer.

The advantages of this scheme are so numerous that you are probably thinking
there must be some catch. The only disadvantage of ODBC is that it isn¶t as efficient
as talking directly to the native database interface. ODBC has had many detractors
make the charge that it is too slow. Microsoft has always claimed that the critical
factor in performance is the quality of the driver software that is used. In our humble
opinion, this is true. The availability of good ODBC drivers has improved a great deal
recently. And anyway, the criticism about performance is somewhat analogous to
those who said that compilers would never match the speed of pure assembly
language. Maybe not, but the compiler (or ODBC) gives you the opportunity to write
cleaner programs, which means you finish sooner. Meanwhile, computers get faster
every year.
c 


6$ 

In an effort to set an independent database standard API for Java; Sun


Microsystems developed Java Database Connectivity, or JDBC. JDBC offers a
generic SQL database access mechanism that provides a consistent interface to a
variety of RDBMSs. This consistent interface is achieved through the use of ³plug-in´
database connectivity modules, or drivers. If a database vendor wishes to have JDBC
support, he or she must provide the driver for each platform that the database and Java
run on.
To gain a wider acceptance of JDBC, Sun based JDBC¶s framework on ODBC. As
you discovered earlier in this chapter, ODBC has widespread support on a variety of
platforms. Basing JDBC on ODBC will allow vendors to bring JDBC drivers to
market much faster than developing a completely new connectivity solution.
JDBC was announced in March of 1996. It was released for a 90 day public review
that ended June 8, 1996. Because of user input, the final JDBC v1.0 specification was
released soon after|

The remainder of this section will cover enough information about JDBC for
you to know what it is about and how to use it effectively. This is by no means a
complete overview of JDBC. That would fill an entire book.

6$ 4&!

Few software packages are designed without goals in mind. JDBC is one that, because
of its many goals, drove the development of the API. These goals, in conjunction with
early reviewer feedback, have finalized the JDBC class library into a solid framework
for building database applications in Java.

The goals that were set for JDBC are important. They will give you some insight as to
why certain classes and functionalities behave the way they do. The eight design goals
for JDBC are as follows:
c 


‘Ê (0-! 

The designers felt that their main goal was to define a SQL interface for Java.
Although not the lowest database interface level possible, it is at a low enough level
for higher-level tools and APIs to be created. Conversely, it is at a high enough level
for application programmers to use it confidently. Attaining this goal allows for future
tool vendors to ³generate´ JDBC code and to hide many of JDBC¶s complexities from
the end user.

2Ê (0 &#

SQL syntax varies as you move from database vendor to database vendor. In an
effort to support a wide variety of vendors, JDBC will allow any query statement to be
passed through it to the underlying database driver. This allows the connectivity
module to handle non-standard functionality in a manner that is suitable for its users.

uÊ 6$ !&!# &&&&#

The JDBC SQL API must ³sit´ on top of other common SQL level APIs. This
goal allows JDBC to use existing ODBC level drivers by the use of a software
interface. This interface would translate JDBC calls to ODBC and vice versa.

5Ê - &6&-&&#%&#1%%%6&-&

Because of Java¶s acceptance in the user community thus far, the designers feel
that they should not stray from the current design of the core Java system.
c


3Ê l!

This goal probably appears in all software design goal listings. JDBC is no
exception. Sun felt that the design of JDBC should be very simple, allowing for only
one method of completing a task per mechanism. Allowing duplicate functionality
only serves to confuse the users of the API.

ÑÊ ."&#.1%-!
Strong typing allows for more error checking to be done at compile time; also, less
error appear at runtime.

ºÊ l%##&!
Because more often than not, the usual SQL calls used by the programmer are
simple SELECT¶s, INSERT¶s, DELETE¶s and UPDATE¶s, these queries should be
simple to perform with JDBC. However, more complex SQL statements should also
be possible.

Finally we decided to proceed the implementation using Java Networking.

And for dynamically updating the cache table we go for MS Access database.

Java ha two things: a programming language and a platform.

Java is a high-level programming language that is all of the


following

Simple Architecture-neutral

Object-oriented Portable

Distributed High-performance

Interpreted multithreaded

Robust Dynamic

Secure
c


Java is also unusual in that each Java program is both compiled and
interpreted. With a compile you translate a Java program into an intermediate
language called Java byte codes the platform-independent code instruction is
passed and run on the computer.
Compilation happens just once; interpretation occurs each time the program
is executed. The figure illustrates how this works.

       
 


   

You can think of Java byte codes as the machine code instructions for
the Java Virtual Machine (Java VM). Every Java interpreter, whether it¶s a
Java development tool or a Web browser that can run Java applets, is an
implementation of the Java VM. The Java VM can also be implemented in
hardware.

Java byte codes help make ³write once, run anywhere´ possible. You
can compile your Java program into byte codes on my platform that has a
Java compiler. The byte codes can then be run any implementation of the Java
VM. For example, the same Java program can run Windows NT, Solaris, and
Macintosh.
c


Networking TCP/IP stack:

The TCP/IP stack is shorter than the OSI one:

TCP is a connection-oriented protocol; UDP (User Datagram Protocol) is a


connectionless protocol.

  &&.&<

The IP layer provides a connectionless and unreliable delivery system. It


considers each datagram independently of the others. Any association between
datagram must be supplied by the higher layers. The IP layer supplies a checksum that
includes its own header. The header includes the source and destination addresses.
The IP layer handles routing through an Internet. It is also responsible for breaking up
large datagram into smaller ones for transmission and reassembling them at the other
end.
c


 

UDP is also connectionless and unreliable. What it adds to IP is a checksum for


the contents of the datagram and port numbers. These are used to give a client/server
model - see later.

 

TCP supplies logic to give a reliable connection-oriented protocol above IP. It


provides a virtual circuit that two processes can use to communicate.

& 

In order to use a service, you must be able to find it. The Internet uses an address
scheme for machines so that they can be located. The address is a 32 bit integer which
gives the IP address. This encodes a network ID and more addressing. The network ID
falls into various classes according to the size of the network address.

1'& 

Class A uses 8 bits for the network address with 24 bits left over for other addressing.
Class B uses 16 bit network addressing. Class C uses 24 bit network addressing and
class D uses all 32.

(& 

Internally, the UNIX network is divided into sub networks. Building 11 is currently on
one sub network and uses 10-bit addressing, allowing 1024 different hosts.

& 
8 bits are finally used for host addresses within our subnet. This places a limit of 256
machines that can be on the subnet.
c


&!& 





The 32 bit address is usually written as 4 integers separated by dots.

& 

A service exists on a host, and is identified by its port. This is a 16 bit number. To
send a message to a server, you send it to the port for that service of the host that it is
running on. This is not location transparency! Certain of these ports are "well known".

(#'

A socket is a data structure maintained by the system to handle network


connections. A socket is created using the call socket. It returns an integer that is like a
file descriptor. In fact, under Windows, this handle can be used with Read File and
Write File functions.

#include <sys/types.h>
#include <sys/socket.h>
int socket(int family, int type, int protocol);

Here "family" will be AF_INET for IP communications, protocol will be zero, and
type will depend on whether TCP or UDP is used. Two processes wishing to
communicate over a network create a socket each. These are similar to two ends of a
pipe - but the actual pipe does not yet exist.
c


6 %&

JFreeChart is a free 100% Java chart library that makes it easy for developers
to display professional quality charts in their applications. JFreeChart's extensive
feature set includes:

A consistent and well-documented API, supporting a wide range of chart types;

A flexible design that is easy to extend, and targets both server-side and client-side
applications;

Support for many output types, including Swing components, image files
(including PNG and JPEG), and vector graphics file formats (including PDF, EPS and
SVG);

JFreeChart is "open source" or, more specifically, free software. It is


distributed under the terms of the GNU Lesser General Public Licence (LGPL), which
permits use in proprietary applications|

‘   




Charts showing values that relate to geographical areas. Some examples


include: (a) population density in each state of the United States, (b) income per capita
for each country in Europe, (c) life expectancy in each country of the world. The tasks
in this project include: Sourcing freely redistributable vector outlines for the countries
of the world, states/provinces in particular countries (USA in particular, but also other
areas);

Creating an appropriate dataset interface (plus default implementation), a rendered,


and integrating this with the existing XYPlot class in JFreeChart;

Testing, documenting, testing some more, documenting some more.


c 


J       




Implement a new (to JFreeChart) feature for interactive time series charts --- to
display a separate control that shows a small version of ALL the time series data, with
a sliding "view" rectangle that allows you to select the subset of the time series data to
display in the main chart

u  ! "
There is currently a lot of interest in dashboard displays. Create a flexible
dashboard mechanism that supports a subset of JFreeChart chart types (dials, pies,
thermometers, bars, and lines/time series) that can be delivered easily via both Java
Web Start and an applet.

# $  %" 


The property editor mechanism in JFreeChart only handles a small subset of
the properties that can be set for charts. Extend (or reimplement) this mechanism to
provide greater end-user control over the appearance of the charts.


c



3  6 (  

3 ‘--1% 8#

THE proliferation of IEEE 802.11 networks in recent years demonstrates a dramatic


shift in the primary mechanism for the Internet access. According to a survey
conducted by the Pew Internet Project in February 2007, about one third of the
population of Internet users in the USA connects via wireless networks. IEEE 802.11
networks, in the form of WLANs or citywide multi hop mesh networks are now
expected to support the connectivity requirements of hundreds to thousands of users
simultaneously. The increased usage of 802.11 networks and devices, however,
exposes many problems in current networks. IEEE 802.11 is a CSMA/CA -based
medium access scheme. All the users in the vicinity of each other share the medium as
a common resource. A large number of users in a network can lead to excessive load
or congestion in the network. Jardosh et al. present an example case study of a large
congested WLAN and describe the adverse effects of such congestion. 

In this network, more than 1,000 clients attempted to use the network
simultaneously. The network could not sustain this high load: users obtained
unacceptably low throughput, and many users were unable to even maintain
association with the access points (APs). Eventually the network broke down, causing
frustration among the users. Congestion has an adverse impact on current rate
adaptation algorithms, an important aspect of the IEEE 802.11 MAC protocol that
determines the network throughput. In a multi rate 802.11 network, rate adaptation is
the operation of selecting the best transmission rate, and dynamically adapting this
selection to the channel quality variations. The data rates offered by 802.11a/b/g
networks vary from a low of 1 Mbps to the high rate of 54 Mbps. This wide range in
the choice of data rates makes the behavior of the rate adaptation algorithm critical to
the throughput performance, especially in congested scenarios. Current rate adaptation
solutions are typically designed for operation in uncongested networks, where packet
loss is more likely to correlate with poor link quality rather than congestion. These
solutions have been shown to exhibit inferior performance in congested networks.
c 


These solutions do not distinguish congestion-related packet losses from those


caused by poor link quality, and react to all packet losses by switching to a lower
transmission rate. This rate switch, in turn, increases the channel occupancy time of
packet transmissions and ads to the already existing congestion. In this work, our goal
is to design a rate adaptation scheme that provides high network performance in
congested networks as well as lightly loaded networks. In order to design such a rate
adaptation scheme, however, our approach is to develop mechanisms that can identify
and measure the network congestion level in real time. Traditional metrics, such as
network throughput, do not accurately characterize congestion in a wireless network
because of the locally shared channel and the use of multiple transmission rates.
Current congestion metrics proposed for wireless networks are processor intensive,
and, therefore, are not suitable for real-time operation. Hence, there is a need for
lightweight congestion measurement solutions that can identify congestion in a
wireless network in real time. These mechanisms enable the rate adaptation scheme to
respond to the network congestion levels and make intelligent decisions about the
choice of transmission rate.

In summary, we require congestion measurement solutions to assist in the


development of a congestion-aware rate adaptation scheme. To this end, we present a
measurement-driven approach to the characterization of congestion in wireless
networks and to the design of a congestion-aware rate adaptation scheme. Our two
main contributions are as follows: First, we develop two measurement techniques that
can identify wireless network congestion in real time. The first technique is active and
measures the channel access delay, the minimum time delay for a packet transmission
in the network. The second technique is passive and measures the channel busy time,
the fraction of time for which the medium was utilized during some time interval. We
evaluate and compare the performance of these techniques in a test bed as well as a
large WLAN with active users connected to the Internet. We show that the channel
busy time can accurately measure network congestion in real time.
c 


3 2
(  

 4


&#

Ê
Text File
Ê
Packets send to q
Ê &#' !&
Ê (&& ü
Ê
Ê
&#'#-
Ê
Ê
Ê
Ê &#'
Ê &!#!&



c


( (4

In this module we design the user interface for Sender, Queue, Receiver and
Result displaying window. These windows are designed in order to display all the
processes in this project.

l(  = )

In this module the data which we are selecting to send is divided into packets
and then those sent to the WOOF.

The Packet Receiver is used to receive the packets from the WOOF after the
packet loss. Then the receiver displays the received packets from the WOOF.



  4
>  

We propose two real-time congestion measurement techniques, namely an


active probe-based method called Channel Access Delay, and a passive method called
Channel Busy Time. We evaluate the two techniques in a test bed network and a large
WLAN connected to the Internet. We then present the design and evaluation of
Wireless congestion Optimized Fallback (WOOF), a rate adaptation scheme that uses
congestion measurement to identify congestion-related packet losses. Through
simulation and test bed implementation we show that, compared to other well-known
rate adaptation algorithms, WOOF achieves up to 300 percent throughput
improvement in congested networks. Packet Receiver Packet Loss Calculation

(4    ((

In congested networks, traditional rate adaptation algorithms have been shown


to choose lower data-rates for packet transmissions, leading to reduced total network
throughput and capacity. A primary reason for this behavior is the lack of real-time
congestion measurement techniques that can assist in the identification of congestion-
related packet losses in a wireless network. The challenge for a rate adaptation
algorithm is to be able to identify the cause of a packet loss, i.e., whether a packet was
lost because of a bad link, hidden terminal, or congestion. In the absence of such a
c


distinction, rate adaptation algorithms may actually compound network congestion. In


our work, we attempt to probabilistically identify congestion-related packet losses and
minimize their impact on rate adaptation. We proposed two techniques to measure
congestion in a wireless network in real time. While channel access delay is an active
technique that requires the node to actively transmit data packets in the network,
channel busy time involves passive measurements without actually requiring data
transmission.

4(
 (


Congestion on the wired Internet is caused when the offered load on a link
approaches the capacity of the network link. Similarly, congestion in IEEE 802.11
wireless networks maybe defined as a state where the shared wireless medium is close
to being fully utilized by the nodes, because of given channel conditions and/or
external interference, while operating within the constraints of the 802.11 protocol.

Identification of congestion in wireless networks presents new challenges as


compared to wired networks. The shared nature of the wireless medium causes a node
to share the transmission channel not just with other nodes in the network, but also
with external sources of interference. Unlike wired networks, where throughput
degradation on a network link is indicative of congestion, throughput degradation in
wireless networks can occur due to a loss channel, increased packet collisions during
congestion or external interference. In addition, throughput of a wireless link is also
directly influenced by the rate adaptation algorithm through its choice of transmission
data rate.

In this paper, we implement and evaluate two real-time congestion


measurement techniques for wireless networks. The first is an active technique that
measures the channel access delay, the minimum time delay for a packet transmission
in the network at any instant. The second technique is passive in nature and measures
channel busy time, the fraction of time for which the medium was utilized, during
some time interval. 
c


3 u  ü 4


Data Flow Model is commonly used during the analysis phase. The analysis is
depicted by the engineer pictorially with the help of Data Flow Diagrams (DFDs). A
DFD shows the Input / Output flow of data, Reports generated and Data stores that are
used by the system. It views a system as a process that transforms the inputs into
desired outputs. That means a DFD shows the transformation of data from input to
output, through processes, may be described logically and independently of the
physical components associated with the system.
c



Ê
  

Ê


ÊÊÊÊ Ê   


ÊÊ


  

  



Ê 
Ê 

 Ê




 Ê  

 Ê

 ÊÊÊ

  Ê
  Ê
Ê
Ê

 
 
 

  


 


c

3   ?


 

3 3  
 


c


3 Ñ (4

The input design is the link between the information system and the user. It
comprises the developing specification and procedures for data preparation and those
steps are necessary to put transaction data in to a usable form for processing can be
achieved by inspecting the computer to read data from a written or printed document
or it can occur by having people keying the data directly into the system. The design
of input focuses on controlling the amount of input required, controlling the errors,
avoiding delay, avoiding extra steps and keeping the process simple. The input is
designed in such a way so that it provides security and ease of use with retaining the
privacy. Input Design considered the following things:

Ê What data should be given as input?


Ê How the data should be arranged or coded?
Ê The dialog to guide the operating personnel in providing input.
Ê Methods for preparing input validations and steps to follow when error occur.

$6 )(

1.Input Design is the process of converting a user-oriented description of the input


into a computer-based system. This design is important to avoid errors in the data
input process and show the correct direction to the management for getting correct
information from the computerized system.

2. It is achieved by creating user-friendly screens for the data entry to handle large
volume of data. The goal of designing input is to make data entry easier and to be free
from errors.

3.When the data is entered it will check for its validity. Data can be entered with the
help of screens. Appropriate messages are provided as when needed so that the use
will not be in maize of instant. Thus the objective of input design is to creat e an input
layout that is easy to follow.
c 


3 @ (4

A quality output is one, which meets the requirements of the end user and
presents the information clearly. In any system results of processing are
communicated to the users and to other system through outputs. In output design it is
determined how the information is to be displaced for immediate need and also the
hard copy output. It is the most important and direct source information to the user.
Efficient and intelligent output design improves the system¶s relationship to help user
decision-making.

1. Designing computer output should proceed in an organized, well thought out


manner; the right output must be developed while ensuring that each output element is
designed so that people will find the system can use easily and effectively. When
analysis design computer output, they should Identify the specific output that is
needed to meet the requirements.

2. Select methods for presenting information.

3. Create document, report, or other formats that contain information produced by the
system.

The output form of an information system should accomplish one or more of the
following objectives.

§Ê Convey information about past activities, current status or projections of the


§Ê Future.
§Ê Signal important events, opportunities, problems, or warnings.
§Ê Trigger an action.
§Ê Confirm an action.
c



Ñ ( (
(4


The purpose of testing is to discover errors. Testing is the process of trying to


discover every conceivable fault or weakness in a work product. It provides a way to
check the functionality of components, sub assemblies, assemblies and/or a finished
product It is the process of exercising software with the intent of ensuring that the
Software system meets its requirements and user expectations and does not fail in an
unacceptable manner. There are various types of test. Each test type addresses a
specific testing requirement.

Ñ ‘.
Unit testing involves the design of test cases that validate that the internal
program logic is functioning properly, and that program inputs produce valid outputs.
All decision branches and internal code flow should be validated. It is the testing of
individual software units of the application .it is done after the completion of an
individual unit before integration. This is a structural testing, that relies on knowledge
of its construction and is invasive. Unit tests perform basic tests at component level
and test a specific business process, application, and/or system configuration. Unit
tests ensure that each unique path of a business process performs accurately to the
documented specifications and contains clearly defined inputs and expected results.

Ñ 2.&.
Integration tests are designed to test integrated software components to determine
if they actually run as one program. Testing is event driven and is more concerned
with the basic outcome of screens or fields. Integration tests demonstrate that although
the components were individually satisfaction, as shown by successfully unit testing,
the combination of components is correct and consistent. Integration testing is
specifically aimed at exposing the problem s that arise from the combination of
components.
c 


 
  ˜

Functional tests provide systematic demonstrations that functions tested are


available as specified by the business and technical requirements, system
documentation, and user manuals.

Functional testing is centered on the following items:

Valid Input : identified classes of valid input must be accepted.

Invalid Input : identified classes of invalid input must be rejected.

Functions : identified functions must be exercised.

Output : identified classes of application outputs must be exercised.

Systems/Procedures: interfacing systems or procedures must be invoked.

Organization and preparation of functional tests is focused on requirements,


key functions, or special test cases. In addition, systematic coverage pertaining to
identify Business process flows; data fields, predefined processes, and successive
processes must be considered for testing. Before functional testing is complete,
additional tests are identified and the effective value of current tests is determined.

System testing ensures that the entire integrated software system meets
requirements. It tests a configuration to ensure known and predictable results. An
example of system testing is the configuration oriented system integration test. System
testing is based on process descriptions and flows, emphasizing pre-driven process
links and integration points.
c 


Ñ 5#&

ü%$*.

White Box Testing is a testing in which in which the software tester has
knowledge of the inner workings, structure and language of the software, or at least its
purpose. It is purpose. It is used to test areas that cannot be reached from a black box
level.


$!&#'$*.

Black Box Testing is testing the software without any knowledge of the inner
workings, structure or language of the module being tested. Black box tests, as most
other kinds of tests, must be written from a definitive source document, such as
specification or requirements document, such as specification or requirements
document. It is a testing in which the software under test is treated, as a black box .you
cannot ³see´ into it. The test provides inputs and responds to outputs without
considering how the software works.

.

Unit testing is usually conducted as part of a combined code and unit test phase
of the software lifecycle, although it is not uncommon for coding and unit testing to be
conducted as two distinct phases.

  " 

Field testing will be performed manually and functional tests will be written in
detail.
c


8#-
ëÊ All field entries must work properly.
ëÊ Pages must be activated from the identified link.
ëÊ The entry screen, messages and responses must not be delayed.

& 
ëÊ Verify that the entries are of the correct format
ëÊ No duplicate entries should be allowed
ëÊ All links should take the user to the correct page.

.&.

Software integration testing is the incremental integration testing of two or


more integrated software components on a single platform to produce failures caused
by interface defects.

The task of the integration test is to check that components or software


applications, e.g. components in a software system or ± one step up ± software
applications at the company level ± interact without error.

 ! All the test cases mentioned above passed successfully. No defects
encountered.

##&#.
User Acceptance Testing is a critical phase of any project and requires
significant participation by the end user. It also ensures that the system meets the
functional requirements.

 ! All the test cases mentioned above passed successfully. No defects
encountered.
c


º (!&

Implementation is the stage of the project when the theoretical design is


turned out into a working system. Thus it can be considered to be the most
critical stage in achieving a successful new system and in giving th e user,
confidence that the new system will work and be effective.

The implementation stage involves careful planning, investigation of the


existing system and it¶s constraints on implementation, designing of methods to
achieve changeover and evaluation of changeover methods.


c


£ 3

£ ‘(  

>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA >
>A  &#'( A> 
>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA> 

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.net.*;
import java.io.*;
public class PacketSender extends JFrame
{
// Variables declaration
private JLabel jLabel1;
private JLabel jLabel2;
private JLabel jLabel3;
private JTextField jTextField1;
private JTextArea jTextArea1;
private JScrollPane jScrollPane1;
private JButton jButton1;
private JButton jButton2;
private JButton jButton3;
private JPanel contentPane;
c


public float filelength,r;


public byte filebyte[]=new byte[100000];
public String filstr[];
public String filpkt[];
public String Dest1="";
public int filint[];
public char filchar[];
public int i,j,k,l,m;
public int ch,packmest=0;
long stt,flen;
Socket st;
String s="";
String ss[];
// End of variables declaration
 public PacketSender()
{
super();
initializeComponent();
this.setVisible(true);
}
private void initializeComponent()
{
jLabel1 = new JLabel();
jLabel1.setFont(new Font("Arial",Font.BOLD,15));
jLabel2 = new JLabel();
jLabel2.setFont(new Font("Arial",Font.BOLD,12));
jLabel3 = new JLabel();
jLabel3.setFont(new Font("Arial",Font.BOLD,12));
c


jTextField1 = new JTextField();


jTextField1.setFont(new Font("Arial",Font.BOLD,12));
jTextArea1 = new JTextArea();
jTextArea1.setFont(new Font("Arial",Font.BOLD,12));
jTextArea1.setForeground(new Color(0, 0, 102));
jScrollPane1 = new JScrollPane();
jButton1 = new JButton();
jButton2 = new JButton();
jButton3 = new JButton();
contentPane = (JPanel)this.getContentPane();
//
// jLabel1
//
jLabel1.setForeground(new Color(0, 0, 102));
jLabel1.setText("SENDER");
//
// jLabel2
//
jLabel2.setForeground(new Color(0, 0, 102));
jLabel2.setText("Open the File : ");
//
// jLabel3
//
jLabel3.setForeground(new Color(0, 0, 102));
jLabel3.setText("Status Information");
//
// jTextField1
//
c


jTextField1.setForeground(new Color(0, 0, 102));


jTextField1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
{
jTextField1_actionPerformed(e);
}
});
//
// jTextArea1
//
//
// jScrollPane1
//
jScrollPane1.setViewportView(jTextArea1);
//
// jButton1
//
jButton1.setForeground(new Color(0, 0, 102));
jButton1.setText("Browse");
jButton1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
{
jButton1_actionPerformed(e);
}
});

//
// jButton2
c 


//
jButton2.setForeground(new Color(0, 0, 102));
jButton2.setText("Send");
jButton2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
{
jButton2_actionPerformed(e);
}
});
//
// jButton3
//
jButton3.setForeground(new Color(0, 0, 102));
jButton3.setText("Exit");
jButton3.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
{
jButton3_actionPerformed(e);
}
});
//
// contentPane
//
contentPane.setLayout(null);
contentPane.setBackground(new Color(255, 255, 255));
addComponent(contentPane, jLabel1, 300,10,132,30);
addComponent(contentPane, jLabel2, 55,46,192,24);
addComponent(contentPane, jLabel3, 280,175,187,24);
c



addComponent(contentPane, jTextField1, 55,70,470,30);


addComponent(contentPane, jScrollPane1, 55,200,595,400);
addComponent(contentPane, jButton1, 550,70,100,30);
addComponent(contentPane, jButton2, 550,110,100,30);
addComponent(contentPane, jButton3, 550,150 ,100,30);
//
// PacketSender
//
this.setTitle("PacketSender");
this.setLocation(new Point(135, 133));
this.setSize(new Dimension(700, 660));
this.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
}
private void addComponent(Container container,Component c,int x,int y,int width,int
height)
{
c.setBounds(x,y,width,height);
container.add(c);
}

private void jTextField1_actionPerformed(ActionEvent e)


{
System.out.println("\njTextField1_actionPerformed(ActionEvent e)
called.");

private void jButton1_actionPerformed(ActionEvent e)


{
c 


System.out.println("\nLoading File")
try
{
char re[];int count=0;String s="";
int i=0,w=0;int j=48;
FileDialog fd=new FileDialog(this,"Open",FileDialog.LOAD);
fd.show();
jTextField1.setText(fd.getDirectory()+fd.getFile());
File f = new File(fd.getDirectory()+fd.getFile());
flen=(long)f.length();
re=new char[(int)flen];
FileInputStream fin=new FileInputStream(fd.getDirectory()+fd.getFile());
while((w=fin.read())!=-1)
{
re[i]=(char)w;
s+=Character.toString(re[i]);
i++;
}

System.out.println(s);
System.out.println(s.length());
nt rem=s.length()%j;
if(rem==0)
{
packmest=(s.length()/48);
}
else
{
c 


packmest=(s.length()/48)+1;
}
System.out.println("Rem "+rem);
int sub=s.length()-rem;
System.out.println("S "+sub);
String ss1=s.substring(sub,s.length());
System.out.println("Last Packet: "+ss1);
ss=new String[packmest] ;
int k=0,packet=1,ii=0;
while(j<s.length())
{
ss[k]=s.substring(ii, j);
ii=j;
k++;
j=j+48;
}
ss[k]=ss1;
for(i=0;i<packmest;i++)
{
System.out.println("Packet ["+i+"]"+ss[i]);
jTextArea1.append("\nPacket ["+i+"] = "+ss[i]);
}
}
catch (Exception er)
{
er.printStackTrace();
}
}
c


private void jButton2_actionPerformed(ActionEvent e)


{
System.out.println("Sending Packets");
try
{
Dest1="";
FileInputStream fis=new FileInputStream("Queue.txt");
while((ch=fis.read())!=-1)
Dest1+=(char)ch;
Dest1.trim();
st=new Socket(Dest1,4500);
DataOutputStream dos=new DataOutputStream(st.getOutputStream());
stt=System.currentTimeMillis();
dos.writeLong(stt);
dos.writeLong(flen);
dos.writeInt(packmest);
for(i=0;i<packmest;i++)
{
dos.writeUTF(ss[i]);
}

jTextArea1.append("\n\n*********************************** \n\n");
jTextArea1.append("\nPackets Sending Completed");
System.out.println("\nPackets Sending Completed");
}
catch (Exception ty)
{
c


ty.printStackTrace();
}
}
private void jButton3_actionPerformed(ActionEvent e)
{
System.out.println("\nExit");
System.exit(1);
}

>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAA> 
>A &#'0A> 
>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA> 

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.net.*;
import java.io.*;
/**
* Summary description for PacketQueue
*
*/
public class PacketQueue extends JFrame
{
// Variables declaration
private JLabel jLabel1;
private JLabel jLabel2;
c


private JTextArea jTextArea1;


private JScrollPane jScrollPane1;
private JButton jButton1;
private JPanel contentPane;
public int i,j,a,l;
public long st,flen;
public float filelength;
public String filtfr[];
public String filmer[];
public char pakch[][];
public int loss;
ServerSocket ss;
ServerSocket ss1;
Socket so;
Socket so1;

// End of variables declaration

public PacketQueue()
{
super();
initializeComponent();
this.setVisible(true);
try
{
ss=new ServerSocket(4500);
ss1=new ServerSocket(4501);
while(true)
c


{
so=ss.accept();
System.out.println("**********Packets Are Arriving From The Source*********");
jTextArea1.setText("\nPackets Recieving Started");

jTextArea1.append("\n\n********************************* *****\n\n");
DataInputStream dis=new
DataInputStream(so.getInputStream());
st=dis.readLong();
flen=dis.readLong();
filelength=dis.readInt();
filtfr=new String[(int)filelength];
filmer=new String[(int)filelength];
pakch=new char[1000][1000];
for(i=0;i<filelength;i++)
{
filtfr[i]=dis.readUTF();
jTextArea1.append("\nRecieved Packet : ["+i+"] = "+filtfr[i]);
System.out.println("Packet : ["+i+"] = "+filtfr[i]);
}

jTextArea1.append("\n\n************************************** \n\n");
jTextArea1.append("\nPackets Recieving Completed");
jTextArea1.append("\nPackets Sending Started");

jTextArea1.append("\n\n********************** **************** \n\n");


System.out.println("Flen = "+flen);
System.out.println("Filelength = "+fileleng th);
/*for(i=0;i<((int)filelength)-1;i++)
c


{
for(j=0;j<48;j++)
{
pakch[i][j]=(char)filtfr[i].charAt(j);
}
}
for(i=0;i<(int)filelength;i++)
{
for(j=0;j<48;j++)
{
System.out.print(pakch[i][j]+" ");
}
System.out.print("\n");
}
*/
l=(int)(Math.random()*filelength);
so1=ss1.accept();
DataOutputStream dos=new DataOutputStream(so1.getOutputStream());
dos.writeLong(st);
dos.writeLong(flen);
dos.writeInt((int)filelength);
for(i=0;i<filelength;i++)
{
if(i==l)
{

}
else
c


{
dos.writeUTF(filtfr[i]);
jTextArea1.append("\nSending Packet : ["+i+"] = "+filtfr[i]);
}
}

jTextArea1.append("\n\n************************** *********\n\n");
jTextArea1.append("\nPackets Sending Completed");
System.out.println("\nPackets Sending Completed");
}
}
catch(Exception df)
{
df.printStackTrace();
}
}
private void initializeComponent()
{
jLabel1 = new JLabel();
jLabel1.setFont(new Font("Arial",Font.BOLD,15));
jLabel1.setForeground(new Color(0, 0, 102));
jLabel2 = new JLabel();
jLabel2.setFont(new Font("Arial",Font.BOLD,12));
jLabel2.setForeground(new Color(0, 0, 102));
jTextArea1 = new JTextArea();
jTextArea1.setFont(new Font("Arial",Font.BOLD,12));
jTextArea1.setForeground(new Color(0, 0, 102));
jScrollPane1 = new JScrollPane();
c 


jButton1 = new JButton();


jButton1.setForeground(new Color(0, 0, 102));
contentPane = (JPanel)this.getContentPane();
//
// jLabel1
//
jLabel1.setText("WOOF");
//
// jLabel2
//
jLabel2.setText("Status Information");
//
// jTextArea1
//
// jScrollPane1
//
jScrollPane1.setViewportView(jTextArea1);
//
// jButton1
//
jButton1.setText("Exit");
jButton1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
{
jButton1_actionPerformed(e);
}
});
// contentPane
c



//
contentPane.setLayout(null);
contentPane.setBackground(new Color(255, 255, 255));
addComponent(contentPane, jLabel1, 245,14,166,40);
addComponent(contentPane, jLabel2, 220,70,207,33);
addComponent(contentPane, jScrollPane1, 23,111,539,387);
addComponent(contentPane, jButton1, 480,515,83,28);
//
// PacketQueue
//
this.setTitle("PacketQueue");
this.setLocation(new Point(0, 0));
this.setSize(new Dimension(590, 580));
this.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
}
private void addComponent(Container container,Component c,int x,int y,int width, int
height)
{
c.setBounds(x,y,width,height);
container.add(c);
}
private void jButton1_actionPerformed(ActionEvent e)
{
System.out.println("Exit");

System.exit(1);
}
>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA> 
c 


>A &#'#- A>


>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA> 

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.net.*;
import java.io.*;
/**
* Summary description for PacketReciever
*
*/
public class PacketReciever extends JFrame
{
// Variables declaration
private JLabel jLabel1;
private JLabel jLabel2;
private JLabel jLabel3;
private JTextField jTextField1;
private JTextArea jTextArea1;
private JScrollPane jScrollPane1;
private JButton jButton1;
private JButton jButton2;
private JPanel contentPane;
public int i;
public float filelength;
public long st,et,flen,packloss;
public double delay,lp,lb,rec,a=48,b=0.00014;
c 


public String Dest1="",Fien,add;


public String filtfr[];
public String filpac="";
public int ch,l;
Socket so;
// End of variables declaration

public PacketReciever()
{
super();
initializeComponent();
this.setVisible(true);
try
{
while(true)
{
Dest1="";
FileInputStream fis=new FileInputStream("Queue.txt");
while((ch=fis.read())!=-1)
Dest1+=(char)ch;
Dest1.trim();
so=new Socket(Dest1,4501);
DataInputStream dis=new DataInputStream(so.getInputStream());
st=dis.readLong();
flen=dis.readLong();
filelength=dis.readInt();
filtfr=new String[(int)filelength];
l=(int)(Math.random()*2);
c


System.out.println("**********Packets Are Arriving From The Queue*********");


jTextArea1.setText("\nPackets Recieving Started");
jTextArea1.append("\n\n******************************** ****\n\n");
for(i=0;i<(filelength-1);i++)
{
filtfr[i]=dis.readUTF();
filpac+=filtfr[i];
jTextArea1.append("\nRecieved Packet : ["+i+"] = "+filtfr[i]);
System.out.println("Packet : ["+i+"] = "+filtfr[i]);
}
jTextArea1.append("\n\n************************************ **\n\n");
jTextArea1.append("\nPackets Recieving Completed");
//System.out.println("\n\n\n"+filpac);
et=System.currentTimeMillis();
delay=(double)(et-st)/1000;
System.out.println("\n\n*************************************** \n\n");
System.out.println("\n\nTime taken to Transfer = "+delay+" Seconds");
}
}
catch (Exception err)
{
err.printStackTrace();
}
}

private void initializeComponent()


c


{
jLabel1 = new JLabel();
jLabel1.setFont(new Font("Arial",Font.BOLD,15));
jLabel1.setForeground(new Color(0, 0, 102));
jLabel2 = new JLabel();
jLabel2.setFont(new Font("Arial",Font.BOLD,12));
jLabel2.setForeground(new Color(0, 0, 102));
jLabel3 = new JLabel();
jLabel3.setFont(new Font("Arial",Font.BOLD,12));
jLabel3.setForeground(new Color(0, 0, 102));
jTextField1 = new JTextField();
jTextArea1 = new JTextArea();
jTextArea1.setFont(new Font("Arial",Font.BOLD,12));
jTextArea1.setForeground(new Color(0, 0, 102));
jScrollPane1 = new JScrollPane();
jButton1 = new JButton();
jButton1.setFont(new Font("Arial",Font.BOLD,12));
jButton1.setForeground(new Color(0, 0, 102));
jButton2 = new JButton();
jButton2.setFont(new Font("Arial",Font.BOLD,12));
jButton2.setForeground(new Color(0, 0, 102));
contentPane = (JPanel)this.getContentPane();
//
// jLabel1
//
jLabel1.setText("RECIEVER");
//
// jLabel2
c


//
jLabel2.setText("Recieved File Location : ");
//
// jLabel3
//
jLabel3.setText("Recieved File Content");
//
// jTextField1
//
jTextField1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
{
jTextField1_actionPerformed(e);
}

});
//
// jTextArea1
//
//
// jScrollPane1
//
jScrollPane1.setViewportView(jTextArea1);
//
// jButton1
//
jButton1.setText("Result");
jButton1.addActionListener(new ActionListener() {
c


public void actionPerformed(ActionEvent e)


{
jButton1_actionPerformed(e);
}
});
//
// jButton2
//
jButton2.setText("Exit");
jButton2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
{
jButton2_actionPerformed(e);
}
});
//
// contentPane
//
contentPane.setLayout(null);
contentPane.setBackground(new Color(255, 255, 255));
addComponent(contentPane, jLabel1, 299,15,131,33);
addComponent(contentPane, jLabel2, 55,76,202,28);
addComponent(contentPane, jLabel3, 288,183,171,28);
addComponent(contentPane, jTextField1, 53,107,500,31);
addComponent(contentPane, jScrollPane1, 54,218,620,363);
addComponent(contentPane, jButton1, 581,108,93,31);
addComponent(contentPane, jButton2, 581,158,93,31);
//
c


// PacketReciever
//
this.setTitle("PacketReciever");
this.setLocation(new Point(0, 0));
this.setSize(new Dimension(730, 640));
this.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
}
private void addComponent(Container container,Component c,int x,int y,int width,int
height)
{
c.setBounds(x,y,width,height);
container.add(c);
}

private void jTextField1_actionPerformed(ActionEvent e)


{
System.out.println("\njTextField1_actionPerformed(ActionEvent e) called.");
}

private void jButton1_actionPerformed(ActionEvent e)


{
System.out.println("Result");
Result r=new Result();
r.show();
r.jTextArea1.setText(filpac);
double flsize=(double)flen/1024;
System.out.println("Total Packets Size = "+flsize+" KB");
double tt=(double)flsize/delay;
c


System.out.println("Transfer Rate = "+tt+" kbps");


System.out.println("\n\n**************************** *********\n\n");
r.jTextField5.setText(""+tt+" kbps");
r.jTextField3.setText(""+flsize+" KB");
r.jTextField2.setText(""+delay+" Seconds");
try
{
Fien="";
add="Output File/Output1.txt";
FileWriter fw=new FileWriter(new File(add));
for(i=0;i<(filelength-1);i++)
{
Fien+=filtfr[i];
}
fw.write(Fien);
fw.close();
System.out.println("\n\n\n\n\n\n\n"+Fien);
rec=Fien.length();
System.out.println("REC="+rec);
lp=(rec/rec+a);
lb=(double)lp/1024;
r.jTextField4.setText(""+lb+" KB");
lb=lb-b;
r.jTextField1.setText(""+lb+" KB");
//lb
}
catch (Exception er)
{
c 


er.printStackTrace();
}
}

private void jButton2_actionPerformed(ActionEvent e)


{
System.out.println("Exit");
System.exit(1);

}
c



£ 2( ((


(








c 



ü













c 



 )














c


‘: #!=%&#

‘: ‘  (

Congestion in an IEEE 802.11 wireless network causes drastic reduction in


network performance. Critical to tackling this problem is the ability to identify and
measure congestion. In this paper, we presented two techniques, an active technique
(CAD) and a passive technique (CBT), that measure the utilization of the wireless
medium in real time. We then used the CBT measurement technique to develop a rate
adaptation scheme, WOOF, for IEEE 802.11. Performance evaluation shows up to a
three-fold gain in throughput in a congested network. Simulations demonstrated the
utility of using WOOF in a large WLAN. In addition to our congestion-aware rate
adaptation algorithm, we believe that the measurement techniques proposed in this
paper can be used to design new protocols or solutions that perform well under
congested scenarios.













c


 (


[1] J. Horrigan, Memo on Wireless Internet Access, Pew Internet and American Life Project,
http://www.pewinternet.org/pdfs/PIP_ Wireless.Use.pdf, Feb. 2007.

[2] A.P. Jardosh, K. Mittal, K.N. Ramachandran, E.M. Belding, and K.C. Almeroth, ³IQU:
Practical Queue-Based User Association Management for WLANs,´ Proc. ACM MobiCom,
Sept. 2006.

[3] M. Rodrig, C. Reis, R. Mahajan, D. Wetherall, and J. Zahorjan, ³Measurement-Based


Characterization of 802.11 in a Hotspot Setting,´ Proc. ACM SIGCOMM Workshop
Experimental Approaches to Wireless Network Design and Analysis (EWIND), Aug. 2005.

[4] A. Jardosh, K. Ramachandran, K. Almeroth, and E. Belding-Royer, ³Understanding


Congestion in IEEE 802.11b Wireless Networks,´ Proc. Internet Measurement Conf., Oct.
2005.

[5] P.Acharya,A.Sharma,E.Belding,K.Almeroth,andK. Papagiannaki, ³Congestion-Aware


Rate Adaptation in Wireless Networks: A Measurement-Driven Approach,´ Proc. Fifth Ann.
IEEE Conf. Sensor, Mesh and Ad Hoc Comm. and Networks (SECON), June 2008.

[6] J. Kim, S. Kim, S. Choi, and D. Qiao, ³CARA: Collision-Aware Rate Adaptation for
IEEE 802.11 WLANs,´ Proc. IEEE INFOCOM, Apr. 2006.

[7] X. Yang and N. Vaidya, ³On the Physical Carrier Sense in Wireless Ad Hoc Networks,´
Proc. IEEE INFOCOM, Mar. 2005.

[8] G. Holland, N. Vaidya, and P. Bahl, ³A Rate-Adaptive MAC Protocol for Multi-Hop
Wireless Networks,´ Proc. ACM MobiCom, July 2001.

[9] G. Judd, X. Wang, and P. Steenkiste, ³Efficient Channel-Aware Rate Adaptation in


Dynamic Environments,´ Proc. ACM MobiSys, June 2008.

[10] A. Kamerman and L. Monteban, ³WaveLAN II: A HighPerformance Wireless LAN for
the Unlicensed Band,´ Bell Labs Technical J., vol. 2, no. 3, pp. 118-133, Aug. 1997.
c


$$4  

Good Teachers are worth more than thousand books.






You might also like