140 lines
3.8 KiB
HTML
Executable File
140 lines
3.8 KiB
HTML
Executable File
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
|
|
<!-- UDP.html (C) K. J. Turner 18/12/14 -->
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
|
|
<head>
|
|
|
|
<title>User Datagram Protocol</title>
|
|
|
|
<link rev="made" href="http://www.cs.stir.ac.uk/~kjt/"/>
|
|
|
|
<script type="text/javascript" language="JavaScript">
|
|
<!--
|
|
var simulator;
|
|
var spA;
|
|
var dpA;
|
|
var spB;
|
|
var dpB;
|
|
|
|
function valid(port, address, user) {
|
|
if (address < 0 || address > 65535) {
|
|
alert ("Port address for User " + user + " must be in range 0-65535");
|
|
return false;
|
|
}
|
|
else
|
|
return true;
|
|
}
|
|
|
|
function set() {
|
|
spA = document.settings.SourcePortA.value.toString();
|
|
dpA = document.settings.DestPortA.value.toString();
|
|
spB = document.settings.SourcePortB.value.toString();
|
|
dpB = document.settings.DestPortB.value.toString();
|
|
if (valid("source", spA, "A") && valid("destination", dpA, "A") &&
|
|
valid("source", spB, "B") && valid("destination", dpB, "B")) {
|
|
simulator.setParameter("sourcePortA", spA);
|
|
simulator.setParameter("destPortA", dpA);
|
|
simulator.setParameter("sourcePortB", spB);
|
|
simulator.setParameter("destPortB", dpB);
|
|
simulator.updateActionList();
|
|
}
|
|
}
|
|
//-->
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body background="simulator.jpeg"
|
|
onload="simulator=document.ProtocolSimulator; set();">
|
|
|
|
<div style="text-align: center">
|
|
|
|
<h1>User Datagram Protocol Simulator</h1>
|
|
|
|
<img src="simulator.gif" alt="Simulator Logo"/>
|
|
|
|
</div>
|
|
|
|
<h2>Protocol Description</h2>
|
|
|
|
<p>
|
|
UDP (User Datagram Protocol) is a simple connection-less protocol for
|
|
transferring datagrams in either direction between a pair of user ports.
|
|
Each datagram is identified by its source and destination port numbers
|
|
(in the range 0 to 65535).
|
|
</p>
|
|
|
|
<h2>Protocol Parameters</h2>
|
|
|
|
<form name="settings">
|
|
|
|
<center>
|
|
|
|
<table cellspacing="5">
|
|
|
|
<tr>
|
|
<td align="right">User A Source Port</td>
|
|
<td><input type="text" name="SourcePortA" value="11" size="5"/></td>
|
|
<td align="right">User A Destination Port</td>
|
|
<td><input type="text" name="DestPortA" value="22" size="5"/> </td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="right">User B Source Port</td>
|
|
<td><input type="text" name="SourcePortB" value="33" size="5"/></td>
|
|
<td align="right">User B Destination Port</td>
|
|
<td><input type="text" name="DestPortB" value="44" size="5"/></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" colspan="4">
|
|
<input type="button" name="btnSet" value="Change Settings"
|
|
onclick="set()"/>
|
|
</td>
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</center>
|
|
|
|
</form>
|
|
|
|
<h2>Protocol Simulation</h2>
|
|
|
|
<p>
|
|
The protocol simulation shows a time-sequence diagram with users A and B,
|
|
protocol entities A and B that support them, and a communications medium
|
|
that carries messages. Users request data transmissions with
|
|
<em>DatReq(Src,Dst,Dn)</em> and receive data transmissions as
|
|
<em>DatInd(Src, Dst,Dn)</em>. Data messages are simply numbered <em>D0</em>,
|
|
<em>D1</em>, etc. in sequence for each user; no explicit data content is
|
|
given. Each user request leads to the protocol message
|
|
<em>DT(Src,Dst,Dn)</em> that gives the source port, destination port and
|
|
data message number.
|
|
</p>
|
|
|
|
<center>
|
|
|
|
<applet code="simulator.ProtocolSimulator.class"
|
|
archive="ProtocolSimulator.jar" width="750" height="700"
|
|
name="ProtocolSimulator">
|
|
<param name="protocol" value="UDP"/>
|
|
</applet>
|
|
|
|
</center>
|
|
|
|
<hr/>
|
|
|
|
<p>
|
|
<a href="index.html"><img src="uparrow.gif" alt="Up Arrow"/></a>
|
|
Up one level to <a href="index.html">Protocol Simulators</a>
|
|
</p>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|