<?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>Josep Sanjuas' blog</title>
	<atom:link href="http://sanjuas.net/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://sanjuas.net/blog</link>
	<description>random stuff I found interesting enough to write about</description>
	<pubDate>Tue, 30 Dec 2008 07:59:03 +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>zpu - ZenPhoto file upload utility</title>
		<link>http://sanjuas.net/blog/2008/06/06/zpu-zenphoto-file-upload-utility/</link>
		<comments>http://sanjuas.net/blog/2008/06/06/zpu-zenphoto-file-upload-utility/#comments</comments>
		<pubDate>Thu, 05 Jun 2008 22:03:28 +0000</pubDate>
		<dc:creator>josep</dc:creator>
		
		<category><![CDATA[dreamhost]]></category>

		<category><![CDATA[free software]]></category>

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

		<category><![CDATA[web sites]]></category>

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

		<guid isPermaLink="false">http://sanjuas.net/blog/2008/06/06/zpu-zenphoto-file-upload-utility/</guid>
		<description><![CDATA[Dreamhost now provide ZenPhoto, an online image gallery software, as a one click install application, as the ZenPhoto developers proudly announce. I decided to give it a try to host my personal pics, and I definitely recommend it, the most outstanding feature being its unbloatedness (see demo site). It&#8217;s just what it is supposed to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.dreamhost.com" onclick="javascript:urchinTracker ('/outbound/article/www.dreamhost.com');">Dreamhost</a> now provide <a href="www.zenphoto.org/">ZenPhoto</a>, an online image gallery software, as a <a href="http://wiki.dreamhost.com/One_Click_Installs" onclick="javascript:urchinTracker ('/outbound/article/wiki.dreamhost.com');">one click install</a> application, as the ZenPhoto developers <a href="http://www.zenphoto.org/2008/03/dreamhost-offers-zenphoto-as-1-click-install/" onclick="javascript:urchinTracker ('/outbound/article/www.zenphoto.org');">proudly announce</a>. I decided to give it a try to host my personal pics, and I definitely recommend it, the most outstanding feature being its unbloatedness (see <a href="http://www.zenphoto.org/zenphoto/" onclick="javascript:urchinTracker ('/outbound/article/www.zenphoto.org');">demo site</a>). It&#8217;s just what it is supposed to be - &#8220;a simpler web photo gallery&#8221; as the official webpage of ZenPhoto states.</p>
<p>However, the one-click install at DreamHost suffers from a severe problem which is that they do not provide ftp/scp access to upload pictures. This means that uploading a huge photo album is *painfully* slow a process, since the only available option is to manually upload each file using HTML forms.</p>
<p>In my free time, I&#8217;ve created an application to upload pics there, as a way to exercise my python programming skills and as my first peek at PyGTK programming. In case you give it a try, the program requires the PyGTK and mechanize python modules be installed in the system. It has only been tested on my gentoo linux box. Should work on other linux distros and bsd, probably also for mac os. <del datetime="2008-12-30T07:56:59+00:00">Will *not* work on Microsoft Windows as it is (contributions to this regard will be welcome).</del> UPDATE: peter at majorsilence dot com has kindly provided a patch that makes it work on windows.</p>
<p>An option to overcome the need for such a software utility is to install ZenPhoto normally (as opposed to using DreamHost&#8217;s one-click installation) and to upload the files using any scp client (e.g. <a href="http://winscp.net/" onclick="javascript:urchinTracker ('/outbound/article/winscp.net');">WinSCP</a>).</p>
<p><b>Disclaimer:</b> this software is in ultra initial development state and may do horrible things to your albums. Software comes with no warranty. Please check the attached license terms.</p>
<p><del datetime="2008-12-30T07:56:59+00:00">Download zpu (ZenPhoto Uploader) version 0.1 <a href="/download/zpu-0.1.tar.gz">here</a>.</del></p>
<p>Download zpu (ZenPhoto Uploader) version 0.2 <a href="/download/zpu-0.2.tar.gz">here</a>.</p>
<p>Please leave a comment here if you download it - whether successful or not.</p>
]]></content:encoded>
			<wfw:commentRss>http://sanjuas.net/blog/2008/06/06/zpu-zenphoto-file-upload-utility/feed/</wfw:commentRss>
		</item>
		<item>
		<title>My ourlooks.com experiment</title>
		<link>http://sanjuas.net/blog/2008/02/09/my-ourlookscom-experiment/</link>
		<comments>http://sanjuas.net/blog/2008/02/09/my-ourlookscom-experiment/#comments</comments>
		<pubDate>Sat, 09 Feb 2008 08:52:36 +0000</pubDate>
		<dc:creator>josep</dc:creator>
		
		<category><![CDATA[experiments]]></category>

		<category><![CDATA[web sites]]></category>

		<guid isPermaLink="false">http://sanjuas.net/blog/2008/02/09/my-ourlookscom-experiment/</guid>
		<description><![CDATA[In this post I&#8217;m presenting a site that I developed in my free time. It served me to put my PHP skills into work, and to kill some free time while I was working abroad (free time which, sadly, I don&#8217;t have anymore).
I had the idea of building ourlooks.com after watching this thought-provoking talk by [...]]]></description>
			<content:encoded><![CDATA[<p>In this post I&#8217;m presenting a site that I developed in my free time. It served me to put my PHP skills into work, and to kill some free time while I was working abroad (free time which, sadly, I don&#8217;t have anymore).</p>
<p>I had the idea of building <a href="http://ourlooks.com" onclick="javascript:urchinTracker ('/outbound/article/ourlooks.com');">ourlooks.com</a> after watching this thought-provoking talk by Luis von Ahn, where he explains some of his research activities. The basic idea behind the talk is: we can automate tasks which computers can&#8217;t nowadays solve by making humans work for us. And humans will work, and they will do it for free, as long as they have an incentive to do so. More interestingly, this incentive is <em>having fun</em>. So, von Ahn has built several games that people seem to enjoy - and while playing, they solve interesting problems, such as recognizing the objects inside an image or collecting general knowledge (e.g., bananas are yellow and cars have four wheels).</p>
<p><center>
<p><embed src="http://video.google.com/googleplayer.swf?docId=-8246463980976635143&amp;hl=en" style="width: 400px; height: 326px" id="VideoPlayback" type="application/x-shockwave-flash" flashvars="&amp;subtitle=on"></embed></p>
<p></center></p>
<p>I thought about other ways this idea could be applied, and this is how ourlooks.com was conceived. One thing that computers can&#8217;t do is to tell you how you look, especially in terms of <em>how other people perceive your personal image</em>. So I decided to create a game that, while being played, served to rank people in categories such as looking pretty, trustworthy, and others.This initial idea is what later on derived into what ourlooks.com is today.</p>
<p><span id="more-16"></span></p>
<p>Sadly, ranking user&#8217;s looks was not a 100% new idea. Most notably, the people at <a href="http://hotornot.com" onclick="javascript:urchinTracker ('/outbound/article/hotornot.com');">hotornot.com</a> have been making millions of dollars since they were the first site (at least the first that got to be widely known) where users could vote on other people&#8217;s personal image. There exist nowadays tons of clones, devoted to rating <a href="http://www.cutelittlekittens.com/" onclick="javascript:urchinTracker ('/outbound/article/www.cutelittlekittens.com');">cats</a>, <a href="http://www.likemynudebody.com/" onclick="javascript:urchinTracker ('/outbound/article/www.likemynudebody.com');">nude bodies</a>, <a href="http://www.amiaceleb.com/" onclick="javascript:urchinTracker ('/outbound/article/www.amiaceleb.com');">similarity to celebrities</a>, and many others. However I thought that <a href="http://ourlooks.com" onclick="javascript:urchinTracker ('/outbound/article/ourlooks.com');">ourlooks.com</a> would be an interesting experiment as it was significantly different: instead of hosting a popularity contest, it could become a useful tool to assess your personal image (you can have your own opinion on whether this is true or not).</p>
<h2>Picture ratings</h2>
<p>In <a href="http://ourlooks.com/" onclick="javascript:urchinTracker ('/outbound/article/ourlooks.com');">ourlooks.com</a>, every user-submitted picture is automatically rated in the following categories: pretty, trustworthy, happy, intelligent, funny and hot. All kinds of combinations are theoretically possible: someone can be hot but not pretty, or funny and not look intelligent.</p>
<p>The rating mechanism works in the following way. When a visitor enters the site, a question is displayed, followed by two pictures belonging to two different users. There exists one question for each of the previous categories. The question serves to tell the user what is the category under evaluation: &#8220;Who looks more intelligent?&#8221;, &#8220;Who is the hottest?&#8221;. Based on the votes from people, every picture gains or loses points in the corresponding category.</p>
<p><center>
<p><a href='http://sanjuas.net/blog/wp-content/uploads/2008/02/question.png' title='question'><img src='http://sanjuas.net/blog/wp-content/uploads/2008/02/question.png' alt='question' /></a></p>
<p></center></p>
<p>Most sites ask the viewers for a direct numeric rating of each picture. This adds more variability as the marking standards of viewers are different. By asking the viewer to vote over two pictures, <a href="http://ourlooks.com/" onclick="javascript:urchinTracker ('/outbound/article/ourlooks.com');">ourlooks.com</a> just captures the preferences of the voters and generates the scores indirectly. Also, comparing two pictures should more convenient for the user: selecting a numerical value requires more mouse movement than just clicking one of two pictures.</p>
<p><a href="http://ourlooks.com/" onclick="javascript:urchinTracker ('/outbound/article/ourlooks.com');">ourlooks.com</a> uses a mechanism that resembles that of the <a href="http://en.wikipedia.org/wiki/ELO_rating_system" onclick="javascript:urchinTracker ('/outbound/article/en.wikipedia.org');">ELO rating system</a> used to rate chess players. When a low-rate picture (weak) is prefered by the voter in front of a highly rated one (strong), it will gain many points. Conversely, a strong photo will not gain much for an easy win in front of a weak opponent. This makes every picture&#8217;s rate to be quickly adjusted after a few votes. Allegedly, since I have not formally done any research on this.</p>
<p><center><a href='http://sanjuas.net/blog/wp-content/uploads/2008/02/ratings.png' title='ratings.png'><img src='http://sanjuas.net/blog/wp-content/uploads/2008/02/ratings2.png' alt='ratings.png' /></a></center></p>
<p>Every picture that the user uploads is rated independently. For example, the following pictures are of the same user. Each photograph is obviously to be rated very differently.</p>
<p><center>
<p><a href='http://sanjuas.net/blog/wp-content/uploads/2008/02/rub1.jpeg' title='rub1.jpeg'><img src='http://sanjuas.net/blog/wp-content/uploads/2008/02/rub1.thumbnail.jpeg' alt='rub1.jpeg' /> &nbsp; <a href='http://sanjuas.net/blog/wp-content/uploads/2008/02/rub2.jpeg' title='rub2.jpeg'><img src='http://sanjuas.net/blog/wp-content/uploads/2008/02/rub2.thumbnail.jpeg' alt='rub2.jpeg' /></a></p>
<p></center></p>
<h2>Picture search engine</h2>
<p>Besides the obvious ability to show top performers in each category, the site includes a unique feature: the <a href="http://ourlooks.com/index.php?act=search" onclick="javascript:urchinTracker ('/outbound/article/ourlooks.com');">search engine</a>, which can be used to locate pictures depending on the ratings in each category. To my best knowledge, this is the first site user search engine that can take into account the looks of the people.</p>
<p>The user can specify the characteristics that he or she expects from results. For example, the first result of a query for &#8220;very pretty but rather unhappy&#8221; people returns these pictures in the first results:</p>
<p><center></p>
<p>
<img src='http://sanjuas.net/blog/wp-content/uploads/2008/02/s1a.jpeg' /> <img src='http://sanjuas.net/blog/wp-content/uploads/2008/02/s1b.jpeg' /> <img src='http://sanjuas.net/blog/wp-content/uploads/2008/02/s1c.jpeg' />
</p>
<p></center></p>
<p>And &#8220;happy, trustworthy&#8221; returns these results:</p>
<p><center></p>
<p>
<img src='http://sanjuas.net/blog/wp-content/uploads/2008/02/s5a.jpeg' /> <img src='http://sanjuas.net/blog/wp-content/uploads/2008/02/s5b.jpeg' /> <img src='http://sanjuas.net/blog/wp-content/uploads/2008/02/s5c.jpeg' />
</p>
<p></center></p>
<h2>MySpace widget</h2>
<p>The last feature that I added to the site is the &#8220;myspace widget&#8221;. Every user has the chance to include a picture in their myspace (or similar) profile that points to <a href="http://ourlooks.com" onclick="javascript:urchinTracker ('/outbound/article/ourlooks.com');">ourlooks.com</a>. The picture is dynamically updated with the current ratings. However this is something that the users generally have not put into use. I guess they&#8217;d rather keep the results private.</p>
<p><center><a href='http://sanjuas.net/blog/wp-content/uploads/2008/02/widget.gif' title='widget.gif'><img src='http://sanjuas.net/blog/wp-content/uploads/2008/02/widget.gif' alt='widget.gif' /></a></center></p>
<h2>Conclusions</h2>
<p>The <a href="http://ourlooks.com" onclick="javascript:urchinTracker ('/outbound/article/ourlooks.com');">ourlooks.com</a> site has now gathered around 500 registered accounts, and users have uploaded around 1000 pictures. Interestingly, most of the users are women. I guess women have a higher tendency to be worried about their looks. Either this, or the text ads I used to promote the site were unwittingly targeted to women.</p>
<p>For now the site is a small club, so I am happy to receive feedback from users. Too bad that I can&#8217;t dedicate much time to make it grow in features.</p>
]]></content:encoded>
			<wfw:commentRss>http://sanjuas.net/blog/2008/02/09/my-ourlookscom-experiment/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Akismet saves the day</title>
		<link>http://sanjuas.net/blog/2007/10/07/akismet-saves-the-day/</link>
		<comments>http://sanjuas.net/blog/2007/10/07/akismet-saves-the-day/#comments</comments>
		<pubDate>Sun, 07 Oct 2007 07:34:36 +0000</pubDate>
		<dc:creator>josep</dc:creator>
		
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://sanjuas.net/blog/2007/10/07/akismet-saves-the-day/</guid>
		<description><![CDATA[Some days ago in this blog entry I explained that a spammer was filling another entry with spam comments. It was the first spambot to target this blog, and I blocked it with an IP address filter. Both Brainstorm and Marc Pous suggested, after reading the blog entry, that I should install Akismet instead of [...]]]></description>
			<content:encoded><![CDATA[<p>Some days ago in <a href="http://sanjuas.net/blog/2007/09/25/obstinate-spam-bot-hits-this-blog/" >this</a> blog entry I explained that a spammer was filling <a href="http://sanjuas.net/blog/2007/09/02/lautoescola-del-racc-canvia-una-molt-bona-aplicacio-web-per-un-software-amb-llicencia-altament-restrictiva/" >another</a> entry with spam comments. It was the first <a href="http://en.wikipedia.org/wiki/Spambot" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/en.wikipedia.org');">spambot</a> to target this blog, and I blocked it with an IP address filter. Both <a href="http://blogs.nopcode.org/brainstorm/" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/blogs.nopcode.org');">Brainstorm</a> and <a href="http://marcpous.info" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/marcpous.info');">Marc Pous</a> suggested, after reading the blog entry, that I should install <a href="http://en.wikipedia.org/wiki/Akismet" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/en.wikipedia.org');">Akismet</a> instead of blocking individual IP addresses, which is an approach that takes way too much time. Akismet (automatically) analyzes every comment that is posted to akismet-enabled blogs, and can it prevents spam from being published. Instead, spam is isolated and the site admin can review it, just in case that it makes a mistake.</p>
<p>Akismet works very well for me. As of now, it has already blocked 192 comments in less than three days, and it has never had a single <a href="http://en.wikipedia.org/wiki/Type_I_and_type_II_errors#Type_I_error" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/en.wikipedia.org');">false positive</a> (where it would have marked a legitimate comment as spam) or a <a href="http://en.wikipedia.org/wiki/Type_I_and_type_II_errors#Type_II_error" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/en.wikipedia.org');">false negative</a> (failing to identify a spam comment as such).</p>
<p>For now all the spam I&#8217;ve been receiving is in form of links to online casinos. I guess the recent poker-related entries have attracted spambots to my site.</p>
<p>I&#8217;m very thankful to my friends for having pointed me to Akismet :)</p>
]]></content:encoded>
			<wfw:commentRss>http://sanjuas.net/blog/2007/10/07/akismet-saves-the-day/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Analyzing the Internet uplink of upc</title>
		<link>http://sanjuas.net/blog/2007/09/30/analyzing-the-internet-uplink-of-upcnet/</link>
		<comments>http://sanjuas.net/blog/2007/09/30/analyzing-the-internet-uplink-of-upcnet/#comments</comments>
		<pubDate>Sun, 30 Sep 2007 20:54:44 +0000</pubDate>
		<dc:creator>josep</dc:creator>
		
		<category><![CDATA[network monitoring]]></category>

		<guid isPermaLink="false">http://sanjuas.net/blog/2007/09/30/analyzing-the-internet-uplink-of-upcnet/</guid>
		<description><![CDATA[In our research lab at UPC we&#8217;re working on network monitoring technologies (see http://loadshedding.ccaba.upc.edu). When publishing research papers in our area, it is important to test the results of the proposed techniques on links that are representative enough of the overall traffic of the Internet (or at least, to try to test the techniques under [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://loadshedding.ccaba.upc.edu" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/loadshedding.ccaba.upc.edu');">our research lab</a> at UPC we&#8217;re working on network monitoring technologies (see <a href="http://loadshedding.ccaba.upc.edu" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/loadshedding.ccaba.upc.edu');">http://loadshedding.ccaba.upc.edu</a>). When publishing research papers in our area, it is important to test the results of the proposed techniques on links that are representative enough of the overall traffic of the Internet (or at least, to try to test the techniques under realistic load, as opposed to e.g. small LANs or synthetic traffic traces).</p>
<p>We are testing our techniques on an anonymized copy of the traffic that traverses the link that connects (at least part of) the <a href="http://www.upc.edu" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/www.upc.edu');">Technical University of Catalonia</a> (UPC) network to the Internet. This guarantees the privacy of the users but it still lets us observe the trends and main characteristics of the traffic (i.e. number of flows, packets per second, total bandwidth usage) .</p>
<p>To inspect the traffic we are using <a href="http://como.sourceforge.net" onclick="javascript:urchinTracker ('/outbound/article/como.sourceforge.net');">CoMo</a> and appmon (a network monitoring tool produced in the <a href="http://www.ist-lobster.org/" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/www.ist-lobster.org');">LOBSTER European project</a>). This application analyzes the input traffic stream and can identify several popular applications or protocols that use most of the bandwidth nowadays (p2p, http, smtp..). It outputs a per-application aggregate <a href="http://oss.oetiker.ch/rrdtool/" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/oss.oetiker.ch');">rrdtool</a> graph plus a list of the addresses that are consuming the most resources (note that the IP addresses are anonymized).</p>
]]></content:encoded>
			<wfw:commentRss>http://sanjuas.net/blog/2007/09/30/analyzing-the-internet-uplink-of-upcnet/feed/</wfw:commentRss>
		</item>
		<item>
		<title>My home poker kit</title>
		<link>http://sanjuas.net/blog/2007/09/26/my-home-poker-kit/</link>
		<comments>http://sanjuas.net/blog/2007/09/26/my-home-poker-kit/#comments</comments>
		<pubDate>Wed, 26 Sep 2007 18:24:55 +0000</pubDate>
		<dc:creator>josep</dc:creator>
		
		<category><![CDATA[poker]]></category>

		<guid isPermaLink="false">http://sanjuas.net/blog/2007/09/26/my-home-poker-kit/</guid>
		<description><![CDATA[I have recently purchased some stuff at amazon to play poker at home:

two decks of COPAG cards
300 cheap casino-like chips in a metal case

 

I highly recommend the set of poker chips that I bought. Even though they are not the real thing, they look like and feel like real casino chips for a fraction [...]]]></description>
			<content:encoded><![CDATA[<p>I have recently purchased some stuff at amazon to play poker at home:</p>
<ul>
<li><a href="http://www.amazon.de/gp/product/B000KG49HY/302-8763979-0128039" onclick="javascript:urchinTracker ('/outbound/article/www.amazon.de');">two decks of COPAG cards</a></li>
<li><a href="http://www.amazon.co.uk/exec/obidos/ASIN/B000PKD3O0/202-7942566-7402249" onclick="javascript:urchinTracker ('/outbound/article/www.amazon.co.uk');">300 cheap casino-like chips in a metal case</a></li>
</ul>
<p align="center"><img src="http://sanjuas.net/blog/wp-content/uploads/2007/10/300chips.jpeg" alt="300 chips" /> <img src="http://sanjuas.net/blog/wp-content/uploads/2007/10/copag.jpeg" alt="copag cards" /></p>
<p><span id="more-9"></span></p>
<p>I highly recommend the set of poker chips that I bought. Even though they are not the real thing, they look like and feel like real casino chips for a fraction of the cost. The set has cost me around 30€, shipping costs and sturdy-looking metal case included. Casino quality chips are made of clay and cost around $1 per chip, which I&#8217;m not willing to pay. The chips I have are made of plastic, with a metal insert to give them some wheight (11.5 gram). They stack well and they are not too slippery, which was my primary concern.</p>
<p>300 chips is ok for games with 4 to 5 people. If you plan on hosting 8 to 10 people games, I&#8217;d recommend buying the 300 chip set plus a 600 or 800 piece one, instead of a single one with 800 or 1000 chips. This is because the 300 chips together sum around 3.5Kg, which is approaching the limit of wheight that I can comfortably carry on foot, and I&#8217;ll occasionally be taking the chips with me. Believe me, playing with chips is a whole new experience compared to betting with bits of cheap Italian pasta :)</p>
<p>Besides the chips, I bought a couple of blue-colored <a href="http://www.copag.com.br/" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/www.copag.com.br');">COPAG</a> decks for around 10€ each. If I could go back in time, I&#8217;d buy a blue one plus a red-colored one instead of two blue-coulored ones, since they can get mixed easily. But I&#8217;d still go COPAG, as the reviews I read on <a href="http://www.homepokertourney.com/reviews/cards-review-copag.htm" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/www.homepokertourney.com');">www.homepokertourney.com</a> indicate that this brand has almost top-quality cards for half the price you&#8217;d have to pay for KEM cards, which are supposed to be the best. Pros: durable, they return to original shape after being bent. Cons: they feel too thin and slippery for many people (but I&#8217;m now used to it) and graphics on the card not as nice as they could be.</p>
<p>By the way, my <a href="http://sanjuas.net/blog/2007/09/04/playing-poker-at-online-casinos-from-linux-for-free-or-for-real/" target="_blank" >linuxholdempoker.com experiment</a> has failed, as it has still not caught any visitor from Google since I registered the domain. I&#8217;m trying with <a href="http://linux-poker.net" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/linux-poker.net');">linux-poker.net</a> instead, and this will be my last experiment on the subject.</p>
]]></content:encoded>
			<wfw:commentRss>http://sanjuas.net/blog/2007/09/26/my-home-poker-kit/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Obstinate spam bot hits this blog</title>
		<link>http://sanjuas.net/blog/2007/09/25/obstinate-spam-bot-hits-this-blog/</link>
		<comments>http://sanjuas.net/blog/2007/09/25/obstinate-spam-bot-hits-this-blog/#comments</comments>
		<pubDate>Tue, 25 Sep 2007 20:44:08 +0000</pubDate>
		<dc:creator>josep</dc:creator>
		
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://sanjuas.net/blog/2007/09/25/obstinate-spam-bot-hits-this-blog/</guid>
		<description><![CDATA[During the last weekend around 100 comments were posted to this blog entry. It&#8217;s not that my blog has suddenly become superpopular. All comments consisted of links to online casino promotion pages and such, and it took me a long time to delete them all. When I was done, I realised that more similar comments [...]]]></description>
			<content:encoded><![CDATA[<p>During the last weekend around 100 comments were posted to <a href="http://sanjuas.net/blog/2007/09/02/lautoescola-del-racc-canvia-una-molt-bona-aplicacio-web-per-un-software-amb-llicencia-altament-restrictiva/" >this</a> blog entry. It&#8217;s not that my blog has suddenly become superpopular. All comments consisted of links to online casino promotion pages and such, and it took me a long time to delete them all. When I was done, I realised that more similar comments had already been posted. This is how the spammer&#8217;s HTTP requests looked like in the apache logs:<br />
<span id="more-8"></span></p>
<p><code>85.17.3.200 - - [24/Sep/2007:07:56:38 -0700] &#8220;POST<br />
/blog/2007/09/02/lautoescola-del-racc-canvia-una-molt-<br />
bona-aplicacio-web-per-un-software-amb-llicencia-altament-<br />
restrictiva/trackback/ HTTP/1.1&#8243; 200 412 &#8220;-&#8221; &#8220;-&#8221;<br />
</code></p>
<p>I solved the issue by blocking this particular IP address, which was the same for all the posts, with an apache .htaccess configuration file:</p>
<p><code>order allow,deny<br />
deny from 85.17.3.200<br />
allow from all</code></p>
<p>From now on, his requests will be failing with a <a href="http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#4xx_Client_Error" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/en.wikipedia.org');">403 Forbidden</a> error:</p>
<p><code>85.17.3.200 - - [25/Sep/2007:06:02:23 -0700] &#8220;POST<br />
/blog/2007/09/02/lautoescola-del-racc-canvia-una-molt-<br />
bona-aplicacio-web-per-un-software-amb-llicencia-altament-<br />
restrictiva/trackback/ HTTP/1.1&#8243; 403 710 &#8220;-&#8221; &#8220;-&#8221;</code></p>
<p>Good riddance! Since I added this filter, the boot has keept retrying every 20 minutes, though. Perseverance is a virtue, but this IP address filter is not going away :) I hope the bot does not come back from a new address. If it does I&#8217;ll add <a href="http://en.wikipedia.org/wiki/Captcha" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/en.wikipedia.org');">CAPTCHA</a> based protection to this site.</p>
]]></content:encoded>
			<wfw:commentRss>http://sanjuas.net/blog/2007/09/25/obstinate-spam-bot-hits-this-blog/feed/</wfw:commentRss>
		</item>
		<item>
		<title>L&#8217;autoescola del RACC canvia una molt bona aplicació web per un software amb llicència altament restrictiva</title>
		<link>http://sanjuas.net/blog/2007/09/02/lautoescola-del-racc-canvia-una-molt-bona-aplicacio-web-per-un-software-amb-llicencia-altament-restrictiva/</link>
		<comments>http://sanjuas.net/blog/2007/09/02/lautoescola-del-racc-canvia-una-molt-bona-aplicacio-web-per-un-software-amb-llicencia-altament-restrictiva/#comments</comments>
		<pubDate>Sun, 02 Sep 2007 21:43:38 +0000</pubDate>
		<dc:creator>josep</dc:creator>
		
		<category><![CDATA[autoescola]]></category>

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

		<guid isPermaLink="false">http://sanjuas.net/blog/2007/09/02/lautoescola-del-racc-canvia-una-molt-bona-aplicacio-web-per-un-software-amb-llicencia-altament-restrictiva/</guid>
		<description><![CDATA[Estic apuntat al RACC per treure&#8217;m el carnet de cotxe. He recomanat a alguns amics meus que tampoc el tenen que s&#8217;apuntessin al RACC, i la raó principal era que fins ara posaven a la disposició dels estudiants una molt bona aplicació web. Aquesta aplicació permetia l&#8217;estudi des de qualsevol ordinador amb accés a Internet [...]]]></description>
			<content:encoded><![CDATA[<p>Estic apuntat al <a href="http://racc.cat" title="racc" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/racc.cat');">RACC</a> per treure&#8217;m el carnet de cotxe. He recomanat a alguns amics meus que tampoc el tenen que s&#8217;apuntessin al RACC, i la raó principal era que fins ara posaven a la disposició dels estudiants una molt bona aplicació web. Aquesta aplicació permetia l&#8217;estudi des de qualsevol ordinador amb accés a Internet conservant l&#8217;històric de testos fets, preguntes fallades, etc. A més funcionava prou bé des de <a href="http://www.mozilla.com/firefox/" title="firefox" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/www.mozilla.com');">Firefox</a>, amb la qual cosa també era adequada pels usuaris de linux o mac.</p>
<p>Fa cosa d&#8217;unes setmanes, però,  l&#8217;accés a l&#8217;aplicatiu web va deixar de funcionar. <span id="more-6"></span> Els encarregats del seu manteniment em van confirmar que l&#8217;accés havia quedat suprimit i des d&#8217;aleshores els estudiants havien d&#8217;usar un programari que hauria de demanar a l&#8217;oficina del RACC. Immediatament vaig recelar d&#8217;aquest software: segurament no em funcionaria sobre linux (almenys no sense barallar-me amb el Wine, cosa que no tinc massa ganes de fer). I no em permetria conservar les preferències o històrics d&#8217;errors entre els diversos PCs que uso: el de casa, el de la feina, i el portàtil.</p>
<p>Per culpa seva m&#8217;he hagut de muntar una màquina virtual amb <a href="http://www.vmware.com" title="vmware" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/www.vmware.com');">vmware</a>, instal·lar-hi windows&#8230; i tot plegat per trobar-me un programari amb una llicència (<a href="http://en.wikipedia.org/wiki/EULA" title="eula" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/en.wikipedia.org');">EULA</a>) molt restrictiva, per no dir abusiva:</p>
<ul>
<li>només pots <strong>instal·lar el programa una sola vegada</strong>, i <strong>en un sol PC.</strong></li>
<li>el programa té una validesa de 4 mesos, després <strong>caduca</strong>.</li>
<li>solament <strong>pots fer cada test 5  vegades </strong>(un amunt un avall, no recordo ara exactament) i prou. Un límit completament arbitrari!</li>
</ul>
<p>Només puc que dir: quina llàstima! Un mal canvi. I amb aquest mal canvi desapareix una molt bona raó per la qual recomanava l&#8217;autoescola del RACC als coneguts.</p>
<p>Sort que els mateixos del RACC m&#8217;han donat <a href="http://www.univers.upc.edu/descomptes&amp;desplegat=1&amp;notdesp=1512" onclick="javascript:urchinTracker ('/outbound/article/www.univers.upc.edu');">molt bones notícies</a> per una altra banda :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://sanjuas.net/blog/2007/09/02/lautoescola-del-racc-canvia-una-molt-bona-aplicacio-web-per-un-software-amb-llicencia-altament-restrictiva/feed/</wfw:commentRss>
		</item>
		<item>
		<title>embedding fonts to a PDF file from the command line and using free software</title>
		<link>http://sanjuas.net/blog/2007/07/25/embedding-fonts-to-a-pdf-file-from-the-command-line-and-using-free-software/</link>
		<comments>http://sanjuas.net/blog/2007/07/25/embedding-fonts-to-a-pdf-file-from-the-command-line-and-using-free-software/#comments</comments>
		<pubDate>Wed, 25 Jul 2007 15:46:59 +0000</pubDate>
		<dc:creator>josep</dc:creator>
		
		<category><![CDATA[free software]]></category>

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

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

		<guid isPermaLink="false">http://sanjuas.net/blog/2007/07/25/embedding-fonts-to-a-pdf-file-from-the-command-line-and-using-free-software/</guid>
		<description><![CDATA[Let&#8217;s imagine you have to merge several PDF files that your colleagues sent you into a single, larger document. Let&#8217;s then imagine that your idea is to publish this document, but the publisher requires all fonts to be embedded in the document. Unfortunately, your PDF file does not have all the fonts embedded, as you [...]]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s imagine you have to merge several PDF files that your colleagues sent you into a single, larger document. Let&#8217;s then imagine that your idea is to publish this document, but <a href="http://lulu.com" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/lulu.com');">the publisher</a> requires all fonts to be embedded in the document. Unfortunately, your PDF file does not have all the fonts embedded, as you can check with the following command:<br />
<span id="more-5"></span><br />
<code>$pdffonts document.pdf<br />
name                                 type              emb sub uni object ID<br />
(...)<br />
Helvetica                            Type 1            no  no  no     697  0<br />
(...)<br />
</code></p>
<p>You do not want to bother your colleagues by shifting the problem to them - they already sent you their PDFs and you initially forgot to ask them to embed the fonts. Furthermore, you&#8217;d rather use free software that is available in your mainstream linux distribution. Preferably a command-line program which you can call from a makefile or a script.</p>
<p>Well, then, this is The Command:</p>
<p><code>$gs -dSAFER -dNOPLATFONTS -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sPAPERSIZE=letter -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dMaxSubsetPct=100 -dSubsetFonts=true -dEmbedAllFonts=true -sOutputFile=output.pdf -f input.pdf</code></p>
<p>It took a lot of time, almost ate up all my workstation&#8217;s memory but it did work. Credit goes to <a href="http://colinm.org/tips/latex" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/colinm.org');">this guy</a>. Further useful information <a href="http://www.csc.kth.se/~bishop/resources/pdftex_embsub.html" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/www.csc.kth.se');">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://sanjuas.net/blog/2007/07/25/embedding-fonts-to-a-pdf-file-from-the-command-line-and-using-free-software/feed/</wfw:commentRss>
		</item>
		<item>
		<title>libpcap: packet timestamps not increasing</title>
		<link>http://sanjuas.net/blog/2007/07/18/libpcap-packet-timestamps-not-increasing/</link>
		<comments>http://sanjuas.net/blog/2007/07/18/libpcap-packet-timestamps-not-increasing/#comments</comments>
		<pubDate>Wed, 18 Jul 2007 21:48:06 +0000</pubDate>
		<dc:creator>josep</dc:creator>
		
		<category><![CDATA[network monitoring]]></category>

		<guid isPermaLink="false">http://sanjuas.net/blog/?p=3</guid>
		<description><![CDATA[As some of you may already know, one of my jobs is to maintain and develop for the CoMo network monitoring system. CoMo supports many input sniffers, such as bpf for FreeBSD systems, netflow, sflow, data from the network monitoring specialized DAG cards, and most notably libpcap.
In CoMo, every packet has a reception timestamp. How [...]]]></description>
			<content:encoded><![CDATA[<p>As some of you may already know, one of my jobs is to maintain and develop for the <a href="http://como.sf.net" title="CoMo" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/como.sf.net');">CoMo network monitoring system</a>. CoMo supports many input sniffers, such as bpf for FreeBSD systems, <a href="http://en.wikipedia.org/wiki/Netflow" title="Netflow" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/en.wikipedia.org');">netflow</a>, <a href="http://www.sflow.org/" title="sflow" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/www.sflow.org');">sflow</a>, data from the network monitoring specialized <a href="http://endace.com" title="Endace" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/endace.com');">DAG cards</a>, and most notably <a href="http://www.tcpdump.org/" title="tcpdump" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/www.tcpdump.org');">libpcap</a>.</p>
<p>In CoMo, every packet has a reception timestamp. How packets are stamped depends on the actual sniffer that receives the packet. For example, DAG cards have their own clocks to stamp each packet. In libpcap, it is the kernel (in my case, the linux kernel) that marks the packets according to the local time.</p>
<p>While developing for the upcoming CoMo 2.0 release, I added strict checks that packet stamps for each packet should <a href="http://http://en.wikipedia.org/wiki/Monotonic_function" title="Monotonic function" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/en.wikipedia.org');">monitonically increase</a> - that is, no packet timestamp can be lower than the previous. I expected this to be a reasonable constraint to impose on sniffers. I was wrong: libpcap did in fact feed CoMo with what I believed to be <em>unordered packets</em>.</p>
<p>In order to confirm this issue, I wrote the following program:<br />
<span id="more-3"></span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
</pre></td><td class="code"><pre class="c"><span style="color: #339933;">#include &lt;pcap.h&gt;</span>
<span style="color: #339933;">#include &lt;err.h&gt;</span>
&nbsp;
<span style="color: #993333;">static</span> <span style="color: #993333;">void</span> processpkt<span style="color: #66cc66;">&#40;</span>u_char * data,
    <span style="color: #993333;">const</span> <span style="color: #993333;">struct</span> pcap_pkthdr * h,
    <span style="color: #993333;">const</span> u_char * buf<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #993333;">static</span> <span style="color: #993333;">double</span> last_ts = <span style="color: #cc66cc;">0</span>;
    <span style="color: #993333;">static</span> <span style="color: #993333;">int</span> pkt_count = <span style="color: #cc66cc;">0</span>;
    <span style="color: #993333;">double</span> ts = h-&gt;ts.<span style="color: #202020;">tv_sec</span> +
        <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333;">double</span><span style="color: #66cc66;">&#41;</span> h-&gt;ts.<span style="color: #202020;">tv_usec</span><span style="color: #66cc66;">&#41;</span> / <span style="color: #cc66cc;">1000000</span>;
    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>last_ts == <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>
        last_ts = ts;
    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>ts &lt; last_ts<span style="color: #66cc66;">&#41;</span>
        <span style="color: #000066;">printf</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;pkt #%d: ts decreased! %f to %f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>,
            pkt_count, last_ts, ts<span style="color: #66cc66;">&#41;</span>;
    pkt_count++;
    last_ts = ts;
<span style="color: #66cc66;">&#125;</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> errbuf<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1024</span><span style="color: #66cc66;">&#93;</span>;
    <span style="color: #993333;">struct</span> bpf_program prog;
    pcap_t *pcap = pcap_open_live<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: #cc66cc;">2048</span>, <span style="color: #cc66cc;">1</span>, <span style="color: #cc66cc;">0</span>, errbuf<span style="color: #66cc66;">&#41;</span>;
    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>pcap == <span style="color: #000000; font-weight: bold;">NULL</span> || argv<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span> == <span style="color: #000000; font-weight: bold;">NULL</span><span style="color: #66cc66;">&#41;</span>
        errx<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span>, <span style="color: #ff0000;">&quot;error opening interface %s&quot;</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>;
    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>argv<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> <span style="color: #808080; font-style: italic;">/* we have a filter expression */</span>
        <span style="color: #993333;">int</span> i = pcap_compile<span style="color: #66cc66;">&#40;</span>pcap, &amp;prog, argv<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">24</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>i &lt; <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>
            errx<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span>, <span style="color: #ff0000;">&quot;error compiling filter expression &quot;</span>
                <span style="color: #ff0000;">&quot;`%s': %s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>, argv<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span>, pcap_geterr<span style="color: #66cc66;">&#40;</span>pcap<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
    i = pcap_setfilter<span style="color: #66cc66;">&#40;</span>pcap, &amp;prog<span style="color: #66cc66;">&#41;</span>;
        <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>i &lt; <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>
            errx<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span>, <span style="color: #ff0000;">&quot;error applying filter expression: %s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>,
                        pcap_geterr<span style="color: #66cc66;">&#40;</span>pcap<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
    <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span>;;<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        pcap_dispatch<span style="color: #66cc66;">&#40;</span>pcap, <span style="color: #cc66cc;">100</span>, processpkt, <span style="color: #000000; font-weight: bold;">NULL</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>The program receives two input parameters: the network interface to read from, and optionally the filter to apply to packets. For each packet that reaches the <code>processpkt()</code> function, it will check that packet timestamps increase, and output a warning if this is not the case.</p>
<p>Running this code yields the following results in our development box:<br />
<code><br />
$gcc check_libpcap_timestamps.c -o check_libpcap_timestamps -lpcap<br />
$sudo ./check_libpcap_timestamps eth0<br />
pkt #23: ts decreased! 1184677973.006962 --&gt; 1184677973.006952<br />
pkt #28: ts decreased! 1184677973.007341 --&gt; 1184677973.007328<br />
pkt #38: ts decreased! 1184677973.007968 --&gt; 1184677973.007952<br />
pkt #43: ts decreased! 1184677973.008328 --&gt; 1184677973.008322<br />
pkt #48: ts decreased! 1184677973.008588 --&gt; 1184677973.008577<br />
pkt #53: ts decreased! 1184677973.008846 --&gt; 1184677973.008830<br />
(...)<br />
</code></p>
<p>Which confirms that packets returned by libpcap have non-increasing timestamps. Weird! Some joint research &amp; problem debugging with Diego Amores revealed the following <a href="http://http://www.tcpdump.org/lists/workers/2005/09/msg00044.html" onclick="javascript:urchinTracker ('/outbound/article/www.tcpdump.org');">interesting</a> <a href="http://www.tcpdump.org/lists/workers/2005/05/msg00030.html" onclick="javascript:urchinTracker ('/outbound/article/www.tcpdump.org');">threads</a>, and especially <a href="http://www.tcpdump.org/lists/workers/2003/08/msg00411.html" onclick="javascript:urchinTracker ('/outbound/article/www.tcpdump.org');"> this one</a> that includes a post from Guy Harris to the <a href="http://www.tcpdump.org/lists/workers/index.html" onclick="javascript:urchinTracker ('/outbound/article/www.tcpdump.org');">tcpdump-workers mailing list</a> which explains how libpcap gets the timestamps:</p>
<blockquote><p>[Outgoing packets' timestamps are] assigned whenever the packet is supplied, by the networking stack, to whatever piece of code time-stamps the packet; that&#8217;s before the first bit is even put onto the network.<br />
(&#8230;)<br />
[Incoming packets' timestamps are] assigned whenever the packet is supplied, by the device driver or networking stack, to whatever piece of code time-stamps the packet; that&#8217;s after the lat bit is received.<br />
In other words, the time stamps aren&#8217;t extremely precise measurements of when the first, or last, bit of the packet was put onto the network; the imprecision includes time spent passing the packet through the networking code and the driver code, as well as, possibly, through the networking card.  It might also, for incoming packets, include interrupt latency.</p></blockquote>
<p>The idea that incoming and outgoing packets are stamped this way made us think that maybe incoming packets have increasing stamps, and outgoing packets too, but when buffered together and returned by libpcap, there is no garantee that the timestamps increase. We confirmed this by doing the following:</p>
<pre>
$sudo ./check_libpcap_timestamps eth1 "src 192.168.0.1"
(no warnings, ctrl+c'd)
$sudo ./check_libpcap_timestamps eth1 "dst 192.168.0.1"
(no warnings, ctrl+c'd)
$sudo ./check_libpcap_timestamps eth1
(tons of warnings)</pre>
<p>If we ask libpcap to process only either incoming or outgoing packets, timestamps are always increasing. As a conclusion, this has no impact on a passive network monitoring system that uses libpcap to capture packets, because a network interface will be used only to receive packets. However, in the case of CoMo, users may want to monitor active NICs, so I ended up relaxing the restriction that packet timestamps should increase, and merely issue a warning.</p>
]]></content:encoded>
			<wfw:commentRss>http://sanjuas.net/blog/2007/07/18/libpcap-packet-timestamps-not-increasing/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
