<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>  Protocols</title>
	<link>http://protocol-tips.assistProgramming.com</link>
	<description>Codding World &#187; Protocols</description>
	<pubDate>Fri, 20 Jun 2008 15:42:38 +0000</pubDate>
	<language>en</language>
			<item>
		<title>Cross-Domain AJAX?</title>
		<link>http://php.AssistProgramming.com/cross-domain-ajax.html</link>
		<pubDate>Thu, 22 May 2008 21:44:15 +0000</pubDate>
		<description><![CDATA[ Imagine you have a web site that uses some data from a server. Imagine you want to get the data from this server without refreshing the web site. Finally, imagine that your site is not hosted on the server it gets data from (the server and the web site have different domains). Well, you [...]]]></description>
			<content:encoded><![CDATA[<p> Imagine you have a web site that uses some data from a server. Imagine you want to get the data from this server without refreshing the web site. Finally, imagine that your site is <em>not</em> hosted on the server it gets data from (the server and the web site have different domains). Well, you have a problem. First, I apologize. This will, probably, be a very technical article. However, I also think that the content is quite valuable.</p>
<h3>Motivation</h3>
<p><a rel="nofollow" href="http://miso.blog.matfyz.sk/?postID=p576">Stankaa</a>, my web project, is based on the idea that anybody can add her to his/her web site. You just have to copy 2 lines of code to your web site and it works.</p>
<p>All of this is done using <acronym title='eXtensible HyperText Markup Language'><span class='caps'>XHTML</span></acronym> Strict and without any &lt;iframe&gt; elements. The web site never reloads. <a rel="nofollow" href="http://miso.blog.matfyz.sk/?postID=p576">Stankaa</a> gets the information she needs from the stankaa.com server asynchronously and modifies the host web site on the fly. The usual way of doing such things is using the XMLHttpRequest JavaScript object (the <a rel="nofollow" href="http://en.wikipedia.org/wiki/Ajax_%28programming%29"><acronym title='Asynchronous Javascript and XML'><span class='caps'>AJAX</span></acronym></a> way). The problem is, it just doesn&#8217;t work if you are requesting information from a different server than the one your site is hosted on. Since the whole idea behind <a rel="nofollow" href="http://miso.blog.matfyz.sk/?postID=p576">Stankaa</a> is that she can be included in anybody&#8217;s web site, I had to come up with a solution.</p>
<h3>Ajax</h3>
<p>First, I will show you how it is usually done when you do not want to do it cross-domain.</p>
<pre>function ajax_request(send, onReady)
{
    var request = window.ActiveXObject
        ? new ActiveXObject("Microsoft.XMLHTTP")
        : new XMLHttpRequest;

    request.onreadystatechange = function()
    {
        if (request.readyState != 4) return;
        onReady(request.responseText);
    }
    request.open("POST", "http://some-domain.sk/some.php", true);
    request.setRequestHeader("Content-Type",
                             "application/x-www-form-urlencoded");
    request.send(send);
}</pre>
<p>This is a source code of a simple function that can &#8220;do&#8221; <acronym title='Asynchronous Javascript and XML'><span class='caps'>AJAX</span></acronym> requests for you. You do not have to understand how it works.  I will just explain how you can use it. Try something like this:</p>
<pre>function onAnswer(answer) { window.alert(answer); };
ajax_request("", onAnswer);</pre>
<p>What does it do? The ajax_request function makes a POST request for &#8220;http://some-domain.sk/some.php&#8221;. When the server answers, the onAnswer function you provided as a parameter for ajax_request executes. It displays an alert window showing the server answer. All this happens &#8220;in the background&#8221;, and the web page doesn&#8217;t reload (thats the point!). You can provide POST parameters for the target .php like this:</p>
<pre>ajax_request("pudding=christmas&amp;state=burned", onAnswer);</pre>
<p>Of course, since JavaScript support <a rel="nofollow" href="http://en.wikipedia.org/wiki/Anonymous_function">anonymous functions</a> (which is a really really nice feature that works especially well with <a rel="nofollow" href="http://en.wikipedia.org/wiki/Closure_%28computer_science%29">closures</a> in JavaScript), you can write just:</p>
<pre>ajax_request("pudding=christmas",
             function (answer) { window.alert(answer); });</pre>
<h3>How to do it cross-domain</h3>
<p>All above should work as long as you request the .php file which is located on the same domain as the requesting web site is. However, it doesn&#8217;t work for Stankaa&#8217;s scenario. After a few hours of desperate research, I managed to put together something that works the way I need it to. Although I must admit that the basic idea behind this thing isn&#8217;t mine (dynamically adding a &lt;SCRIPT&gt; sub element to &lt;HEAD&gt; to get server data), I collected the information from many sources and packed it inside this &#8220;lovely&#8221; package:</p>
<pre>request_callback = undefined;

function request_send(send, callback)
{
    request_callback = callback;
    request_script = document.createElement("script");
    request_script.src = "http://some-domain.sk/some.php?" + send;
    document.getElementsByTagName("head")
        [0].appendChild(request_script);
}

function request_receive(data)
{
    document.getElementsByTagName("head")
        [0].removeChild(request_script);
    request_callback(data);
}</pre>
<p>The usage of the request_send() function remains the same as for the ajax_request() function. Request_send(), is, however,  capable of doing a cross-domain asynchronous server request. Since it doesn&#8217;t use the XMLHttpRequest object, I&#8217;m not sure if I can call it &#8220;Ajax&#8221; anymore.</p>
<p>This approach has its limitations. The first limitation is, POST method is not supported. Everything you specify in the &#8220;send&#8221; variable will appear in $_GET array in <acronym title='PHP Hypertext Processor'><span class='caps'>PHP</span></acronym>. The second limitation is, the server-side <acronym title='PHP Hypertext Processor'><span class='caps'>PHP</span></acronym> has to &#8220;cooperate&#8221;. What does it mean? It means that instead of doing</p>
<pre>&lt;?php echo "I am a Christmas Pudding!"; ?&gt;</pre>
<p>the <acronym title='PHP Hypertext Processor'><span class='caps'>PHP</span></acronym> file has to do this:</p>
<pre>&lt;?php echo "request_receive('I am a Christmas Pudding!');"; ?&gt;</pre>
<p>But, I don&#8217;t think thats such a big problem.</p>
<p>Finally, I will briefly talk about how it works. When you call the request_send() function, JavaScript adds new &lt;SCRIPT&gt; element to document &lt;HEAD&gt; element. This new script tag specifies the requested <acronym title='PHP Hypertext Processor'><span class='caps'>PHP</span></acronym> file as its source (&#8221;src&#8221;) attribute. The <acronym title='PHP Hypertext Processor'><span class='caps'>PHP</span></acronym> file is then automatically requested. When the request (in form of a &#8220;request_recieve(&#8217;I am a Christmas Pudding!&#8217;);&#8221; source code) arrives, its content is executed. Consequently, request_receive() function is called, the &lt;SCRIPT&gt; element is removed from the document head and user-defined callback function is executed with a data that server sent.</p>
<p>The really great thing about this is that it works across all major browsers (latest Opera, Safari, Firefox, <acronym title='Internet Explorer 7'><span class='caps'>IE7</span></acronym> and <acronym title='Internet Explorer 6'><span class='caps'>IE6</span></acronym>). And the funny thing is, many people believe that it can&#8217;t be done at all <img src='http://www.assistprogramming.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> Some people have already found this way of doing it, by I doubt it is a widespread phenomenon.</p>
<p>Full article <a rel="nofollow" href="http://miso.blog.matfyz.sk/p731-cross-domain-ajax" target="_blank">here</a></p>
]]></content:encoded>
			</item>
		<item>
		<title>Tracert - ping - TTL</title>
		<link>http://protocol-tips.AssistProgramming.com/tracert-ping-ttl.html</link>
		<pubDate>Wed, 31 Oct 2007 21:17:13 +0000</pubDate>
		<description><![CDATA[Tracert
We can find the numbers of routers that are between us and the destination using tracert command. The result give us the IP addresses or the routers name.
The syntax for Windows system is:
tracert [-d][-h maximum hops][-j host_list][-w timeout] target_name

 target_name is the domain name or the IP address.
-d    Do not resolve addresses [...]]]></description>
			<content:encoded><![CDATA[<h3>Tracert</h3>
<p>We can find the numbers of routers that are between us and the destination using <strong>tracert </strong>command. The result give us the IP addresses or the routers name.</p>
<p>The syntax for Windows system is:</p>
<pre>tracert [-d][-h maximum hops][-j host_list][-w timeout] target_name</pre>
<ul>
<li><strong> target_name</strong> is the domain name or the IP address.</li>
<li><strong>-d</strong>    Do not resolve addresses to hostname</li>
<li><strong>-h maximum_hops</strong>    Maximum number of hops to search for target</li>
<li><strong>-j host-list</strong>    Loose source route along host-list</li>
<li>-<strong>w timeout</strong>    Wait timeout milliseconds for each reply</li>
</ul>
<h3>Ping</h3>
<p><strong>Ping (Packet InterNet Groper)</strong> is a command used to verify if the data packages arrive to a destinations without errors.</p>
<p>The syntax for the Windows system is:</p>
<pre>ping    [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS][-r count] [-s count] [[-j host-list] | [-k host-list]][-w timeout] destination-list</pre>
<ul>
<li><strong>destination-list</strong> is the domain name or the IP address</li>
<li><strong>-t</strong>    Pings the specified host until stopped. To see statistics and continue - type Control-Break. To stop - type Control-C</li>
<li><strong>-a</strong>    Resolve addresses to hostnames</li>
<li><strong>-n count</strong>    Number of echo requests to send</li>
<li><strong>-l size</strong>    Send buffer size</li>
<li><strong>-f</strong>    Set Don&#8217;t Fragment flag in packet</li>
<li><strong>-i TTL</strong>    Time To Live</li>
<li><strong>-v TOS </strong>   Type Of Service</li>
<li>-<strong>r count </strong>   Record route for count hops</li>
<li><strong>-</strong><strong>s count</strong>    Timestamp for count hops</li>
<li><strong>-j host-list </strong>   Loose source route along host-list</li>
<li><strong>-k host-list</strong>    Strict source route along host-list</li>
<li><strong>-w timeout</strong>    Timeout in milliseconds to wait for each reply</li>
</ul>
<h3>TTL</h3>
<p><strong>TTL (Time To Live)</strong> is a 8 bytes field from the IP header and is contained by the 9th octets from 20. The TTL field is settled by that who is sending the datagram and it is decremented by every host which is in the way to the destination. If this field has the value 0, before the datagram reached the destination, the datagram will be deleted and will generate an error  ICMP (11 - Time Exceeded) which will be replayed. The TTL field purpose is to avoid the situation when an undelivered datagram move on the Internet.</p>
<p><strong>TTL reply</strong> is the value show as a response  after executing the ping command. To find out the personal TTL use the <strong>ping localhost</strong> command. For the computers who has older Windows versions the result will be 32, and for the others it will be 128.</p>
]]></content:encoded>
			</item>
		<item>
		<title>Internet Protocols</title>
		<link>http://protocol-tips.AssistProgramming.com/internet-protocols.html</link>
		<pubDate>Tue, 30 Oct 2007 20:26:51 +0000</pubDate>
		<description><![CDATA[The key protocols of the Internet are: News, Gopher, Telnet, Electronic Mail (e-mail), File Transfer  Protocol (FTP), and HTTP (World Wide Web). These and  others are integrated in the Uniform Resource Locator  mechanism of the WWW.
News
The NNTP (Network News Transfer Protocol) protocol is used for distribution of news articles. One popular usage [...]]]></description>
			<content:encoded><![CDATA[<p>The key protocols of the Internet are: <strong>News</strong>, <strong>Gopher</strong>, <strong>Telnet</strong>, <strong>Electronic Mail </strong>(e-mail), <strong>File Transfer  Protocol </strong>(FTP), and <strong>HTTP </strong>(World Wide Web). These and  others are integrated in the Uniform Resource Locator  mechanism of the WWW.</p>
<h3>News</h3>
<p>The <strong>NNTP </strong>(Network News Transfer Protocol) protocol is used for distribution of news articles. One popular usage of NNTP is <strong>Network News</strong> (USENET) which also offers bulletin boards and chat rooms. There are newsgroups which can be accessed thought a special program on the Internet. We can &#8220;subscribe&#8221; to newsgroups and communicate through a system similar to e-mail. As with e-mail, Netnews is usually informal communication between several  of individuals!</p>
<h3>Gopher</h3>
<p>Gopher is another tool used in Internet, which let you to browse for information without knowing where the information is located. Gopher is based on a browse from top-level menu to bottom level through &#8220;menus&#8221;. You navigate deeper and deeper in menus and when you reached the bottom level the information is displayed. All this has the benefit of being simple and easy to set up - the text files would need to be split down to the desired level of detail, and  some description files would need to be set up.</p>
<p>The major disadvantage is the inflexibility of the static hierarchy. The user  has to use judgment at each menu selection, as to which is the most likely item  on the menu to contain the information required.</p>
<h3>Telnet</h3>
<p>Telnet provides a way to access remote a computer. You can interact through the remote computer with your keyboard, mouse or monitor and work on that computer as it you were an user on that computer. The remote computer is frequently called a host computer and you can use services on it even thought it is on the other side of the word.</p>
<p>Telnet is a user command using the underlying <acronym title='Transmission Control Protocol/Internet Protocol'><span class='caps'><acronym title='Transmission Control Protocol'><span class='caps'>TCP</span></acronym>/IP</span></acronym> protocol for accessing  remote computers. Being logged on the host computers means you have some privileges you may have been granted to the specific applications and data on that computer.</p>
<h3>E-mail</h3>
<p>One of the most popular service on the Internet is the electronic mail. The main features of this service are sending and receiving of electronics messages. To send an e-mail, you must know the recipient&#8217;s e-mail address. These addresses  are composed of:</p>
<ul>
<li>the user&#8217;s identification</li>
<li>followed by the &#8220;@&#8221; sign</li>
<li>followed by the location (domain name) of the recipient&#8217;s computer.</li>
</ul>
<h3>File Transfer Protocol</h3>
<p>FTP allows to send and receive files to a remote computer. You can transfer many different types of files to your computer. Working on a server with a FTP Program you can update files stored on the computer.  FTP is included in the suite of protocols that are part of <acronym title='Transmission Control Protocol/Internet Protocol'><span class='caps'><acronym title='Transmission Control Protocol'><span class='caps'>TCP</span></acronym>/IP</span></acronym>, the  client/server program that every Internet server and your PC or  workstation uses.</p>
<h3>HTTP (World Wide Web)</h3>
<p>Underlying the user interface represented by web browsers, is the network and  the protocols that travel the wires to the servers or &#8220;engines&#8221; that process  requests, and return the various media. The protocol of the web is known as  HTTP, for <strong>HyperText Transfer Protocol</strong>. HTTP is the underlying mechanism on which  <strong><acronym title='Common Gateway Interface'><span class='caps'>CGI</span></acronym></strong> operates, and it directly determines what you can and cannot send or receive  via <acronym title='Common Gateway Interface'><span class='caps'>CGI</span></acronym>.</p>
]]></content:encoded>
			</item>
		<item>
		<title>FTP - Short Introduction</title>
		<link>http://protocol-tips.AssistProgramming.com/ftp-short-introduction.html</link>
		<pubDate>Tue, 23 Oct 2007 19:43:50 +0000</pubDate>
		<description><![CDATA[To may have a communications between two computers, there must be a common language. The configuration and the rules of this language are named protocol. The most used protocol on the Internet is the HTTP protocol and so the URL address has this aspect: http://domain/file.
As  you probably  know there are also another protocols [...]]]></description>
			<content:encoded><![CDATA[<p>To may have a communications between two computers, there must be a common language. The configuration and the rules of this language are named <strong>protocol</strong>. The most used protocol on the Internet is the HTTP protocol and so the <acronym title='Uniform Resource Locator'><span class='caps'>URL</span></acronym> address has this aspect: <em>http://domain/file</em>.</p>
<p>As  you probably  know there are also another protocols such as: FTP, MAIL, TELNET, GOPHER, NEWS.</p>
<p>Suppose this:</p>
<ul>
<li>we registered a domain name (for example mydomain.com)</li>
<li>we found a host server</li>
<li>we have built the website, the files are stored on the personal computer</li>
</ul>
<p>The next step is to upload the website on the server. In other words, transferring the files that compose the website from our personal computer to the server.</p>
<p><strong>FTP (File Transport Protocol) - </strong>is the protocol used for uploading and downloading files on/from a server.</p>
<p>There are three ways for a success upload, using:</p>
<ul>
<li>specifics FTP commands in MS-DOS</li>
<li>a specified software called FTP client</li>
<li>the admin web page at the address indicated by the administrator of the server</li>
</ul>
<p>The first method, using FTP commands, that isn&#8217;t used so much anymore, because involves knowing these commands, unlike the other two where the operating manner is graphical.</p>
<p>The <strong>FTP client</strong> is a software which will open a session (connexion), on 21th port, between the personal computer and the web server:</p>
<p>For a FTP client configuration there are used the information provided by the host administrator:</p>
<ol>
<li><em>FTP Host Address</em> - can be the FTP server name or the IP address</li>
<li><em>FTP Site Username</em> - the user name used for identification</li>
<li><em>FTP Site Password</em>  - the password used for identification</li>
<li><em>FTP Site Connection Port</em>  - 21th port</li>
<li><em>Loging Type</em> - Normal</li>
<li><em>Transfer Type</em> - usually Auto-Detect.</li>
</ol>
<p>The FTP clients, no matter the producer, has a similar interface with 5 distinct areas:</p>
<ol>
<li><em>Necessary  parameters for the connexion</em> (area 1)</li>
<li><em>Local Panel</em> - files stored on the local computer (area 2)</li>
<li><em>Remote Panel</em> - files stored on the web server in our domain proper directory  (area 3)</li>
<li><em>Log Panel</em> - the list of messages from local computer and the FTP server answer (area 4)</li>
<li><em>Queue Panel</em> - the list of sent and received files (area 5)</li>
</ol>
<p>These areas are represented in the image below - in this case we have the FTP Client called <strong>SmartFTP</strong>.</p>
<p><img src="http://www.assistprogramming.com/wp-content/uploads/2007/10/smartftp.gif" alt="smartftp.gif" style="display: block ! important; float: none" /></p>
<p>Example of FTP clients: <strong>CuteFTP</strong>, <strong>SmartFTP </strong>or the free versions: <strong>FileZilla </strong>and <strong>WS FTP LE</strong>.</p>
<p>Besides this you can also use <strong>Total Commander</strong>, but you have to know how to make a connection. I will &#8220;teach&#8221; you how to set a FTP count using this program and how to transfer files on the server. Go to <strong>Net</strong> menu and then choose <strong>FTP Connect</strong>. It will appear a new window like in the image below.</p>
<p><img src="http://www.assistprogramming.com/wp-content/uploads/2007/10/connect.gif" alt="connect.gif" style="display: block ! important; float: none" /></p>
<p>If you hit the button <strong>New connection&#8230; </strong>you can set a new connexion to a FTP server. It will appear a new window like in the image below:</p>
<p><img src="http://www.assistprogramming.com/wp-content/uploads/2007/10/ftpdetails.gif" alt="ftpdetails.gif" style="display: block ! important; float: none" /></p>
<p>Here are some explanations:</p>
<ul>
<li><strong>Session:</strong> here you can type any name representative for your session</li>
<li><strong>Host name:</strong> you have to type the correct connexion address to FTP server and the port(if it&#8217;s not the standard one).</li>
<li><strong>User name:</strong> you have to specifies the name that you connect through FTP</li>
<li><strong>Password:</strong> here type the password that you connect through FTP</li>
<li><strong>Remote Dir:</strong> here you are not forced to write something. Some servers configuration has the first director the domain name, others has &#8220;root&#8221; or &#8220;public_html&#8221;. After you are connected you will see the directors structure and you can edit this settings latter to connect yourself at the worked director.</li>
<li><strong>Local dir:</strong> you can type the current director on the local computer where you have the files that you want to save on the server.</li>
</ul>
<p>After completed all the fields hit &#8220;OK&#8221; and then you can connect by clicking the <strong>Connect</strong> button.</p>
<p>If you want to have a log with all the actions go to <strong>Configuration </strong>&gt; <strong>Options, </strong>select from the list in the left side FTP and in the right side type the location you want to save the log file.</p>
<p>The last step is to transfer the files. You can upload more than one file.</p>
<p>For files transferring  using the admin web page choose <em>File Manager</em>. The files will be uploaded in the <strong>public_html</strong> directory stored on the web server. This method is used when we do not transfer a lot of files because this procedure needs some operations for every file.</p>
<p>For transferring a lot of files or a hole website it is recommended a FTP client this way we can select and send simultaneous  all the files.</p>
<p>For other questions I invite you to talk on <a href="http://forum.assistprogramming.com/" title="Assist Programming forums">forum</a>.</p>
<p>Here are some usefully links for downloading FTP clients:</p>
<ul>
<li><strong>SmartFTP </strong>can be downloaded at the address:  <a rel="nofollow" href="http://www.smartftp.com/download/">http://www.smartftp.com/download/</a></li>
<li>If you want to use <strong>CuteFTP </strong>this is the web address: <a rel="nofollow" href="http://www.cuteftp.com/products/ftp_clients.aspx">http://www.cuteftp.com/products/ftp_clients.aspx<br />
</a></li>
<li>FileZilla is often used as a FTP client for the simple fact it is free. Click <a rel="nofollow" href="http://filezilla-project.org/">here</a> for downloading!</li>
</ul>
]]></content:encoded>
			</item>
		<item>
		<title>What shall we know about TCP/IP?</title>
		<link>http://protocol-tips.AssistProgramming.com/what-shall-we-know-about-tcpip.html</link>
		<pubDate>Wed, 19 Sep 2007 21:51:35 +0000</pubDate>
		<description><![CDATA[Communication between computers, in a network, needs to be done with some communication protocols. A protocol means a set of rules and conventions between different participants to a common activity, in this case information transfer between computers.
Being complex, the protocols are designed on levels (layers).  Every layer defines services and proper protocols. There are [...]]]></description>
			<content:encoded><![CDATA[<p>Communication between computers, in a network, needs to be done with some communication protocols. A protocol means a set of rules and conventions between different participants to a common activity, in this case information transfer between computers.</p>
<p>Being complex, the protocols are designed on levels (layers).  Every layer defines services and proper protocols. There are many protocols models, but the most used and known are <strong><acronym title='Open Source Initiative'><span class='caps'>OSI</span></acronym> </strong>and <strong><acronym title='Transmission Control Protocol/Internet Protocol'><span class='caps'><acronym title='Transmission Control Protocol'><span class='caps'>TCP</span></acronym>/IP</span></acronym></strong>.</p>
<p><acronym title='Transmission Control Protocol/Internet Protocol'><span class='caps'><acronym title='Transmission Control Protocol'><span class='caps'>TCP</span></acronym>/IP</span></acronym> is actually the first settled. He was defined  in relation with  the first computer network sometime around the 70th. The name result from its two main protocols. Here is the <em>internet level</em> used for packages communication. The  <em>transport level </em>is like the <acronym title='Open Source Initiative'><span class='caps'>OSI</span></acronym> one. Here we define two important protocols <strong><acronym title='Transmission Control Protocol'><span class='caps'>TCP</span></acronym></strong> (Transmission Control Protocol) and  <strong>UDP</strong> (User Datagram Protocol). At <em>application level</em> the most known protocols are: <strong>TELNET </strong>(virtual transmission), <strong>FTP </strong>(file transmission), <strong>SMTP</strong> (the electronic mail) and <strong>HTTP </strong>(hypertext).</p>
<h3>Protocols used in Internet</h3>
<p>The protocols used in Internet allow interconnections  between different networks  like <strong>LAN</strong> and <strong>WAN. </strong><acronym title='Transmission Control Protocol'><span class='caps'>TCP</span></acronym> and IP are low level protocols, but the Internet protocols has also high level protocols. Lets see some <characteristics></characteristics></p>
<ul>
<li><strong>ARP </strong>protocols (<em>Address Resolution Protocol</em>) and<em> </em><strong>RARP </strong>(<em>Reverse Address Resolution</em>).  ARP is used for connection between  a Internet address and a hardware address and RARP realizes a inverse connection.<span style="font-family: 'Times New Roman'" lang="RO"></span></li>
<li><strong>IP</strong> (<em>Internet Protocol</em>) and <strong>ICMP</strong> (<em>Internet Control Message Protocol</em>)-ICMP is used  for transmitting command information and set errors between networks components.</li>
<li><strong><acronym title='Transmission Control Protocol'><span class='caps'>TCP</span></acronym> </strong>and <strong>UDP. </strong>Many applications programs in  Internet are based on <acronym title='Transmission Control Protocol'><span class='caps'>TCP</span></acronym>. UDP is used in smaller and simplest application.</li>
<li>The last levels in <acronym title='Open Source Initiative'><span class='caps'>OSI</span></acronym> corresponds with FTP, Telnet, SMTP, <strong>SNMP</strong>(Simple Network Management Protocol).</li>
</ul>
<h3> IP level</h3>
<p>IP protocol send datagrams from a source address to a destination address. Sending datagrams it can be done in an independent way because besides the information sent, a datagram contains the source and the destination address.</p>
<p>IP protocols uses Internet addresses represented on 32 bytes. IP addresses are divided in five classes: A, B, C, D, E in terms of  the way the four bytes are used.</p>
<h3>Application level</h3>
<p>There are  many protocols but I am going to discuss about few:</p>
<p><strong><acronym title='Domain Name System'><span class='caps'>DNS</span></acronym></strong> relates to a symbolic name gave to a node and to the correspondence between these names and the Internet addresses. There are superior name domains and each of them are divided in subdomains and so on. At the superior level (level 1) there are two domains categories: generics and country names. Generics domain are: <em>.com</em> (comercial), <em>.edu</em>(educational),<em>. gov</em>(guvernamental), <em>.org</em>(non-profit organizations). Example of name countries domains : <em>.fr</em>(France), <em>.uk</em>(Great Britain).</p>
<p>The e-mail services uses the <strong>SMTP </strong>protocols witch is dedicated for transmitting messages with ASCII content. The services suppose to send, receive, edit messages etc.</p>
<p><em>World Wide Web</em>(<strong>WWW</strong>) is the most well-known Internet application who allow sending documents, pictures, etc. In WWW there is a distinguish between the client side and the server side. A WWW server administrates documents and send it to the clients. For a docs identifications we use (Universal Resource Locator  <strong><acronym title='Uniform Resource Locator'><span class='caps'>URL</span></acronym></strong>).</p>
<pre>protocol://computer:port/name#label</pre>
<ul>
<li>protocol  - <strong>http </strong>(for hypertext documents), <strong>ftp</strong> (for file transmission), <strong>file </strong>(for accessing a local file)</li>
</ul>
<ul>
<li><em>computer </em>- the name of the node where  is the document</li>
</ul>
<ul>
<li><em>port </em>- the port where the server runs for the specified documents</li>
</ul>
<ul>
<li><em>name</em> - the path name of a file</li>
</ul>
<ul>
<li><em>label</em> - an optional element which can indicate for a location in the document.</li>
</ul>
]]></content:encoded>
			</item>
		<item>
		<title>HTTP some tips about it</title>
		<link>http://protocol-tips.AssistProgramming.com/http-some-tips-about-it.html</link>
		<pubDate>Fri, 14 Sep 2007 21:16:29 +0000</pubDate>
		<description><![CDATA[What is HTTP?
HTTP stands for Hypertext Transfer Protocol. It&#8217;s the network protocol used to deliver virtually all files and other data (collectively called resources) on the World Wide Web, whether they&#8217;re HTML files, image files, query results, or anything else. Usually, HTTP takes place through TCP/IP sockets (and this tutorial ignores other possibilities).
A browser is [...]]]></description>
			<content:encoded><![CDATA[<h2>What is HTTP?</h2>
<p>HTTP stands for Hypertext Transfer Protocol. It&#8217;s the network protocol used to deliver virtually all files and other data (collectively called resources) on the World Wide Web, whether they&#8217;re <acronym title='HyperText Markup Language'><span class='caps'>HTML</span></acronym> files, image files, query results, or anything else. Usually, HTTP takes place through <acronym title='Transmission Control Protocol/Internet Protocol'><span class='caps'><acronym title='Transmission Control Protocol'><span class='caps'>TCP</span></acronym>/IP</span></acronym> sockets (and this tutorial ignores other possibilities).</p>
<p>A browser is an HTTP client because it sends requests to an HTTP server (Web server), which then sends responses back to the client. The standard (and default) port for HTTP servers to listen on is 80, though they can use any port.</p>
<h2>What are &#8220;Resources&#8221;?</h2>
<p>HTTP is used to transmit resources, not just files. A resource is some chunk of information that can be identified by a <acronym title='Uniform Resource Locator'><span class='caps'>URL</span></acronym> (it&#8217;s the R in <acronym title='Uniform Resource Locator'><span class='caps'>URL</span></acronym>). The most common kind of resource is a file, but a resource may also be a dynamically-generated query result, the output of a <acronym title='Common Gateway Interface'><span class='caps'>CGI</span></acronym> script, a document that is available in several languages, or something else.</p>
<p>While learning HTTP, it may help to think of a resource as similar to a file, but more general. As a practical matter, almost all HTTP resources are currently either files or server-side script output.</p>
<h2>Structure of HTTP Transactions</h2>
<p>Like most network protocols, HTTP uses the client-server model: An HTTP client opens a connection and sends a request message to an HTTP server; the server then returns a response message, usually containing the resource that was requested. After delivering the response, the server closes the connection (making HTTP a stateless protocol, i.e. not maintaining any connection information between transactions).</p>
<p>The format of the request and response messages are similar, and English-oriented. Both kinds of messages consist of:<br />
an initial line,<br />
zero or more header lines,<br />
a blank line (i.e. a CRLF by itself), and<br />
an optional message body (e.g. a file, or query data, or query output).</p>
<p>Put another way, the format of an HTTP message is:<br />
&lt;initial line, different for request vs. response&gt;<br />
Header1: value1<br />
Header2: value2<br />
Header3: value3</p>
<p>&lt;optional message body goes here, like file contents or query data;<br />
it can be many lines long, or even binary data $&amp;*%@!^$@&gt;</p>
<p>Initial lines and headers should end in CRLF, though you should gracefully handle lines ending in just LF. (More exactly, CR and LF here mean ASCII values 13 and 10, even though some platforms may use different characters.)</p>
<h2>Initial Request Line</h2>
<p>The initial line is different for the request than for the response. A request line has three parts, separated by spaces: a method name, the local path of the requested resource, and the version of HTTP being used. A typical request line is:<br />
GET /path/to/file/index.html HTTP/1.0</p>
<p>Notes:<br />
GET is the most common HTTP method; it says &#8220;give me this resource&#8221;. Other methods include POST and HEAD&#8211; more on those later. Method names are always uppercase.<br />
The path is the part of the <acronym title='Uniform Resource Locator'><span class='caps'>URL</span></acronym> after the host name, also called the request URI (a URI is like a <acronym title='Uniform Resource Locator'><span class='caps'>URL</span></acronym>, but more general).<br />
The HTTP version always takes the form &#8220;HTTP/x.x&#8221;, uppercase.</p>
<h2>Initial Response Line (Status Line)</h2>
<p>The initial response line, called the status line, also has three parts separated by spaces: the HTTP version, a response status code that gives the result of the request, and an English reason phrase describing the status code. Typical status lines are:<br />
HTTP/1.0 200 OK</p>
<p>or<br />
HTTP/1.0 404 Not Found</p>
<p>Notes:<br />
The HTTP version is in the same format as in the request line, &#8220;HTTP/x.x&#8221;.<br />
The status code is meant to be computer-readable; the reason phrase is meant to be human-readable, and may vary.<br />
The status code is a three-digit integer, and the first digit identifies the general category of response:<br />
1xx indicates an informational message only<br />
2xx indicates success of some kind<br />
3xx redirects the client to another <acronym title='Uniform Resource Locator'><span class='caps'>URL</span></acronym><br />
4xx indicates an error on the client&#8217;s part<br />
5xx indicates an error on the server&#8217;s part<br />
The most common status codes are:<br />
200 OK<br />
The request succeeded, and the resulting resource (e.g. file or script output) is returned in the message body.<br />
404 Not Found<br />
The requested resource doesn&#8217;t exist.<br />
301 Moved Permanently<br />
302 Moved Temporarily<br />
303 See Other (HTTP 1.1 only)<br />
The resource has moved to another <acronym title='Uniform Resource Locator'><span class='caps'>URL</span></acronym> (given by the Location: response header), and should be automatically retrieved by the client. This is often used by a <acronym title='Common Gateway Interface'><span class='caps'>CGI</span></acronym> script to redirect the browser to an existing file.<br />
500 Server Error<br />
An unexpected server error. The most common cause is a server-side script that has bad syntax, fails, or otherwise can&#8217;t run correctly.</p>
<p>A complete list of status codes is in the HTTP specification (section 9 for HTTP 1.0, and section 10 for HTTP 1.1).</p>
<h2>Header Lines</h2>
<p>Header lines provide information about the request or response, or about the object sent in the message body.</p>
<p>The header lines are in the usual text header format, which is: one line per header, of the form &#8220;Header-Name: value&#8221;, ending with CRLF. It&#8217;s the same format used for email and news postings, defined in RFC 822, section 3. Details about RFC 822 header lines:<br />
As noted above, they should end in CRLF, but you should handle LF correctly.<br />
The header name is not case-sensitive (though the value may be).<br />
Any number of spaces or tabs may be between the &#8220;:&#8221; and the value.<br />
Header lines beginning with space or tab are actually part of the previous header line, folded into multiple lines for easy reading.</p>
<p>Thus, the following two headers are equivalent:<br />
Header1: some-long-value-1a, some-long-value-1b<br />
HEADER1:    some-long-value-1a,<br />
some-long-value-1b</p>
<p>HTTP 1.0 defines 16 headers, though none are required. HTTP 1.1 defines 46 headers, and one (Host:) is required in requests. For Net-politeness, consider including these headers in your requests:<br />
The From: header gives the email address of whoever&#8217;s making the request, or running the program doing so. (This must be user-configurable, for privacy concerns.)<br />
The User-Agent: header identifies the program that&#8217;s making the request, in the form &#8220;Program-name/x.xx&#8221;, where x.xx is the (mostly) alphanumeric version of the program. For example, Netscape 3.0 sends the header &#8220;User-agent: Mozilla/3.0Gold&#8221;.</p>
<p>These headers help webmasters troubleshoot problems. They also reveal information about the user. When you decide which headers to include, you must balance the webmasters&#8217; logging needs against your users&#8217; needs for privacy.</p>
<p>If you&#8217;re writing servers, consider including these headers in your responses:<br />
The Server: header is analogous to the User-Agent: header: it identifies the server software in the form &#8220;Program-name/x.xx&#8221;. For example, one beta version of Apache&#8217;s server returns &#8220;Server: Apache/1.2b3-dev&#8221;.<br />
The Last-Modified: header gives the modification date of the resource that&#8217;s being returned. It&#8217;s used in caching and other bandwidth-saving activities. Use Greenwich Mean Time, in the format<br />
Last-Modified: Fri, 31 Dec 1999 23:59:59 GMT</p>
<h2>The Message Body</h2>
<p>An HTTP message may have a body of data sent after the header lines. In a response, this is where the requested resource is returned to the client (the most common use of the message body), or perhaps explanatory text if there&#8217;s an error. In a request, this is where user-entered data or uploaded files are sent to the server.</p>
<p>If an HTTP message includes a body, there are usually header lines in the message that describe the body. In particular,<br />
The Content-Type: header gives the MIME-type of the data in the body, such as text/html or image/gif.<br />
The Content-Length: header gives the number of bytes in the body.</p>
<p>For samples and other specifications visit <a rel="nofollow" href="http://jmarshall.com/easy/http/" title="Http protocol implementation">article&#8217;s source </a></p>
]]></content:encoded>
			</item>
		<item>
		<title>SMTP basics - What is SMTP?</title>
		<link>http://protocol-tips.AssistProgramming.com/smtp-basics-what-is-smtp.html</link>
		<pubDate>Sat, 08 Sep 2007 20:10:15 +0000</pubDate>
		<description><![CDATA[Overview
The SMTP protocol is a simple text based set of rules that establish how two mail servers communicates between. It is a 2 way communication as stated in RFC 821 : &#8220;as   the result of a user mail request, the sender-SMTP establishes a   two-way transmission channel to a receiver-SMTP.  The [...]]]></description>
			<content:encoded><![CDATA[<h3>Overview</h3>
<p>The SMTP protocol is a simple text based set of rules that establish how two mail servers communicates between. It is a 2 way communication as stated in <a rel="nofollow" href="http://www.ietf.org/rfc/" title="RFC standards">RFC 821</a> : &#8220;<em>as   the result of a user mail request, the sender-SMTP establishes a   two-way transmission channel to a receiver-SMTP.  The receiver-SMTP may be either the ultimate destination or an intermediate.  SMTP   commands are generated by the sender-SMTP and sent to the   receiver-SMTP.  SMTP replies are sent from the receiver-SMTP to the   sender-SMTP in response to the commands.</em>&#8221;</p>
<h3>How does it work more exactly?</h3>
<p>A basic email session starts by connecting to the server and is basically a set of pairs message/response between sender/receiver.  The SMTP communication can be directly between the two servers or can relay through a third one. The <a rel="nofollow" href="http://www.ietf.org/rfc/" title="RFC standards">RFC 821</a>  describe the way relaying works like this: &#8221;   To be able to provide the relay capability the SMTP-server must be   supplied with the name of the ultimate destination host as well as   the destination mailbox name.</p>
<p>The argument to the MAIL command is a reverse-path, which specifies   who the mail is from.  The argument to the RCPT command is a   forward-path, which specifies who the mail is to.  The forward-path   is a source route, while the reverse-path is a return route (which   may be used to return a message to the sender when an error occurs   with a elayed message)&#8221;</p>
<p>There are three steps into the SMTP procedure</p>
<ul>
<li>
<h3>MAIL</h3>
</li>
</ul>
<p>The MAIL step is basically how an e-mail is  being sent. This is how a MAIL session may look</p>
<pre>	         S: MAIL FROM:&lt;sender@assistprogramming.com&gt;
                 R: 250 OK

                 S: RCPT TO:&lt;receiver1@assistprogramming.com&gt;
                 R: 250 OK

                 S: RCPT TO:&lt;receiver2@assistprogramming.com&gt;
                 R: 550 No such user here

                 S: RCPT TO:&lt;receiver3@assistprogramming.com&gt;
                 R: 250 OK

                 S: DATA
                 R: 354 Start mail input; end with &lt;CRLF&gt;.&lt;CRLF&gt;

                 S: Here is the first line of the mail input
                 S: ...etc. etc. etc.
                 S: &lt;CRLF&gt;.&lt;CRLF&gt;
                 R: 250 OK</pre>
<p>This could be a standard MAIL session that tries to send message from sender@&#8230; to receiver1, receiver2 and receiver3. We can see that receiver2 does not exists. The SMTP protocols has some response codes that are always standard. A full list of them can be found on the <a rel="nofollow" href="http://www.ietf.org/rfc/" title="RFC standards">RFC 821</a> implementation. Each code can be followed by a textual message which intents to give a descriptive of the code. The response textual messages can differ from server to server( QMail has some messages, Exim others and so on) .</p>
<ul>
<li>
<h4>FORWARDING</h4>
</li>
</ul>
<p>There are some cases where the destination information in the &lt;forward-path&gt; is incorrect, but the receiver-SMTP knows the correct destination.  In such cases, one of the following replies should be used to allow the sender to contact the correct<br />
destination.</p>
<ul>
<li> 251 User not local; will forward to &lt;forward-path&gt;</li>
</ul>
<ul>
<li>   551 User not local; please try &lt;forward-path&gt;</li>
</ul>
<p>Example:</p>
<pre>
      S: RCPT TO:&lt;Postel@USC-ISI.ARPA&gt;
      R: 251 User not local; will forward to &lt;Postel@USC-ISIF.ARPA&gt;</pre>
<ul>
<li>
<h4>VERIFYING AND EXPANDING</h4>
</li>
</ul>
<pre>            S: VRFY claude
                      R: 250 Fred claude &lt;claudiu@assisprogramming.com&gt;

         Or

            S: VRFY test
            R: 251 User not local; will forward to &lt;test@assistprogramming.com&gt;

         Or

            S: VRFY user
            R: 550 String does not match anything.

         Or

            S: VRFY user1
            R: 551 User not local; please try &lt;user4@assitprogramming.com&gt;

         Or

            S: VRFY hkhjkghj
            R: 553 User ambiguous.</pre>
]]></content:encoded>
			</item>
	</channel>
</rss>
