<?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/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jose Solares &#187; english</title>
	<atom:link href="http://chema.solaresmaldonado.com/category/english/feed" rel="self" type="application/rss+xml" />
	<link>http://chema.solaresmaldonado.com</link>
	<description>Dream as if you&#039;ll live forever, Live as if you&#039;ll die today.</description>
	<lastBuildDate>Tue, 06 Sep 2011 18:04:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Sample Code for RDT Server</title>
		<link>http://chema.solaresmaldonado.com/linux/14/sample-code-for-rdt-server/</link>
		<comments>http://chema.solaresmaldonado.com/linux/14/sample-code-for-rdt-server/#comments</comments>
		<pubDate>Thu, 02 Jun 2005 02:36:00 +0000</pubDate>
		<dc:creator>Jose Solares</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[avaya]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[RDT]]></category>

		<guid isPermaLink="false">http://chema.solaresmaldonado.com/1/14/sample-code-for-rdt-server/</guid>
		<description><![CDATA[This is sample code implementating the RDT Protocol described before.]]></description>
			<content:encoded><![CDATA[<p>
<b>Note:</b>This code expects to be using sockets blocking I/O request, to use non blocking I/O we should use libevent or a similar solution (like threads), this is outside of the scope of this code. It also assumes that we already have the server listening on a port and that we have already accepted a client connection `cliente_socket`. <span class="caps">RCVBUFFER </span>is 256.<br />
<p>


<pre>
char buffer[RCVBUFFER + 2];
buffer[RCVBUFFER] = 0;
char response[] = {2,6,1,0,7,1,0,2,1,6,0x81};
int  message_size,i,j;
char counter = 0;

if (( message_size = recv(client_socket, buffer,
        RCVBUFFER, 0)) &lt; 0 )
   err_handler (&quot;recv() failed&quot;);

if ( message_size == 17 ) {
   if ( send(client_socket, response, 11, 0) != 11 )
      err_handler (&quot;send() failed&quot;);
} else {
   printf ( &quot;- %d - \n&quot;, message_size );
   err_handler (&quot;Protocol Error&quot;);
}

printf (&quot;Starting...\n&quot;);

for (;;) {
   if (( message_size = recv(client_socket, buffer,
         RCVBUFFER, 0)) &lt; 0 )
      err_handler (&quot;recv() failed&quot;);

   if (message_size &gt; 5 &amp;amp;&amp;amp; bufer[0] == -128)
      counter = buffer[3];
   i = (buffer[0] == -128)? 5 : 0;
   buffer[message_size + 1] = '\0';
   buffer[message_size] = '\n';

   //printf (&quot;Capturing %d bytes\n&quot;,message_size);
   fprintf (stderr, &quot;%s&quot;,&amp;amp;buffer[i]);
   //printf (&quot;Current Counter : %d\n&quot;,counter);

   if (message_size == 1) {
       if (buffer[0] == 0x50) {
          char respond[] = {0x51};
          if ( send (client_socket, respond, 1, 0) != 1)
          err_handler(&quot;send() failed&quot;);
      }
   } else {
      i = message_size - 1;
      if (buffer[i-2] == 0x20 &amp;amp;&amp;amp; buffer[i-1] == 0x0d &amp;amp;&amp;amp; 
          buffer[i] == 0x0a) {
         char respond[] = {0x40, 0x05, 0x01, ++counter, 0x81};
         if ( send (client_socket, respond, 5, 0) != 5 )
            err_handler(&quot;send() failed&quot;);
      }
   }
/* Do Something with the Data we received */
}
</pre>]]></content:encoded>
			<wfw:commentRss>http://chema.solaresmaldonado.com/linux/14/sample-code-for-rdt-server//feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The RDT Protocol</title>
		<link>http://chema.solaresmaldonado.com/linux/13/the-rdt-protocol/</link>
		<comments>http://chema.solaresmaldonado.com/linux/13/the-rdt-protocol/#comments</comments>
		<pubDate>Thu, 02 Jun 2005 02:30:00 +0000</pubDate>
		<dc:creator>Jose Solares</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://chema.solaresmaldonado.com/1/13/the-rdt-protocol/</guid>
		<description><![CDATA[This is a draft of the RDT Protocol as Implemented by the Avaya Reliable Data Tranport Tool, which is used to collect CDR from the Definity System among other things.

I'll be showing you code to implement this protocol.]]></description>
			<content:encoded><![CDATA[<h2>Draft of the Avaya <acronym title="Reliable Data Transport">RDT</acronym> Protocol as it&#8217;s used in <acronym title="Reliable Data Transport Tool">RDTT</acronym></h2>

<p class="justify" style="text-align:justify">As i didnt find any <acronym title="GNU Is not Unix">GNU</acronym>/Linux Applications that could speak <span class="caps">RDT </span>and i had a need for a proyect at work, armed with ethereal and <acronym title="Reliable Data Transport Tool">RDTT</acronym> i did a <em>reverse engineering</em> of the packets captured, this is what i learned of <span class="caps">RDT.</span></p>

<p>This Draft specifies a Server, see example code using this information <a href="http://chema.solaresmaldonado.com/index.php?id=14">here</a> </p>

<p class="justify" style="text-align:justify">When we start listening the <acronym title="Reliable Data Transport">RDT</acronym> client sends us a 17 byte packet, albeit it has a distinct structure from other packets received, at no other time did i get a 17 byte packet in all the time i captured packets so i just send a response when i receive 17 bytes, in order to start receiving the data we want, we need to send back a response:</p>

<blockquote><p>byte response[] = {2, 6, 1, 0, 7, 1, 0, 2, 1, 6, 0&#215;81};</p></blockquote>

<p>Just then do we start receiving the data:</p>

<p>We define a checksum-like number that the client expects to get back so it knows that we have indeed received the data :</p>



<pre>
( buffer[ 0 ] == -128 &amp;amp;&amp;amp; msize &gt; 5 )?buffer[ 3 ]:0;
or
( buffer[ 0 ] == 0x80 &amp;amp;&amp;amp; msize &gt; 5 )?buffer[ 3 ]:0;
</pre>


<p>depending on the OS and data types you want to use</p>

<p><em>buffer is a char * where we store the data received with functions recv o read</em><br />
<em>msize is an int where recv/read return the quantity of data read</em></p>

<p>We send the above checksum when we get a `200d0a` at the end of a packet, using a char[]<br />
{0&#215;40, 0&#215;05, 0&#215;01, ++checksum, 0&#215;81};</p>

<p><acronym title="Reliable Data Tranport">RDT</acronym> has something similar to the ping on <acronym title="Internet Relay Chat">IRC</acronym>, It periodically sends us a 1 byte packet with 0&#215;50, expecting us to send a 1 byte packet with 0&#215;51</p>

<p>I hope you find this information useful.</p>]]></content:encoded>
			<wfw:commentRss>http://chema.solaresmaldonado.com/linux/13/the-rdt-protocol//feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TripleDES Encryption Using C#</title>
		<link>http://chema.solaresmaldonado.com/english/9/tripledes-encryption/</link>
		<comments>http://chema.solaresmaldonado.com/english/9/tripledes-encryption/#comments</comments>
		<pubDate>Thu, 24 Mar 2005 23:02:00 +0000</pubDate>
		<dc:creator>Jose Solares</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://chema.solaresmaldonado.com/1/9/tripledes-encryption/</guid>
		<description><![CDATA[C# TripleDES Encryption Class This class works in VS.NET 2003, it can be modified to use a different kind of encryption, you would need to modify the constructor to change the type of encryption you wish to use.]]></description>
			<content:encoded><![CDATA[<p><a href="http://chema.solaresmaldonado.com/files/code/encryption.html">C# TripleDES Encryption Class</a></p>

<p>This class works in <span class="caps">VS.NET</span> 2003, it can be modified to use a different kind of encryption, you would need to modify the constructor to change the type of encryption you wish to use.</p>]]></content:encoded>
			<wfw:commentRss>http://chema.solaresmaldonado.com/english/9/tripledes-encryption//feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WaitForSound for Asterisk</title>
		<link>http://chema.solaresmaldonado.com/asterisk/8/waitforsound-for-asterisk/</link>
		<comments>http://chema.solaresmaldonado.com/asterisk/8/waitforsound-for-asterisk/#comments</comments>
		<pubDate>Thu, 24 Mar 2005 22:58:00 +0000</pubDate>
		<dc:creator>Jose Solares</dc:creator>
				<category><![CDATA[Asterisk]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://chema.solaresmaldonado.com/1/8/waitforsound-for-asterisk/</guid>
		<description><![CDATA[WaitForSound Aplication To use this application in asterisk you need to download it into the apps directory inside of the asterisk source, you also need to modify the Makefile in said directory so that waitforsound gets compiled as well, you might also find useful WaitForSilence, this application is included in the HEAD version of the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://chema.solaresmaldonado.com/files/code/app_waitforsound.c">WaitForSound Aplication</a></p>

<p>To use this application in asterisk you <strong>need</strong> to download it into the apps directory inside of the asterisk source, you also need to modify the Makefile in said directory so that waitforsound gets compiled as well, you might also find useful WaitForSilence, this application is included in the <span class="caps">HEAD </span>version of the asterisk cvs.</p>]]></content:encoded>
			<wfw:commentRss>http://chema.solaresmaldonado.com/asterisk/8/waitforsound-for-asterisk//feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding extra Languages to Textpattern&#8217;s output</title>
		<link>http://chema.solaresmaldonado.com/english/10/dual-language-textpattern/</link>
		<comments>http://chema.solaresmaldonado.com/english/10/dual-language-textpattern/#comments</comments>
		<pubDate>Sat, 12 Mar 2005 23:11:00 +0000</pubDate>
		<dc:creator>Jose Solares</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[Textpattern]]></category>

		<guid isPermaLink="false">http://chema.solaresmaldonado.com/1/10/dual-language-textpattern/</guid>
		<description><![CDATA[Well i finally got around and added english as a language for the content on this page, thanks to the way textpattern is constructed it was fairly easy to accomplish this. First we create a page for each section we want in the other language, in my case english. we can copy the original into [...]]]></description>
			<content:encoded><![CDATA[<p class="justify" style="text-align:justify">Well i finally got around and added english as a language for the content on this page, thanks to the way textpattern is constructed it was fairly easy to accomplish this.</p>

<p class="justify" style="text-align:justify">First we create a page for each section we want in the other language, in my case english. we can copy the original into a language specific page</p>

<p class="justify" style="text-align:justify">Next we add the sections we want in english, like &#8220;contactus-en&#8221;, &#8220;default-en&#8221; and &#8220;archive-en&#8221;, this in part of the way i have my site setup, i have miscellaneous articles in archive, my contact info in contactus, and the main page in default.</p>

<p class="justify" style="text-align:justify">We then modify our pages to translate everything we have in our original language (spanish) into english for our new content.</p>

<p class="justify" style="text-align:justify">Then we create the content (articles) with the info we want in english, like the welcome intro but in english with section set to default-en, our articles we want in english in archive-en, our contact info translated in contactus-en.</p>

<p class="justify" style="text-align:justify">Categorization is an entirely different beast that we wont be addressing now.</p>

<p class="justify" style="text-align:justify">And thus we can add sections and pages for any language we want, all thanks to the flexibility of textpattern.</p>]]></content:encoded>
			<wfw:commentRss>http://chema.solaresmaldonado.com/english/10/dual-language-textpattern//feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

