<?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/"
	>

<channel>
	<title>Ben Lobaugh Online</title>
	<atom:link href="http://ben.lobaugh.net/blog/feed" rel="self" type="application/rss+xml" />
	<link>http://ben.lobaugh.net/blog</link>
	<description>/(bb&#124;[^b]{2})/</description>
	<pubDate>Sat, 06 Mar 2010 06:35:50 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>New Website Launch: Evergreen State Dahlia Association</title>
		<link>http://ben.lobaugh.net/blog/439/new-website-launch-evergreen-state-dahlia-association</link>
		<comments>http://ben.lobaugh.net/blog/439/new-website-launch-evergreen-state-dahlia-association#comments</comments>
		<pubDate>Sat, 06 Mar 2010 06:33:33 +0000</pubDate>
		<dc:creator>blobaugh</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ben.lobaugh.net/blog/?p=439</guid>
		<description><![CDATA[The Evergreen State Dahlia Association was looking for an updated look and a site that allowed them more flexibility and control. I am happy to unveil their new site. Go check it out!
Evergreen State Dahlia Association
]]></description>
			<content:encoded><![CDATA[<p>The Evergreen State Dahlia Association was looking for an updated look and a site that allowed them more flexibility and control. I am happy to unveil their new site. Go check it out!</p>
<p><a title="Evergreen State Dahlia Association" href="http://olympiadahlias.org" target="_blank">Evergreen State Dahlia Association</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ben.lobaugh.net/blog/439/new-website-launch-evergreen-state-dahlia-association/feed</wfw:commentRss>
		</item>
		<item>
		<title>PHP: A new kind of template engine</title>
		<link>http://ben.lobaugh.net/blog/429/php-a-new-kind-of-template-engine</link>
		<comments>http://ben.lobaugh.net/blog/429/php-a-new-kind-of-template-engine#comments</comments>
		<pubDate>Sun, 21 Feb 2010 08:09:17 +0000</pubDate>
		<dc:creator>blobaugh</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://ben.lobaugh.net/blog/?p=429</guid>
		<description><![CDATA[I have been developing a custom Content Management System (CMS) for Blam Designs and though there are several really good templating engines out there for PHP (such as Smarty) I find them usually bulky. Then there is also the need to learn the templating language as well. Though the templating languages are simple, it is [...]]]></description>
			<content:encoded><![CDATA[<p>I have been developing a custom <a title="Wikipedia: Web Content Management System" href="http://en.wikipedia.org/wiki/Web_content_management_system" target="_blank">Content Management System</a> (CMS) for <a title="Blam Designs: Web Development and Hosting" href="http://blamdesigns.com" target="_blank">Blam Designs</a> and though there are several really good templating engines out there for PHP (such as <a title="Smarty: Template Engine" href="http://www.smarty.net/" target="_blank">Smarty</a>) I find them usually bulky. Then there is also the need to learn the templating language as well. Though the templating languages are simple, it is one more thing for a designer to worry about knowing that pulls them away from their designs.</p>
<p>With that in mind I set out to find or create a new kind of templating system that works in a way similar to the JavaScript DOM, but works with PHP. The beauty of this sort of a system lies in the fact that a designer can create a layout with all the filler content and dummy text they can imagine and they do not have to remove any of it, or add any special template tags before uploading their snazzy layout to a web server. Simply add a normal HTML id attribute to whatever it is the designer wants to place content in and the template engine will automagically take care of the rest for you!</p>
<p>For example:</p>
<pre>&nbsp;
&lt;div id=&quot;content&quot;&gt;Lorem ipsum solet dolomar&lt;/div&gt;
&nbsp;</pre>
<p>Might be replaced with:</p>
<pre>&nbsp;
&lt;div id=&quot;content&quot;&gt;Hello World! I am some content&lt;/div&gt;
&nbsp;</pre>
<p>Sounds pretty cool doesn't it? I wound up creating my own PHP classes to handle this for me. I ran across a library called <a title="PHP Simple HTML DOM Parser" href="http://simplehtmldom.sourceforge.net/" target="_blank">PHP Simple HTML DOM Parser</a> (SHDP) which does all the heavy lifting for me. My class it basically a wrapper object that makes it easier to deal with the SHDP, in addition to providing some extra functionality. Using my class it is possible to replace the entire contents of a tag (such as &lt;title&gt;), replace by the element id (such as &lt;span id="myid"&gt;), or through the use of "special" tags. The "special" tags I call special because they do not fit inside the rest of the template paradigm. A special tag works in much the same manner as a tag from a normal template system like Smarty would. Tags are created using curly braces and look similar to {{my_tag}}. I needed to keep these in in the case that some special piece of code needs to be dynamically added to the template, but is not an HTML tag or id. This happens with things such as file paths.</p>
<p>Though I may not be fully done tweaking the new template engine it is fully operational and I am going to provide a few code example and a download of my class with SHDP packaged with it. Eventually I would like to setup a new site dedicated to this template engine, and would like to fully re-write SHDP so that the template system is one complete unit, not relying on any external libraries.</p>
<p>HTML File:</p>
<pre>&nbsp;
&lt;html&gt;
&lt;head&gt;
	&lt;title&gt;Template Engine Demo&lt;/title&gt;
	&lt;meta name=&quot;author&quot; content=&quot;Ben Lobaugh&quot;&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div id=&quot;contents&quot; style=&quot;border: 1px dashed #000000&quot;&gt;
This is inside the contents div
&lt;/div&gt;
&lt;div id=&quot;d2&quot; style=&quot;margin-top: 20px; border: 1px solid #000000&quot;&gt;
This is inside the d2 div
&lt;/div&gt;
&nbsp;
{{special_tag}}
&lt;/body&gt;
&lt;/html&gt;
&nbsp;</pre>
<p>Replace the contents of a tag:</p>
<pre class="php"><span style="color: #0000ff;">$t</span>-&gt;<span style="color: #006600;">setTag</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'title'</span>, <span style="color: #ff0000;">'This is a new title'</span><span style="color: #66cc66;">&#41;</span>;</pre>
<p>Replace the contents of an element by id:</p>
<pre class="php"><span style="color: #0000ff;">$t</span>-&gt;<span style="color: #006600;">setById</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'contents'</span>, <span style="color: #ff0000;">'Hello World! I am new content'</span><span style="color: #66cc66;">&#41;</span>;</pre>
<p>Append the contents of an element by id:</p>
<pre class="php"><span style="color: #0000ff;">$t</span>-&gt;<span style="color: #006600;">setById</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'d2'</span>, <span style="color: #ff0000;">' I am appended content'</span>, <span style="color: #ff0000;">'a'</span><span style="color: #66cc66;">&#41;</span>;</pre>
<p>Set a special tag</p>
<pre class="php"><span style="color: #0000ff;">$t</span>-&gt;<span style="color: #006600;">setSpecialTag</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'special_tag'</span>, <span style="color: #ff0000;">'I am special!'</span><span style="color: #66cc66;">&#41;</span>;</pre>
<p>Final Output:</p>
<pre>&nbsp;
&lt;html&gt;
&lt;head&gt;
	&lt;title&gt;This is a new title&lt;/title&gt;
	&lt;meta name=&quot;author&quot; content=&quot;Ben Lobaugh&quot;&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div id=&quot;contents&quot; style=&quot;border: 1px dashed #000000&quot;&gt;Hello World! I am new content&lt;/div&gt;
&lt;div id=&quot;d2&quot; style=&quot;margin-top: 20px; border: 1px solid #000000&quot;&gt;
This is inside the d2 div
 I am appended content&lt;/div&gt;
&nbsp;
I am special!
&lt;/body&gt;
&lt;/html&gt;
&nbsp;</pre>
<p>Please be sure to <a href="http://ben.lobaugh.net/blog/wp-content/uploads/2010/02/template_engine_demo.zip">template_engine_demo</a> the template engine to see all the working examples.</p>
<p>If you use this template engine on your site please drop me a comment below.</p>
<p>Enjoy <img src='http://ben.lobaugh.net/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://ben.lobaugh.net/blog/429/php-a-new-kind-of-template-engine/feed</wfw:commentRss>
		</item>
		<item>
		<title>What is an Extranet?</title>
		<link>http://ben.lobaugh.net/blog/421/what-is-an-extranet</link>
		<comments>http://ben.lobaugh.net/blog/421/what-is-an-extranet#comments</comments>
		<pubDate>Wed, 17 Feb 2010 08:29:00 +0000</pubDate>
		<dc:creator>blobaugh</dc:creator>
		
		<category><![CDATA[Computing]]></category>

		<category><![CDATA[NNU]]></category>

		<guid isPermaLink="false">http://ben.lobaugh.net/blog/?p=421</guid>
		<description><![CDATA[
Intrigued by why my Systems Analysis and Design professor consistently uses the word 'extranet' in a form in which I am unfamiliar I have embarked on a quest for realization. It is my extreme hope that in my quest and answer will reveal itself in a form with which I may enhance and compliment my [...]]]></description>
			<content:encoded><![CDATA[<p><center><img class="aligncenter size-full wp-image-423" title="extranet" src="http://ben.lobaugh.net/blog/wp-content/uploads/2010/02/extranet.gif" alt="extranet" width="440" height="230" /></center></p>
<p>Intrigued by why my Systems Analysis and Design professor consistently uses the word 'extranet' in a form in which I am unfamiliar I have embarked on a quest for realization. It is my extreme hope that in my quest and answer will reveal itself in a form with which I may enhance and compliment my currently miniscule knowledge of all things.</p>
<p style="margin-bottom: 0in;">
<p style="margin-bottom: 0in;">Let us start with what I currently understand an extranet to be:</p>
<p style="margin-bottom: 0in;">An extranet is an extension of your internal network (also called the intranet, though I may have to defend that later as well) to the outside. This 'external' network may run over the internet (a large group of interconnected networks), or it may be a private connection.</p>
<p style="margin-bottom: 0in;">
<p style="margin-bottom: 0in;">What I currently understand the extranet to exist for:</p>
<p style="margin-bottom: 0in;">The extranet is a network designed to connect with another private user or private network, primarily used as a connection between businesses or locations. Extranets do not need to be through businesses only, individuals who own a network (such as a home network) may link their network with an associates network via an extranet. One of the most common extranet configurations is through a Virtual Private Network (VPN). It could probably be argued that internet gaming servers use extranets for their players, however I am not going to go into that, I simply want the possibility to be seen.</p>
<p style="margin-bottom: 0in;">
<p style="margin-bottom: 0in;">What I currently understand extranets to be used for:</p>
<p style="margin-bottom: 0in;">An extranet is commonly used as the connection through which another party can access a company's resources. This may be data shares (such as documents), it may be to access an outward facing web application, it may be to access programs which other organizations (such as product suppliers) can use. There are about as many uses for an extranet as there are ideas you can conceive.</p>
<p style="margin-bottom: 0in;">
<p style="margin-bottom: 0in;">How I currently understand the word 'extranet' to be misused:</p>
<p style="margin-bottom: 0in;">The word 'extranet' is misused as a label for what is available on the extranet. Saying something like “the extranet is the application suppliers use” is a mislabeling of the extranet. The proper wording should have been “the application suppliers use is available on the extranet”. This properly shows that the extranet is not the application but rather the method of accessing the application. Similarly saying “the extranet is the developer's file repository” is another mislabeling. “The developer's file repository is on the extranet” is the proper wording.</p>
<p style="margin-bottom: 0in;">
<p style="margin-bottom: 0in;">I currently understand 'extranet' is misused because:</p>
<p style="margin-bottom: 0in;">As with all other context sensitive disciplines, technology has it's own subset of words and ideas those not a part of it do not understand. Some call this a 'lingo'. Often those outside the discipline use a term incorrectly and it is easier for those within the discipline to simply understand what is meant than to explain to the user why they are using a term incorrectly. Sometimes this leads to a word or phrase becoming common language. That presents a danger to those within the discipline to whom the errant word or phrase belongs. It creates a sense of confusion and loss of dis-ambiguity that can be hard to correct later on, thus it is important that those inside a discipline understand those words or phrases that are incorrect and how to reinterpret them properly.</p>
<p style="margin-bottom: 0in; page-break-before: always;">How I went about determining what 'extranet' means:</p>
<ul>
<li>
<p style="margin-bottom: 0in;">First I hit Wikipedia. Though many 	in education believe Wikipedia to be inaccurate and full of errors, 	Wikipedia in fact has a full staff of people dedicated to ensuring 	information is correct and highlighting area that may be sketchy and 	are in need of support. Wikipedia is accurate enough now that much 	of it is released in book form, similar to that of an encyclopedia.</p>
</li>
<li>
<p style="margin-bottom: 0in;">Next I went to <a href="http://google.com/">http://google.com</a> to verify Wikipedia's information. I used the following search 	terms:</p>
<ul>
<li>
<p style="margin-bottom: 0in;">extranet</p>
</li>
<li>
<p style="margin-bottom: 0in;">what is an extranet</p>
</li>
</ul>
</li>
<li>
<p style="margin-bottom: 0in;">I compiled a listing of 	definitions which can be found below, and read several articles, 	which will also be linked below.</p>
</li>
</ul>
<p style="margin-bottom: 0in;">
<p style="margin-bottom: 0in;">
<p style="margin-bottom: 0in;">Here are some of the definitions I found on the first page:</p>
<p style="margin-bottom: 0in;">
<ul>
<li>
<p style="margin-bottom: 0in;"><span style="text-decoration: none;">A 	private computer network that uses Internet protocols and can be 	accessed by authorized individuals via the Internet.</span></p>
<ul>
<li>
<p style="margin-bottom: 0in;"><a href="http://en.wiktionary.org/wiki/extranet"><span style="text-decoration: none;">http://en.wiktionary.org/wiki/extranet</span></a></p>
</li>
</ul>
</li>
<li>
<p style="margin-bottom: 0in;"><span style="text-decoration: none;">The 	extension of a company's intranet out onto the Internet, e.g. to 	allow selected customers, suppliers and mobile workers to access the 	company's private data and applications via the World Wide Web. 	Generally an extranet implies real-time access through a firewall of 	some kind. </span></p>
<ul>
<li>
<p style="margin-bottom: 0in;"><a href="http://www.100best-web-hosting.com/glossary/terme.html"><span style="text-decoration: none;">http://www.100best-web-hosting.com/glossary/terme.html</span></a></p>
</li>
</ul>
</li>
<li>
<p style="margin-bottom: 0in;"><span style="font-family: Verdana;"><span style="font-size: x-small;"><span style="text-decoration: none;">A 	network that supplements a closed <a href="javascript:newWindow('i.html#intranet')">intranet</a> by providing access to customers, suppliers, subcontractors, and 	others outside the organization who have a need for selective 	information from the organization. It is not accessible to the 	Internet at large</span></span></span><span style="font-family: Verdana;"><span style="font-size: x-small;"><span style="text-decoration: none;">.</span></span></span></p>
<ul>
<li>
<p style="margin-bottom: 0in;"><a href="http://library.thinkquest.org/06aug/02257/glossery.html"><span style="font-family: Verdana;"><span style="font-size: x-small;"><span style="text-decoration: none;">http://library.thinkquest.org/06aug/02257/glossery.html</span></span></span></a></p>
</li>
</ul>
</li>
<li>
<p style="margin-bottom: 0in;"><span style="font-family: Verdana;"><span style="font-size: x-small;"><span style="text-decoration: none;">A 	secure extension of an Intranet that allows external users to access 	some parts of an organisation’s Intranet </span></span></span></p>
<ul>
<li>
<p style="margin-bottom: 0in;"><a href="http://www.praha.czso.cz/csu/2006edicniplan.nsf/engo/9702-06-in_2005-terminology"><span style="font-family: Verdana;"><span style="font-size: x-small;"><span style="text-decoration: none;">http://www.praha.czso.cz/csu/2006edicniplan.nsf/engo/9702-06-in_2005-terminology</span></span></span></a></p>
</li>
</ul>
</li>
<li>
<p style="margin-bottom: 0in;"><span style="font-family: Verdana;"><span style="font-size: x-small;"><span style="text-decoration: none;">Similar 	to an Intranet, an extranet is designed for authorized access by 	outside users.</span></span></span></p>
<ul>
<li>
<p style="margin-bottom: 0in;"><a href="http://www.odweb.com/resources/glossary.php#extranet"><span style="font-family: Verdana;"><span style="font-size: x-small;"><span style="text-decoration: none;">http://www.odweb.com/resources/glossary.php#extranet</span></span></span></a></p>
</li>
</ul>
</li>
<li>
<p style="margin-bottom: 0in;"><span style="font-family: Verdana;"><span style="font-size: x-small;"><span style="text-decoration: none;">Private 	networks, connected by the Internet, which allow only users who have 	a valid password or digital certificate to use the system. The 	Internet, by comparison, allows any user to access without the 	verification of the identity of the user.</span></span></span></p>
<ul>
<li>
<p style="margin-bottom: 0in;"><a href="http://www.msms.org/AM/Template.cfm?Section=Health_Information_Technology&amp;CONTENTID=9130&amp;TEMPLATE=/CM/ContentDisplay.cfm">http://www.msms.org/AM/Template.cfm?Section=Health_Information_Technology&amp;CONTENTID=9130&amp;TEMPLATE=/CM/ContentDisplay.cfm</a></p>
</li>
</ul>
</li>
<li>
<p style="margin-bottom: 0in;"><span style="font-family: Verdana;"><span style="font-size: x-small;">An 	extranet is a software application that delivers information from 	within an organisation to a defined group of users outside of that 	organisation, typically customers, suppliers or business partners. 	For example, a telephone company may deliver billing information to 	it’s customers over the web via an extranet. </span></span></p>
<ul>
<li>
<p style="margin-bottom: 0in;"><span style="font-family: Verdana;"><span style="font-size: x-small;"><a href="http://www.oranz.co.uk/glossary_text.htm">http://www.oranz.co.uk/glossary_text.htm</a></span></span></p>
</li>
<li>
<p style="margin-bottom: 0in;"><span style="font-family: Verdana;"><span style="font-size: x-small;"><span style="color: #ff0000;">Ben 		Note</span>: This definition seems to both misuse and use correctly 		from my current understanding. Take note that it first says it is 		an application (misuse) and then says via, which implies the 		extranet is the delivery medium.</span></span></p>
</li>
</ul>
</li>
<li>
<p style="margin-bottom: 0in;"><span style="font-family: Verdana;"><span style="font-size: x-small;">An 	<em>intranet</em> that is accessible to computers that are not 	physically part of a company’s own private <em>network</em>, but 	that is not accessible to the general public. For example, an 	extranet allows vendors and business partners to access private 	areas of a company web site. Users from outside the company’s 	network usually access the extranet using VPN.</span></span></p>
<ul>
<li>
<p style="margin-bottom: 0in;"><span style="font-family: Verdana;"><span style="font-size: x-small;"><a href="http://www.novacon.net/faq.htm">http://www.novacon.net/faq.htm</a></span></span></p>
</li>
</ul>
</li>
<li>
<p style="margin-bottom: 0in;"><span style="font-family: Verdana;"><span style="font-size: x-small;">A 	private computer network that uses Internet technology to link an 	organisation with its suppliers, customers and other collaborators.</span></span></p>
<ul>
<li>
<p style="margin-bottom: 0in;"><span style="font-family: Verdana;"><span style="font-size: x-small;"><a href="http://publications.europa.eu/vademecum/vademecum/9313fdfe-c49e-119e-45c6a6441e63e066_en.html">http://publications.europa.eu/vademecum/vademecum/9313fdfe-c49e-119e-45c6a6441e63e066_en.html</a></span></span></p>
</li>
</ul>
</li>
<li>
<p style="margin-bottom: 0in;"><span style="font-family: Verdana;"><span style="font-size: x-small;">An 	extranet is a private network that uses Internet technology and the 	public telecommunication system to securely share part of a 	business's information or operations with suppliers, vendors, 	partners, customers, or other businesses. An extranet can be viewed 	as part of a company's <a href="http://searchwindevelopment.techtarget.com/sDefinition/0,,sid8_gci212377,00.html">intranet</a> that is extended to users outside the company. It has also been 	described as a "state of mind" in which the Internet is 	perceived as a way to do business with other companies as well as to 	sell products to customers.</span></span></p>
<ul>
<li>
<p style="margin-bottom: 0in;"><span style="font-family: Verdana;"><span style="font-size: x-small;"><a href="http://searchenterprisewan.techtarget.com/sDefinition/0,,sid200_gci212089,00.html">http://searchenterprisewan.techtarget.com/sDefinition/0,,sid200_gci212089,00.html</a></span></span></p>
</li>
</ul>
</li>
<li>
<p style="margin-bottom: 0in;"><span style="font-family: Verdana;"><span style="font-size: x-small;">An 	"intranet" is the generic term for a collection of private 	computer networks within an organization. An "extranet" is 	a computer network that allows controlled access from the outside 	for specific business or educational purposes. Intranets and 	extranets are communication tools designed to enable easy 	information sharing within workgroups.</span></span></p>
<ul>
<li>
<p style="margin-bottom: 0in;"><span style="font-family: Verdana;"><span style="font-size: x-small;"><a href="http://compnetworking.about.com/od/filetransferprotocol/Intranets_and_Extranets.htm">http://compnetworking.about.com/od/filetransferprotocol/Intranets_and_Extranets.htm</a></span></span></p>
</li>
</ul>
</li>
<li>
<p style="margin-bottom: 0in;"><span style="font-family: Verdana;"><span style="font-size: x-small;">An 	extranet is a private virtual space to securely collaborate, share 	information or integrate operations with travelling teams, 	suppliers, vendors, partners, or customers. A few examples are a 	sales extranet containing order forms and client directories for the 	sales team, a partner extranet enabling management of joint tasks, 	or a <a href="http://www.hyperoffice.com/customer-portal/">customer 	extranet portal</a> where you collaborate on specifications 	documents with clients. </span></span></p>
<ul>
<li>
<p style="margin-bottom: 0in;"><span style="font-family: Verdana;"><span style="font-size: x-small;"><a href="http://www.hyperoffice.com/what-is-extranet/">http://www.hyperoffice.com/what-is-extranet/</a></span></span></p>
</li>
</ul>
</li>
<li>
<p style="margin-bottom: 0in;"><span style="font-family: Verdana;"><span style="font-size: x-small;">Answers.com 	shares several definitions:</span></span></p>
<ul>
<li>
<p style="margin-bottom: 0in;"><span style="font-family: Verdana;"><span style="font-size: x-small;">An 		extension of an institution's intranet, especially over the World 		Wide Web, enabling communication between the institution and people 		it deals with, often by providing limited access to its intranet.</span></span></p>
</li>
<li>
<p style="margin-bottom: 0in;"><span style="font-family: Verdana;"><span style="font-size: x-small;">A 		Web site for customers rather than the general public. It can 		provide access to research, current inventories and internal 		databases, virtually any information that is private and not 		published for everyone. An extranet uses the public Internet as its 		transmission system, but requires passwords to gain entrance. 		Access to the site may be free or require payment for some or all 		of the services offered. </span></span></p>
</li>
<li>
<p style="margin-bottom: 0in;"><span style="font-family: Verdana;"><span style="font-size: x-small;">Private 		network that uses the Internet protocols and the public 		telecommunication system to securely share part of a business's 		information or operations with suppliers, vendors, partners, 		customers, or other businesses. An extranet can be viewed as part 		of a company's <a onclick="assignParam('navinfo','method|4'+getLinkTextForCookie(this));" href="http://www.answers.com/topic/intranet" target="_top">Intranet</a> that is extended to users outside the company.</span></span></p>
</li>
<li>
<p style="margin-bottom: 0in;"><span style="font-family: Verdana;"><span style="font-size: x-small;"><a href="http://www.answers.com/topic/extranet">http://www.answers.com/topic/extranet</a></span></span></p>
</li>
</ul>
</li>
</ul>
<p style="margin-bottom: 0in;">
<p style="margin-bottom: 0in;"><span style="font-family: Verdana;"><span style="font-size: x-small;">Articles I read:</span></span></p>
<ul>
<li>
<p style="margin-bottom: 0in;"><a href="http://en.wikipedia.org/wiki/Extranet"><span style="font-family: Verdana;"><span style="font-size: x-small;">http://en.wikipedia.org/wiki/Extranet</span></span></a></p>
</li>
<li>
<p style="margin-bottom: 0in;"><a href="http://searchenterprisewan.techtarget.com/sDefinition/0,,sid200_gci212089,00.html"><span style="font-family: Verdana;"><span style="font-size: x-small;">http://searchenterprisewan.techtarget.com/sDefinition/0,,sid200_gci212089,00.html</span></span></a></p>
</li>
<li>
<p style="margin-bottom: 0in;"><a href="http://www.wisegeek.com/what-is-an-extranet.htm"><span style="font-family: Verdana;"><span style="font-size: x-small;">http://www.wisegeek.com/what-is-an-extranet.htm</span></span></a></p>
</li>
<li>
<p style="margin-bottom: 0in;"><a href="http://technology.inc.com/networking/articles/200610/extranet.html"><span style="font-family: Verdana;"><span style="font-size: x-small;">http://technology.inc.com/networking/articles/200610/extranet.html</span></span></a></p>
</li>
<li>
<p style="margin-bottom: 0in;"><a href="http://www.hyperoffice.com/what-is-extranet/"><span style="font-family: Verdana;"><span style="font-size: x-small;">http://www.hyperoffice.com/what-is-extranet/</span></span></a></p>
</li>
<li>
<p style="margin-bottom: 0in;"><a href="http://www.businesslink.gov.uk/bdotg/action/detail?type=RESOURCES&amp;itemId=1075386483"><span style="font-family: Verdana;"><span style="font-size: x-small;">http://www.businesslink.gov.uk/bdotg/action/detail?type=RESOURCES&amp;itemId=1075386483</span></span></a></p>
</li>
<li>
<p style="margin-bottom: 0in;"><a href="http://www.life123.com/technology/internet/extranet/what-is-extranet.shtml"><span style="font-family: Verdana;"><span style="font-size: x-small;">http://www.life123.com/technology/internet/extranet/what-is-extranet.shtml</span></span></a></p>
</li>
<li>
<p style="margin-bottom: 0in;"><span style="font-family: Verdana;"><span style="font-size: x-small;">Page 	24 of the Systems Analysis and Design book</span></span></p>
</li>
</ul>
<p style="margin-bottom: 0in;">
<p style="margin-bottom: 0in;">
<p style="margin-bottom: 0in; page-break-before: always;"><span style="font-family: Verdana;"><span style="font-size: x-small;">My Conclusion:</span></span></p>
<p style="margin-bottom: 0in;"><span style="font-family: Verdana;"><span style="font-size: x-small;">The large majority of the articles speak of an extranet as being a network that is connected into and resources are utilized over. There was an article that speaks of an extranet as being a website, however it seems to me that based off the weight of the articles speaking of an extranet as a network that the author of the article using the website as an example of an extranet must be misusing the word. What the author is most probably doing is using the extranet as an alias for what is running on the extranet. If the website is the only thing running on the extranet it might possibly be acceptable to alias the extranet to the website, however the questions most likely asked of a network administrator are “What does your extranet do?”, and “What runs on your extranet?”. The answer to the first may look like “It is a website that does...”, however more than likely the response would sound like “It runs our outward facing website”, which implies that the extranet carries something and is not the application itself. Any answer to the second question assumes the extranet is the medium for transport, not an application. </span></span></p>
<p style="margin-bottom: 0in;">
<p style="margin-bottom: 0in;"><span style="font-family: Verdana;"><span style="font-size: x-small;">What I now understand an extranet to be:</span></span></p>
<p style="margin-bottom: 0in;"><span style="font-family: Verdana;"><span style="font-size: x-small;">An extranet is an extension of an internal network. Extranets seem to primarily be run over the internet, though private connections may be used. Sometimes an outward facing web application is called an extranet, though it seems that it is simply delivered over an extranet as it's only service. It seems to me that saying a web application that suppliers use is called an extranet may be acceptable here, but only if the person understands that the 'extranet' used is not referring the actual network, but to an application running on the network. It must be translated in the person's head to be proper.</span></span></p>
<p style="margin-bottom: 0in;">
<p style="margin-bottom: 0in;"><span style="font-family: Verdana;"><span style="font-size: x-small;">What I now understand extranets to exist for and be used for:</span></span></p>
<p style="margin-bottom: 0in;"><span style="font-family: Verdana;"><span style="font-size: x-small;">Extranets are used by external networks and users to connect them into a private network, usually at a business. Using an extranet allows the outsider to utilize network resources, such as network data shares (documents) and applications, that are not normally available to the general public.</span></span></p>
<p style="margin-bottom: 0in;">
<p style="margin-bottom: 0in;"><span style="font-family: Verdana;"><span style="font-size: x-small;">Final comments:</span></span></p>
<p style="margin-bottom: 0in;"><span style="font-family: Verdana;"><span style="font-size: x-small;">I believe that an extranet is an extension of an intranet that can be used by outsiders to gain access to network resources, just as my original understanding stated. I also think that extranet is a term that can and is misused, both in the professional and academic worlds. There are many words currently in the english dictionary that have more than one unique meaning. It could be possible that what I am seeing is a shift towards creating an additional definition for extranet, however the evidence currently overwhelmingly is in favor of my original definition. As this is the case, great care should be taken when using extranet to refer to anything other than the network itself. If extranet is used to denote the application running over the extranet it should be known by all parties involved that the extranet term in this instance is being used not in the standard definition way, and the listeners should assume the application is in fact simply a service provided by the extranet, and not the extranet itself.</span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://ben.lobaugh.net/blog/421/what-is-an-extranet/feed</wfw:commentRss>
		</item>
		<item>
		<title>Bus for me?</title>
		<link>http://ben.lobaugh.net/blog/418/bus-for-me</link>
		<comments>http://ben.lobaugh.net/blog/418/bus-for-me#comments</comments>
		<pubDate>Sat, 13 Feb 2010 04:39:00 +0000</pubDate>
		<dc:creator>blobaugh</dc:creator>
		
		<category><![CDATA[Randomness]]></category>

		<category><![CDATA[VW Bus]]></category>

		<guid isPermaLink="false">http://ben.lobaugh.net/blog/?p=418</guid>
		<description><![CDATA[My buddy Kevin sent me this picture. I thought it was great. I need to get one of these for my house!

]]></description>
			<content:encoded><![CDATA[<p>My buddy Kevin sent me this picture. I thought it was great. I need to get one of these for my house!</p>
<p><img class="alignnone size-full wp-image-419" title="bus_drop_off" src="http://ben.lobaugh.net/blog/wp-content/uploads/2010/02/bus_drop_off.jpg" alt="bus_drop_off" width="600" height="800" /></p>
]]></content:encoded>
			<wfw:commentRss>http://ben.lobaugh.net/blog/418/bus-for-me/feed</wfw:commentRss>
		</item>
		<item>
		<title>How NOT to jack up a VW Bus</title>
		<link>http://ben.lobaugh.net/blog/415/how-not-to-jack-up-a-vw-bus</link>
		<comments>http://ben.lobaugh.net/blog/415/how-not-to-jack-up-a-vw-bus#comments</comments>
		<pubDate>Tue, 09 Feb 2010 02:28:04 +0000</pubDate>
		<dc:creator>blobaugh</dc:creator>
		
		<category><![CDATA[VW Bus]]></category>

		<guid isPermaLink="false">http://ben.lobaugh.net/blog/?p=415</guid>
		<description><![CDATA[I ran across this pictures on The Samba and decided it was worthy of reposting. Never never never never jack your bus up like this. I bet I could go kick one of those supports and have the whole bus come crashing down. You should always use the proper jacks, jack stands, or hoists. If [...]]]></description>
			<content:encoded><![CDATA[<p>I ran across this pictures on <a title="The Samba" href="http://thesamba.com" target="_blank">The Samba</a> and decided it was worthy of reposting. Never never never never jack your bus up like this. I bet I could go kick one of those supports and have the whole bus come crashing down. You should always use the proper jacks, jack stands, or hoists. If you absolutely cannot get access to them then please use something that is not quite so thin. Get a wider base.</p>
<p><img class="alignnone size-full wp-image-416" title="638247" src="http://ben.lobaugh.net/blog/wp-content/uploads/2010/02/638247.jpg" alt="638247" width="800" height="600" /></p>
]]></content:encoded>
			<wfw:commentRss>http://ben.lobaugh.net/blog/415/how-not-to-jack-up-a-vw-bus/feed</wfw:commentRss>
		</item>
		<item>
		<title>New Website Launch: Integrity Excavation and Rock Products</title>
		<link>http://ben.lobaugh.net/blog/412/new-website-launch-integrity-excavation-and-rock-products</link>
		<comments>http://ben.lobaugh.net/blog/412/new-website-launch-integrity-excavation-and-rock-products#comments</comments>
		<pubDate>Sat, 06 Feb 2010 23:53:13 +0000</pubDate>
		<dc:creator>blobaugh</dc:creator>
		
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://ben.lobaugh.net/blog/?p=412</guid>
		<description><![CDATA[A friend of mine recently took a course on HTML web design and after completing her class she developed a website for Integrity Excavation and Rock Products. As a first site she did a great job. Go check it out.
Integrity Excavation and Rock Products
]]></description>
			<content:encoded><![CDATA[<p>A friend of mine recently took a course on HTML web design and after completing her class she developed a website for Integrity Excavation and Rock Products. As a first site she did a great job. Go check it out.</p>
<p><a title="Integrity Excavation and Rock Products" href="http://integrityexcavation.com/" target="_self">Integrity Excavation and Rock Products</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ben.lobaugh.net/blog/412/new-website-launch-integrity-excavation-and-rock-products/feed</wfw:commentRss>
		</item>
		<item>
		<title>C++: Virtual Token Ring Network</title>
		<link>http://ben.lobaugh.net/blog/408/c-virtual-token-ring-network</link>
		<comments>http://ben.lobaugh.net/blog/408/c-virtual-token-ring-network#comments</comments>
		<pubDate>Wed, 03 Feb 2010 06:06:50 +0000</pubDate>
		<dc:creator>blobaugh</dc:creator>
		
		<category><![CDATA[NNU]]></category>

		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://ben.lobaugh.net/blog/?p=408</guid>
		<description><![CDATA[My networking professor handed out a group project to build a virtual token ring network and I thought I would share my findings here. Before you say anything, I know it is not a true token ring network, but it sorta acts like one which was more the goal of the project.
My group partner and [...]]]></description>
			<content:encoded><![CDATA[<p>My networking professor handed out a group project to build a virtual token ring network and I thought I would share my findings here. Before you say anything, I know it is not a true token ring network, but it sorta acts like one which was more the goal of the project.</p>
<p>My group partner and I went through several different models, which included; building a virtual DHCP server and virtual cables, telling the program at run time who it's neighbor was, sending out a broadcast and having the virtual nodes organize themselves into a network, and a few others. We finally settled on pulling out a switch and creating a network of static IPs that we controlled. The program attempts to send to the next IP number from itself and if it cannot find it the token is sent to the first node. An unintended side effect is that we have the ability to add and remove machines at the highest IP number without breaking the ring. The requirement was only that it worked with three machines.</p>
<p>This code is not the cleanest, nor is it in any way awesome, and there are probably a ton of things I can take out of it to make it better, but it runs beautifully on the Dell Mini 10s running Ubuntu that I tested it on with a 5 port Netgear switch. Just make sure your network is in the range 192.168.0.1 and the machines go in sequential order (e.g. 192.168.0.1, 192.168.0.2, 192.168.0.3)</p>
<pre class="c">&nbsp;
<span style="color: #808080; font-style: italic;">/*
 * Virtual Token Ring Network
 *
 * Networking II
 * Spring 2009-2010
 * Prof: Xueyi Wang
 * Group: Ben Lobaugh, Jake Bodenstab
 *
 * Project Description: Sorta creates a virtual token
 *      ring network simulation
 */</span>
&nbsp;
<span style="color: #339933;">#include &lt;stdio.h&gt;</span>
<span style="color: #339933;">#include &lt;stdlib.h&gt;</span>
<span style="color: #339933;">#include &lt;sys/types.h&gt;</span>
<span style="color: #339933;">#include &lt;sys/socket.h&gt;</span>
<span style="color: #339933;">#include &lt;netinet/in.h&gt;</span>
<span style="color: #339933;">#include &lt;netdb.h&gt;</span>
<span style="color: #339933;">#include &lt;string&gt;</span>
<span style="color: #339933;">#include &lt;string.h&gt;</span>
<span style="color: #339933;">#include &lt;strings.h&gt;</span>
<span style="color: #339933;">#include &lt;sstream&gt;</span>
<span style="color: #339933;">#include &lt;iostream&gt;</span>
&nbsp;
using namespace std;
&nbsp;
<span style="color: #808080; font-style: italic;">// Global Constants and Variables</span>
<span style="color: #993333;">int</span> PORT = <span style="color: #cc66cc;">55555</span>, node, s_sockfd , s_clilen, s_n;
<span style="color: #993333;">struct</span> message<span style="color: #66cc66;">&#123;</span>
        <span style="color: #993333;">int</span> sender;
        <span style="color: #993333;">int</span> receiver;
        <span style="color: #993333;">string</span> message;
<span style="color: #66cc66;">&#125;</span>;
<span style="color: #993333;">struct</span> token<span style="color: #66cc66;">&#123;</span>
        <span style="color: #993333;">int</span> type; <span style="color: #808080; font-style: italic;">// 1 = empty token, 2 = token with data</span>
        <span style="color: #993333;">int</span> valid;
        message msg;
        <span style="color: #993333;">int</span> checksum;
        <span style="color: #993333;">int</span> turn;
<span style="color: #66cc66;">&#125;</span>;
<span style="color: #993333;">struct</span> sockaddr_in s_serv_addr, s_cli_addr;
&nbsp;
<span style="color: #808080; font-style: italic;">// Function Definitions</span>
<span style="color: #993333;">void</span> getToken<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">char</span>* token<span style="color: #66cc66;">&#41;</span>;
<span style="color: #993333;">void</span> sendToken<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">char</span>* token<span style="color: #66cc66;">&#41;</span>;
bool messageExists<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #993333;">void</span> createServerSocket<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #993333;">void</span> error<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">string</span> msg<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #993333;">int</span> main<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">int</span> argc, <span style="color: #993333;">char</span>** argv<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        <span style="color: #993333;">char</span>* token;
		<span style="color: #993333;">string</span> start_token;
&nbsp;
		node = atoi<span style="color: #66cc66;">&#40;</span>argv<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
		<a href="http://www.opengroup.org/onlinepubs/009695399/functions/cout.html"><span style="color: #000066;">cout</span></a> &lt;&lt; <span style="color: #ff0000;">&quot;Node: &quot;</span> &lt;&lt; node &lt;&lt; endl &lt;&lt; endl;
&nbsp;
		createServerSocket<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
		<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>node == <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
			<a href="http://www.opengroup.org/onlinepubs/009695399/functions/cout.html"><span style="color: #000066;">cout</span></a> &lt;&lt; <span style="color: #ff0000;">&quot;Start token? (y/n): &quot;</span>;
			cin &gt;&gt; start_token;
&nbsp;
			<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>start_token.<span style="color: #202020;">compare</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;y&quot;</span><span style="color: #66cc66;">&#41;</span> == <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
				<a href="http://www.opengroup.org/onlinepubs/009695399/functions/cout.html"><span style="color: #000066;">cout</span></a> &lt;&lt; <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Initializing Token<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>;
				sendToken<span style="color: #66cc66;">&#40;</span>token<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<a href="http://www.opengroup.org/onlinepubs/009695399/functions/cout.html"><span style="color: #000066;">cout</span></a> &lt;&lt; <span style="color: #ff0000;">&quot;**** Ctrl-C Terminates **** <span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>;
&nbsp;
		<span style="color: #b1b100;">while</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
			getToken<span style="color: #66cc66;">&#40;</span>token<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>token<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span> == <span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
				<span style="color: #808080; font-style: italic;">// Token Contains a message</span>
				<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>token<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span> == node<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
					<span style="color: #808080; font-style: italic;">// Message is from us. Erase it and change token type to 1</span>
					token<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #cc66cc;">-1</span>;
					token <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #cc66cc;">-1</span>;
					token<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">4</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #cc66cc;">-1</span>;
					token<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #cc66cc;">1</span>;
				<span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>token<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#93;</span> == node<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
					<span style="color: #808080; font-style: italic;">// Message in token is for us. Display it</span>
					<a href="http://www.opengroup.org/onlinepubs/009695399/functions/cout.html"><span style="color: #000066;">cout</span></a> &lt;&lt; <span style="color: #ff0000;">&quot;--------------<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>;
					<a href="http://www.opengroup.org/onlinepubs/009695399/functions/cout.html"><span style="color: #000066;">cout</span></a> &lt;&lt; <span style="color: #ff0000;">&quot;From: &quot;</span> &lt;&lt; token<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span> &lt;&lt; endl;
					<span style="color: #808080; font-style: italic;">//cout &lt;&lt; token.msg.message &lt;&lt; endl;</span>
				<span style="color: #66cc66;">&#125;</span>
			<span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>token<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span> == <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
				<span style="color: #808080; font-style: italic;">// Token does not contain a message</span>
				<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>messageExists<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
					<span style="color: #808080; font-style: italic;">// There is a message to send. Load message into token and change type</span>
&nbsp;
					 <span style="color: #808080; font-style: italic;">// Open file ./message.tok</span>
					 <span style="color: #808080; font-style: italic;">// Read first line as the receiver</span>
					 <span style="color: #808080; font-style: italic;">// Rest of file is message </span>
&nbsp;
					token<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>  = <span style="color: #cc66cc;">2</span>;
				<span style="color: #66cc66;">&#125;</span>
			<span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span>
				<span style="color: #808080; font-style: italic;">// This token is a type we do not know about</span>
				<span style="color: #808080; font-style: italic;">// Don't worry about this token, just forward it</span>
			<span style="color: #66cc66;">&#125;</span>
			sleep<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #808080; font-style: italic;">// Send token along it's merry way</span>
			sendToken<span style="color: #66cc66;">&#40;</span>token<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
       <span style="color: #b1b100;">return</span> <span style="color: #66cc66;">&#40;</span>EXIT_SUCCESS<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #993333;">void</span> getToken<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">char</span>* token<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #993333;">int</span> newsockfd;
	<span style="color: #808080; font-style: italic;">/*
	 * Create a server socket on PORT
	 * Listen on socket until message is received
	 * If message is of type token load it into token
	 * Close socket
	 * Return filled token
	 */</span>
     listen<span style="color: #66cc66;">&#40;</span>s_sockfd,<span style="color: #cc66cc;">5</span><span style="color: #66cc66;">&#41;</span>;
     s_clilen = <span style="color: #993333;">sizeof</span><span style="color: #66cc66;">&#40;</span>s_cli_addr<span style="color: #66cc66;">&#41;</span>;
     newsockfd = accept<span style="color: #66cc66;">&#40;</span>s_sockfd,
                 <span style="color: #66cc66;">&#40;</span><span style="color: #993333;">struct</span> sockaddr *<span style="color: #66cc66;">&#41;</span> &amp;s_cli_addr,
                 <span style="color: #66cc66;">&#40;</span>socklen_t*<span style="color: #66cc66;">&#41;</span> &amp;s_clilen<span style="color: #66cc66;">&#41;</span>;
     <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>newsockfd &lt; <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>
          error<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;ERROR on accept&quot;</span><span style="color: #66cc66;">&#41;</span>;
     bzero<span style="color: #66cc66;">&#40;</span>token,<span style="color: #cc66cc;">256</span><span style="color: #66cc66;">&#41;</span>;
     s_n = read<span style="color: #66cc66;">&#40;</span>newsockfd,token,<span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span>;
     <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>s_n &lt; <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> error<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;ERROR reading from socket&quot;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
	<a href="http://www.opengroup.org/onlinepubs/009695399/functions/cout.html"><span style="color: #000066;">cout</span></a> &lt;&lt; <span style="color: #ff0000;">&quot;I've got the token<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #993333;">void</span> createServerSocket<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
&nbsp;
	s_sockfd = socket<span style="color: #66cc66;">&#40;</span>AF_INET, SOCK_STREAM, <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>;
     <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>s_sockfd &lt; <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>
        error<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;ERROR opening socket&quot;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
	<span style="color: #993333;">int</span> on = <span style="color: #cc66cc;">1</span>;
	  <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> setsockopt <span style="color: #66cc66;">&#40;</span> s_sockfd, SOL_SOCKET, SO_REUSEADDR, <span style="color: #66cc66;">&#40;</span> <span style="color: #993333;">const</span> <span style="color: #993333;">char</span>* <span style="color: #66cc66;">&#41;</span> &amp;on, <span style="color: #993333;">sizeof</span> <span style="color: #66cc66;">&#40;</span> on <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> == <span style="color: #cc66cc;">-1</span> <span style="color: #66cc66;">&#41;</span>
	    error<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;ERROR setting socket options&quot;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
     bzero<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333;">char</span> *<span style="color: #66cc66;">&#41;</span> &amp;s_serv_addr, <span style="color: #993333;">sizeof</span><span style="color: #66cc66;">&#40;</span>s_serv_addr<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
     s_serv_addr.<span style="color: #202020;">sin_family</span> = AF_INET;
     s_serv_addr.<span style="color: #202020;">sin_addr</span>.<span style="color: #202020;">s_addr</span> = INADDR_ANY;
     s_serv_addr.<span style="color: #202020;">sin_port</span> = htons<span style="color: #66cc66;">&#40;</span>PORT<span style="color: #66cc66;">&#41;</span>;
&nbsp;
     <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>bind<span style="color: #66cc66;">&#40;</span>s_sockfd, <span style="color: #66cc66;">&#40;</span><span style="color: #993333;">struct</span> sockaddr *<span style="color: #66cc66;">&#41;</span> &amp;s_serv_addr, <span style="color: #993333;">sizeof</span><span style="color: #66cc66;">&#40;</span>s_serv_addr<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> &lt; <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>
              error<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;ERROR on binding&quot;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #993333;">void</span> sendToken<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">char</span>* token<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #993333;">int</span> to;
	<span style="color: #993333;">string</span> ip = <span style="color: #ff0000;">&quot;192.168.0.&quot;</span>;
&nbsp;
	<span style="color: #808080; font-style: italic;">// Start Socket Vars</span>
	<span style="color: #993333;">int</span> sockfd, n;
    <span style="color: #993333;">struct</span> sockaddr_in serv_addr;
    <span style="color: #993333;">struct</span> hostent *server;
	<span style="color: #808080; font-style: italic;">// End Socket Vars</span>
&nbsp;
	<span style="color: #808080; font-style: italic;">// Find the next node to send to</span>
	to = node + <span style="color: #cc66cc;">1</span>;
	std::<span style="color: #202020;">ostringstream</span> sin;
	sin &lt;&lt; to;
	std::<span style="color: #993333;">string</span> val = sin.<span style="color: #202020;">str</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	ip.<span style="color: #202020;">append</span><span style="color: #66cc66;">&#40;</span>val<span style="color: #66cc66;">&#41;</span>;
&nbsp;
	<span style="color: #808080; font-style: italic;">/*
	 * Create socket connection to next node
	 * Send token
	 * Close socket
	 */</span>
    sockfd = socket<span style="color: #66cc66;">&#40;</span>AF_INET, SOCK_STREAM, <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>sockfd &lt; <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>
        error<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;ERROR opening socket&quot;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
	try <span style="color: #66cc66;">&#123;</span>
	    server = gethostbyname<span style="color: #66cc66;">&#40;</span>ip.<span style="color: #202020;">c_str</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
	    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>server == <span style="color: #000000; font-weight: bold;">NULL</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
	        error<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;ERROR, no such host<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #66cc66;">&#41;</span>;
	    <span style="color: #66cc66;">&#125;</span>
&nbsp;
	    bzero<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333;">char</span> *<span style="color: #66cc66;">&#41;</span> &amp;serv_addr, <span style="color: #993333;">sizeof</span><span style="color: #66cc66;">&#40;</span>serv_addr<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
	    serv_addr.<span style="color: #202020;">sin_family</span> = AF_INET;
	    bcopy<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333;">char</span> *<span style="color: #66cc66;">&#41;</span>server-&gt;h_addr,
	         <span style="color: #66cc66;">&#40;</span><span style="color: #993333;">char</span> *<span style="color: #66cc66;">&#41;</span>&amp;serv_addr.<span style="color: #202020;">sin_addr</span>.<span style="color: #202020;">s_addr</span>,
	         server-&gt;h_length<span style="color: #66cc66;">&#41;</span>;
	    serv_addr.<span style="color: #202020;">sin_port</span> = htons<span style="color: #66cc66;">&#40;</span>PORT<span style="color: #66cc66;">&#41;</span>;
&nbsp;
	    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>connect<span style="color: #66cc66;">&#40;</span>sockfd, <span style="color: #66cc66;">&#40;</span><span style="color: #993333;">struct</span> sockaddr*<span style="color: #66cc66;">&#41;</span> &amp;serv_addr,<span style="color: #993333;">sizeof</span><span style="color: #66cc66;">&#40;</span>serv_addr<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> &lt; <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>
			throw <span style="color: #cc66cc;">1</span>;<span style="color: #808080; font-style: italic;">//(&quot;ERROR connecting&quot;);</span>
&nbsp;
		<a href="http://www.opengroup.org/onlinepubs/009695399/functions/cout.html"><span style="color: #000066;">cout</span></a> &lt;&lt; <span style="color: #ff0000;">&quot;Token Sent To: 192.168.0.&quot;</span> &lt;&lt; to &lt;&lt; endl &lt;&lt; endl;
	<span style="color: #66cc66;">&#125;</span> catch <span style="color: #66cc66;">&#40;</span><span style="color: #993333;">int</span> i<span style="color: #66cc66;">&#41;</span>  <span style="color: #66cc66;">&#123;</span>
		<a href="http://www.opengroup.org/onlinepubs/009695399/functions/cout.html"><span style="color: #000066;">cout</span></a> &lt;&lt; <span style="color: #ff0000;">&quot;Could not contact &quot;</span> &lt;&lt; ip &lt;&lt; <span style="color: #ff0000;">&quot; sending to 192.168.0.1<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>;
		server = gethostbyname<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;192.168.0.1&quot;</span><span style="color: #66cc66;">&#41;</span>;
	    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>server == <span style="color: #000000; font-weight: bold;">NULL</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
	        error<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;ERROR, no such host<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #66cc66;">&#41;</span>;
	    <span style="color: #66cc66;">&#125;</span>
&nbsp;
	    bzero<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333;">char</span> *<span style="color: #66cc66;">&#41;</span> &amp;serv_addr, <span style="color: #993333;">sizeof</span><span style="color: #66cc66;">&#40;</span>serv_addr<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
	    serv_addr.<span style="color: #202020;">sin_family</span> = AF_INET;
	    bcopy<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333;">char</span> *<span style="color: #66cc66;">&#41;</span>server-&gt;h_addr,
	         <span style="color: #66cc66;">&#40;</span><span style="color: #993333;">char</span> *<span style="color: #66cc66;">&#41;</span>&amp;serv_addr.<span style="color: #202020;">sin_addr</span>.<span style="color: #202020;">s_addr</span>,
	         server-&gt;h_length<span style="color: #66cc66;">&#41;</span>;
	    serv_addr.<span style="color: #202020;">sin_port</span> = htons<span style="color: #66cc66;">&#40;</span>PORT<span style="color: #66cc66;">&#41;</span>;
&nbsp;
	    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>connect<span style="color: #66cc66;">&#40;</span>sockfd, <span style="color: #66cc66;">&#40;</span><span style="color: #993333;">struct</span> sockaddr*<span style="color: #66cc66;">&#41;</span> &amp;serv_addr,<span style="color: #993333;">sizeof</span><span style="color: #66cc66;">&#40;</span>serv_addr<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> &lt; <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>
	        error<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;ERROR connecting&quot;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	bzero<span style="color: #66cc66;">&#40;</span>token,<span style="color: #cc66cc;">256</span><span style="color: #66cc66;">&#41;</span>;
    n = write<span style="color: #66cc66;">&#40;</span>sockfd,token,strlen<span style="color: #66cc66;">&#40;</span>token<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>n &lt; <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>
         error<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;ERROR writing to socket&quot;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
	close<span style="color: #66cc66;">&#40;</span>sockfd<span style="color: #66cc66;">&#41;</span>;
	unlink<span style="color: #66cc66;">&#40;</span>ip.<span style="color: #202020;">c_str</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
bool messageExists<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
	bool ret = <span style="color: #000000; font-weight: bold;">false</span>;
	<span style="color: #b1b100;">return</span> ret;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #993333;">void</span> error<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">string</span> msg<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    perror<span style="color: #66cc66;">&#40;</span>msg.<span style="color: #202020;">c_str</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
    exit<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
]]></content:encoded>
			<wfw:commentRss>http://ben.lobaugh.net/blog/408/c-virtual-token-ring-network/feed</wfw:commentRss>
		</item>
		<item>
		<title>NFC: 2010 Sr. High Youth Retreat</title>
		<link>http://ben.lobaugh.net/blog/403/nfc-2010-sr-high-youth-retreat</link>
		<comments>http://ben.lobaugh.net/blog/403/nfc-2010-sr-high-youth-retreat#comments</comments>
		<pubDate>Wed, 20 Jan 2010 20:18:57 +0000</pubDate>
		<dc:creator>blobaugh</dc:creator>
		
		<category><![CDATA[Churchy]]></category>

		<guid isPermaLink="false">http://ben.lobaugh.net/blog/?p=403</guid>
		<description><![CDATA[Nampa First had a great weekend youth retreat with the Senior Highers. Here are some pics for your enjoyment. Videos will come when I am not lazy.
(click to view the album)

]]></description>
			<content:encoded><![CDATA[<p>Nampa First had a great weekend youth retreat with the Senior Highers. Here are some pics for your enjoyment. Videos will come when I am not lazy.</p>
<p>(click to view the album)</p>
<p><a href="http://ben.lobaugh.net/gallery/main.php?g2_itemId=21831" target="_BLANK"><img class="alignnone size-large wp-image-404" title="img_3825" src="http://ben.lobaugh.net/blog/wp-content/uploads/2010/01/img_3825-1024x768.jpg" alt="img_3825" width="600" height="450" border="0" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://ben.lobaugh.net/blog/403/nfc-2010-sr-high-youth-retreat/feed</wfw:commentRss>
		</item>
		<item>
		<title>Portfolio Update</title>
		<link>http://ben.lobaugh.net/blog/395/portfolio-update</link>
		<comments>http://ben.lobaugh.net/blog/395/portfolio-update#comments</comments>
		<pubDate>Wed, 13 Jan 2010 17:16:07 +0000</pubDate>
		<dc:creator>blobaugh</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ben.lobaugh.net/blog/?p=395</guid>
		<description><![CDATA[It has been a long time since I have put an update on my portfolio on here. I have not been as active trading because I lost my job and have not had any money to put into my account. I am happy to say my portfolio is still going strong and growing.

]]></description>
			<content:encoded><![CDATA[<p>It has been a long time since I have put an update on my portfolio on here. I have not been as active trading because I lost my job and have not had any money to put into my account. I am happy to say my portfolio is still going strong and growing.</p>
<p><img class="alignnone size-full wp-image-396" title="Retirement Portfolio" src="http://ben.lobaugh.net/blog/wp-content/uploads/2010/01/2010113417304604523918032478687412114916.png" alt="Retirement Portfolio" width="200" height="136" /></p>
]]></content:encoded>
			<wfw:commentRss>http://ben.lobaugh.net/blog/395/portfolio-update/feed</wfw:commentRss>
		</item>
		<item>
		<title>Crazy Maui Drummer</title>
		<link>http://ben.lobaugh.net/blog/393/crazy-maui-drummer</link>
		<comments>http://ben.lobaugh.net/blog/393/crazy-maui-drummer#comments</comments>
		<pubDate>Tue, 12 Jan 2010 21:09:14 +0000</pubDate>
		<dc:creator>blobaugh</dc:creator>
		
		<category><![CDATA[Randomness]]></category>

		<guid isPermaLink="false">http://ben.lobaugh.net/blog/?p=393</guid>
		<description><![CDATA[I went to see the Cirque Polynesia while I was in Maui and the drummer astounded me. I must have watched him for the first twenty minutes at least. He totally made the show. He reminded me of a cross between Kiss and Michael Jackson, leaning heavily towards the Joker. Check it out and see [...]]]></description>
			<content:encoded><![CDATA[<p>I went to see the Cirque Polynesia while I was in Maui and the drummer astounded me. I must have watched him for the first twenty minutes at least. He totally made the show. He reminded me of a cross between Kiss and Michael Jackson, leaning heavily towards the Joker. Check it out and see how much you like him too!</p>
<div class="flowPlayer"><a class="player plain" id="postnum-393"><embed src="http://ben.lobaugh.net/blog/wp-content/plugins/wordpress-flowplayer/flowplayer-3.0.0.swf" allowfullscreen="true" allowscriptaccess="always" quality="high" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" id="postnum-393" bgcolor="#000000" name="postnum-393" flashvars="config={&quot;clip&quot;:{&quot;url&quot;:&quot;/uploads/maui_drummer.flv&quot;,&quot;autoPlay&quot;:false},&quot;playerId&quot;:&quot;postnum-393&quot;,&quot;playlist&quot;:[{&quot;url&quot;:&quot;/uploads/maui_drummer.flv&quot;,&quot;autoPlay&quot;:false}]}" width="320px" height="240px"><br />
			</a><br />
			<script language="javascript">
			("postnum-393", "http://ben.lobaugh.net/blog/wp-content/plugins/wordpress-flowplayer/flowplayer-3.0.0.swf", {
			clip: {
				url: '/uploads/maui_drummer.flv',
				autoPlay: false
			} 
			});
				</script></div>
]]></content:encoded>
			<wfw:commentRss>http://ben.lobaugh.net/blog/393/crazy-maui-drummer/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
