<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-12336733</id><updated>2011-07-28T17:15:55.557-04:00</updated><category term='paper'/><category term='mobile'/><category term='parallel computing'/><category term='workit'/><category term='irt'/><category term='courses'/><category term='python'/><category term='wireless'/><category term='php'/><category term='web'/><category term='netserv'/><category term='unix'/><category term='bookmark'/><category term='kernel'/><category term='measurement'/><category term='design'/><category term='7DS'/><category term='candidacy'/><category term='ta'/><category term='conference'/><category term='hardware'/><category term='ad-hoc applications'/><category term='bonaha'/><title type='text'>Suman Srinivasan | CS Research @ IRT</title><subtitle type='html'>A little bit of the day-to-day and behind-the-scenes of my work as a PhD student in Computer Science at Columbia University.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>84</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-12336733.post-1162922349705288998</id><published>2009-08-14T14:30:00.004-04:00</published><updated>2009-08-14T14:46:31.990-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='measurement'/><title type='text'>Round trip time measurements using ICMP and TCP</title><content type='html'>ping is a great tool for measuring round-trip time delays, but:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Sometimes, ICMP is not enabled on the end hosts (increasingly now)&lt;/li&gt;&lt;li&gt;ICMP RTTs may not provide the right delay metric for real-world applications.&lt;/li&gt;&lt;/ol&gt;I searched and found two good "TCP Ping" tools, which basically seem to create a TCP SYN message and check the time delay in getting a SYN-ACK response from the server.&lt;br /&gt;&lt;br /&gt;This should be a more realistic measure of RTT for real-world TCP traffic and should be possible to do on any public node.&lt;br /&gt;&lt;br /&gt;Here are two that I found to be helpful&lt;br /&gt;&lt;ul&gt;&lt;li&gt;TCP Ping: &lt;a href="http://www.vdberg.org/%7Erichard/tcpping.html"&gt;Download script here&lt;/a&gt; and &lt;a href="http://www.kehlet.cx/articles/77.html"&gt;more details here&lt;/a&gt; (requires tcptraceroute)&lt;/li&gt;&lt;li&gt;Scapy TCP Ping (using Python): Doesn't seem to actually do RTT measurements... (requires python and &lt;a href="http://www.secdev.org/projects/scapy"&gt;scapy library&lt;/a&gt;)&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;UPDATE:&lt;/span&gt; scapy can do round-trip measurements itself. You need to &lt;a href="http://www.secdev.org/python/scapy.py"&gt;scapy.py file&lt;/a&gt; and some &lt;a href="http://www.secdev.org/projects/scapy/demo.html"&gt;basic tutorials&lt;/a&gt;...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-1162922349705288998?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/1162922349705288998/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=1162922349705288998' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/1162922349705288998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/1162922349705288998'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2009/08/round-trip-time-measurements-using-icmp.html' title='Round trip time measurements using ICMP and TCP'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-3423560604173772772</id><published>2009-07-15T16:33:00.002-04:00</published><updated>2009-07-15T16:44:14.031-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='netserv'/><title type='text'>Sending customized TCP packets using jpcap and libpcap</title><content type='html'>Sorry I haven't blogged for a while; I've moved to &lt;a href="http://twitter.com/sumanrs/"&gt;Twitter.com/sumanrs&lt;/a&gt; for most updates. I'm only using this blog for longer posts now.&lt;br /&gt;&lt;br /&gt;So my task this week was to create customized TCP packets for the NetSerV experiment. I would have had to look for a user-level TCP stack ... or use the popular &lt;a href="http://www.tcpdump.org/"&gt;pcap &lt;/a&gt;implementation, which can generate packets on the network.&lt;br /&gt;&lt;br /&gt;And since this has to run on Java, we have to use &lt;a href="http://netresearch.ics.uci.edu/kfujii/jpcap/doc/"&gt;jpcap &lt;/a&gt;(there is an older version on Sourceforge, which I did not try.)&lt;br /&gt;&lt;br /&gt;I was able to successfully create a program that can send TCP packets, both on Windows and Linux.  And was able to compile and run SendTCP.java, which can send packets&lt;br /&gt;&lt;br /&gt;To get the TCP packets to send properly in a local network and be received at the remote node, you need to know a few things:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Make sure to correctly specify source and destination MAC addresses. You can get the source MAC address by doing:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ether.src_mac = device.mac_address;&lt;/span&gt;&lt;br /&gt;You will have to manually set the receiver's MAC address, or look at ARP.java to figure how to do it over the network.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Make sure to correctly specify source and destination IP address. Can be done through InetAddress.getByName() as in the example.&lt;/li&gt;&lt;li&gt;For unknown TCP ports that don't have any daemons running on them, you may not get a ACK response for a SYN packet, though you will get a TCP RST packet.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;If you send it to a port that has a daemon, you will get a nice ACK packet, which you can handle properly.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;Windows ran succesfully, but I learnt a few things for the Linux install since I had to run it on a AMD 64-bit processor:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;There seems to be no version of jpcap download on the jpcap site. So you will have to build it yourself.&lt;/li&gt;&lt;li&gt;Download the &lt;a href="http://netresearch.ics.uci.edu/kfujii/jpcap/doc/download.html"&gt;source from the jpcap&lt;/a&gt; site.&lt;/li&gt;&lt;li&gt;Follow &lt;a href="http://netresearch.ics.uci.edu/kfujii/jpcap/doc/install.html"&gt;instructions for source install&lt;/a&gt; here.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;You need libpcap and libpcap-dev installed. libpcap is most likely already installed; if you want libpcap-dev, do "sudo apt-get install libpcap-dev"&lt;/li&gt;&lt;li&gt;You can install the native library and the JAR by following the instructions in #3.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-3423560604173772772?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/3423560604173772772/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=3423560604173772772' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/3423560604173772772'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/3423560604173772772'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2009/07/sending-customized-tcp-packets-using.html' title='Sending customized TCP packets using jpcap and libpcap'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-8461567544363980132</id><published>2009-01-26T15:03:00.003-05:00</published><updated>2009-01-26T15:08:34.474-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='candidacy'/><category scheme='http://www.blogger.com/atom/ns#' term='netserv'/><category scheme='http://www.blogger.com/atom/ns#' term='ta'/><title type='text'>Spring 2009: NetServ + candidacy + TA</title><content type='html'>As the Spring 2009 semester begins, I am hitting the ground running for my &lt;a href="http://www.cs.columbia.edu/education/phd/requirements/candidacy"&gt;candidacy exam&lt;/a&gt; in late Feb. My topic is "&lt;span style="font-style: italic;"&gt;Ubiquitous Communication Models for Different Network Scenarios&lt;/span&gt;."&lt;br /&gt;&lt;br /&gt;While at it, I am also reading up on the following topics for the NetServ project, which I will soon start work on:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://read.cs.ucla.edu/click/"&gt;Click Modular Router&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.openflowswitch.org/"&gt;OpenFlow Switch&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;And, finally, I am TAing the &lt;a href="http://bank.cs.columbia.edu/classes/cs6125/"&gt;COMS6125 Web Enhanced Information Management&lt;/a&gt; again this semester.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-8461567544363980132?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/8461567544363980132/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=8461567544363980132' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/8461567544363980132'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/8461567544363980132'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2009/01/spring-2009-netserv-candidacy-ta.html' title='Spring 2009: NetServ + candidacy + TA'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-6240785414614709165</id><published>2009-01-07T11:53:00.001-05:00</published><updated>2009-01-07T11:56:33.086-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='conference'/><title type='text'>The Beginnings of Spring 2009</title><content type='html'>Back to work for Spring 2009. I am now done with courses - its a wonderful feeling to not have to be aware of when the semester starts and ends. :D Well, except I am TAing Web-Enhanced Information Management again this Spring semester... and am looking forward to it.&lt;br /&gt;&lt;br /&gt;The downside is: I do start working on research two weeks before school starts ... but that's OK.&lt;br /&gt;&lt;br /&gt;Right now, two items require my fullest attention:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Preparing my presentation for the IEEE CCNC research conference on the BonAHA framework (this weekend!)&lt;/li&gt;&lt;li&gt;Finalizing the list of papers for my candidacy exam (which will be in mid-Feb? I hope?)&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-6240785414614709165?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/6240785414614709165/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=6240785414614709165' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/6240785414614709165'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/6240785414614709165'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2009/01/beginnings-of-spring-2009.html' title='The Beginnings of Spring 2009'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-5342393170220569779</id><published>2008-11-07T12:25:00.003-05:00</published><updated>2008-11-07T12:30:41.285-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='parallel computing'/><title type='text'>Parallel computing and communication/network models - the "parallels"</title><content type='html'>Apologies for the pun, but one of my readings over the last week has been to read up on parallel computing in order to find some parallels between the opportunistic applications I have been working on (such as 7DS) and parallel computing.&lt;br /&gt;&lt;br /&gt;Even though the two topics look different, there are actually several points in common.&lt;br /&gt;&lt;br /&gt;Below is a list of topics, extracted from the textbook &lt;a style="font-style: italic;" href="http://www.amazon.com/Parallel-Distributed-Computing-Handbook-Albert/dp/0070730202"&gt;Parallel &amp;amp; Distributed Computing Handbook&lt;/a&gt; by Albert H. Zomaya, published by McGraw-Hill.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;PRAM (Parallel RAM) model; Methods for distributing and parallelizing algorithms&lt;/li&gt;&lt;li&gt;Failures in parallel systems (Byzantine, other)&lt;/li&gt;&lt;li&gt;Dataflow models&lt;/li&gt;&lt;li&gt;Checkpointing (for recovery)&lt;/li&gt;&lt;li&gt;Distributed software systems (this is similar to RMI)&lt;/li&gt;&lt;li&gt;Data structures for parallel processing&lt;/li&gt;&lt;li&gt;Shared memory, memory consistency&lt;/li&gt;&lt;/ul&gt;More details to come soon.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-5342393170220569779?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/5342393170220569779/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=5342393170220569779' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/5342393170220569779'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/5342393170220569779'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2008/11/parallel-computing-and.html' title='Parallel computing and communication/network models - the &quot;parallels&quot;'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-1011412729149040713</id><published>2008-10-22T11:40:00.001-04:00</published><updated>2008-10-22T11:41:36.671-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='irt'/><title type='text'>Finished BibTex on IRT publications page</title><content type='html'>Today I fixed up the BibTeX links on the &lt;a href="http://www.cs.columbia.edu/irt/publications"&gt;IRT publications&lt;/a&gt; page. I also changed the links so they open in a new, smaller window (like a dialog.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-1011412729149040713?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/1011412729149040713/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=1011412729149040713' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/1011412729149040713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/1011412729149040713'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2008/10/finished-bibtex-on-irt-publications.html' title='Finished BibTex on IRT publications page'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-6471494874805794475</id><published>2008-10-15T13:41:00.002-04:00</published><updated>2008-10-15T13:44:22.704-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='paper'/><title type='text'>Papers related to communication/networking middleware: IEEE Network</title><content type='html'>Am on the trail of papers related to work on communications or networking middleware from a high-level perspective. Been reading IEEE Network publication online all day, and found some interesting issues as well as articles that may be quite relevant:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;(2008) Vol 22, Issue 4: Context aware networks, in mobile scenarios (whole issue)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;(2007) Vol 21, Issue 4: GE Network Systems Architecture (whole issue)&lt;/li&gt;&lt;li&gt;(2006) Vol 20, Issue 4: VON: a scalable peer-to-peer network for virtual environments (this paper has analysis of other P2P-based NVE systems)&lt;/li&gt;&lt;li&gt;(2006) Vol 20, Issue 3: A survey of transport protocols for wireless sensor networks&lt;/li&gt;&lt;li&gt;(2004) Vol 18, Issue 1: GE Middleware technologies for future communication networks (whole issue, and is very good)&lt;/li&gt;&lt;/ul&gt;Among other things:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Registered and uploading final version of paper for CCNC 2009 conference.&lt;/li&gt;&lt;li&gt;Testing the new WORKIT box, which may be the final version of the box we will ship&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-6471494874805794475?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/6471494874805794475/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=6471494874805794475' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/6471494874805794475'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/6471494874805794475'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2008/10/papers-related-to-communicationnetworki.html' title='Papers related to communication/networking middleware: IEEE Network'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-549526563059592704</id><published>2008-10-07T15:44:00.003-04:00</published><updated>2008-10-07T15:48:13.471-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bookmark'/><title type='text'>Grid computing and P2P resource discovery</title><content type='html'>Excellent survey paper on various programming models in grid computing, which relates very closely to what I am looking into in finding programming models for the get/set and distributed network computing environment at large: "&lt;a href="http://doi.wiley.com/10.1002/0470867167.ch21"&gt;Grid Programming Models: Current Tools, Issues and Directions&lt;/a&gt;".&lt;br /&gt;&lt;br /&gt;Another related work paper is "&lt;a href="http://portal.acm.org/citation.cfm?id=1101510"&gt;Peer-to-Peer Resource Discovery in Mobile Grids&lt;/a&gt;," which defines a P2P service discovery protocol/framework for mobile environments.&lt;br /&gt;&lt;br /&gt;One other direction I am currently looking into is the relationship between grid computing, cloud computing and the mobile distributed computing I am working on...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-549526563059592704?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/549526563059592704/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=549526563059592704' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/549526563059592704'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/549526563059592704'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2008/10/grid-computing-and-p2p-resource.html' title='Grid computing and P2P resource discovery'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-2711098051181687901</id><published>2008-10-06T16:33:00.002-04:00</published><updated>2008-10-06T16:39:56.702-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bookmark'/><title type='text'>Network programming: scalable web servers and Java NIO</title><content type='html'>While looking for network programming APIs for my candidacy, I came across two excellent papers/presentations which are not directly related to my topic, but I need to bookmark in any case...&lt;br /&gt;&lt;br /&gt;The first one is &lt;a href="http://bulk.fefe.de/scalable-networking.pdf"&gt;Scalable Network Programming: Or: The Quest For A Good Web Server (That Survives Slashdot)&lt;/a&gt; by Felix von Leitner. It talks about the problems of building scalable web servers, from ground up, including looking at fork() code, the time involved, measurements, comparison with threads, etc. An excellent read for people who know scaling web applications is hard, but would like to know more of why from an "under the hood" approach.&lt;br /&gt;&lt;br /&gt;The second one, &lt;a href="http://www.cs.uiuc.edu/class/fa07/cs438/slides/CS438-03.JavaNetworking.pdf"&gt;Improving Java Network Programming&lt;/a&gt;, by Brian Runk, is a simple application-level presentation, but compares the java.net and java.nio packages and discusses practical issues that arise while programming large-scale enterprise systems like ones built at Morgan Stanley.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-2711098051181687901?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/2711098051181687901/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=2711098051181687901' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/2711098051181687901'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/2711098051181687901'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2008/10/network-programming-scalable-web.html' title='Network programming: scalable web servers and Java NIO'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-3932434092960371451</id><published>2008-10-01T11:47:00.002-04:00</published><updated>2008-10-01T11:51:39.713-04:00</updated><title type='text'>Sockets over HTTP: Comet and Orbited</title><content type='html'>After my talk on "Disruption Tolerant Applications in Opportunistic Networks" at the IRT meeting yesterday, I found some interesting info about sockets over HTTP using Javascript.&lt;br /&gt;&lt;br /&gt;The Javascript implementation, called &lt;a href="http://orbited.org/"&gt;Orbited&lt;/a&gt;, claims to provide a TCP socket over a web browser. Sounds like a really interesting concept. A slightly outdated tutorial on &lt;a href="http://www.orbited.org/wiki/0.5/JavaScriptIRCClientTutorial"&gt;writing an IRC client using Orbited&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;This is related to a neologism called &lt;a href="http://en.wikipedia.org/wiki/Comet_%28programming%29"&gt;Comet&lt;/a&gt;, which is "a web application model in which a long-held HTTP request allows a web server to push data to a browser, without the browser explicitly requesting it." (quote from Wikipedia's entry on Comet.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-3932434092960371451?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/3932434092960371451/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=3932434092960371451' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/3932434092960371451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/3932434092960371451'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2008/10/sockets-over-http-comet-and-orbited.html' title='Sockets over HTTP: Comet and Orbited'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-4057679762492892205</id><published>2008-09-26T10:47:00.002-04:00</published><updated>2008-09-26T10:55:06.398-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bonaha'/><category scheme='http://www.blogger.com/atom/ns#' term='wireless'/><title type='text'>Related work: Market Contact Protocol</title><content type='html'>An interesting Master's thesis called "&lt;a href="http://arxiv.org/abs/0809.4395"&gt;Content Sharing for Mobile Device&lt;/a&gt;s" has an extremely comprehensive and complete look at the problem of finding and sharing content with other local mobile devices.&lt;br /&gt;&lt;br /&gt;The thesis has excellent documentation comparing DHTs, overlay networks and other related work in this field.&lt;br /&gt;&lt;br /&gt;The simulation and datasets in the thesis are also very comprehensive, and may be helpful if we ever do a simulation ourselves in this field.&lt;br /&gt;&lt;br /&gt;The implementation itself, a protocol called "Market Contact Protocol" - at first glance - seems very similar to what we are doing with the &lt;a href="http://bonaha.sourceforge.net/"&gt;BonAHA&lt;/a&gt; project, and related work such as &lt;a href="http://www.daimi.au.dk/%7Ebentor/LightPeers/"&gt;LightPeers&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-4057679762492892205?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/4057679762492892205/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=4057679762492892205' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/4057679762492892205'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/4057679762492892205'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2008/09/related-work-market-contact-protocol.html' title='Related work: Market Contact Protocol'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-7111679038753827054</id><published>2008-09-25T10:39:00.002-04:00</published><updated>2008-09-25T10:47:44.975-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bonaha'/><category scheme='http://www.blogger.com/atom/ns#' term='mobile'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Nokia n800, Python, Bonjour and mDNS</title><content type='html'>A project student has the task of developing useful 7DS-like applications on our lab's Nokia n800, so we went searching for how to develop applications on this platform.&lt;br /&gt;&lt;br /&gt;It appears that &lt;a href="http://python.about.com/b/2007/01/22/who-needs-the-iphone-programming-python-on-the-nokia-n800.htm"&gt;Python is the Nokia n800's programming language of choice&lt;/a&gt; - &lt;a href="http://forums.java.net/jive/message.jspa?messageID=243634"&gt;tough luck for Java&lt;/a&gt;. So we would have to start working with Python and developing our framework in that language.&lt;br /&gt;&lt;br /&gt;In order to use Bonjour on Python for the Nokia, we need the &lt;a href="http://o2s.csail.mit.edu/o2s-wiki/pybonjour"&gt;pyBonjour&lt;/a&gt; library.&lt;br /&gt;&lt;br /&gt;We also need to install the Bonjour mDNSd daemon for handling mDNS packets - or Avahi, which is more supported on Linux. A look around reveals that &lt;a href="http://lists.freedesktop.org/archives/avahi/2007-June/001081.html"&gt;Avahi is available&lt;/a&gt; on the Nokia n800 through the &lt;a href="http://openbossa.indt.org/canola/"&gt;Canola&lt;/a&gt; project.&lt;br /&gt;&lt;br /&gt;But for pyBonjour to work with Avahi, the binary-compatibility layer with Bonjour need to be installed [&lt;a href="https://launchpad.net/ubuntu/gutsy/+package/libavahi-compat-libdnssd1"&gt;libdnssd1&lt;/a&gt; and &lt;a href="https://launchpad.net/ubuntu/gutsy/+package/libavahi-compat-libdnssd-dev"&gt;libdnssd-dev&lt;/a&gt;].&lt;br /&gt;&lt;br /&gt;There are existing demo applications (&lt;a href="http://mosh.nokia.com/content/4E742C3A36D5D162E040050A44306645"&gt;one&lt;/a&gt; and &lt;a href="http://www.peekpoke.fi/jarnoh/mws/"&gt;two&lt;/a&gt;) on Nokia using Bonjour. Both seem to relate to web servers.&lt;br /&gt;&lt;br /&gt;Some more info about &lt;a href="http://www.razorvine.net/python/PyroFuture"&gt;Python and mDNS from razorvine&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-7111679038753827054?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/7111679038753827054/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=7111679038753827054' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/7111679038753827054'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/7111679038753827054'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2008/09/nokia-n800-python-bonjour-and-mdns.html' title='Nokia n800, Python, Bonjour and mDNS'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-8894693112289840101</id><published>2008-09-18T14:34:00.004-04:00</published><updated>2008-09-19T11:35:08.869-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bonaha'/><title type='text'>Data-object vs communication P2P applications</title><content type='html'>It appears that there are two sets of applications that BonAHA (or any ad-hoc network framework) will have to cover and address:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Data-object and file-oriented&lt;/span&gt;: In this sort of application, the most important topic are the files and the data themselves, not necessarily the location of these. E.g.: file sharing, file synchronization, chat&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Person-to-person communication&lt;/span&gt;: In this sort of app, the focus is on the person to communicate with (not even the node itself, which is an abstraction, but the person). For example: drag-and-drop file sharing, instant message&lt;/li&gt;&lt;/ul&gt;So, BonAHA will have to address which of these two models it will be targetting - and if it can, and will, target both classes of applications.&lt;br /&gt;&lt;br /&gt;DHTs actually handle the data-object model very well, expect that their setting up of an overlay network and additional network traffic in networks with heavy churn leaves much to be desired for &lt;a href="http://en.wikipedia.org/wiki/Mobile_ad-hoc_network"&gt;MANET&lt;/a&gt; applications.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-8894693112289840101?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/8894693112289840101/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=8894693112289840101' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/8894693112289840101'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/8894693112289840101'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2008/09/data-object-vs-communication-p2p.html' title='Data-object vs communication P2P applications'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-1450582104301737224</id><published>2008-09-18T14:34:00.002-04:00</published><updated>2008-09-18T14:41:43.380-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bonaha'/><category scheme='http://www.blogger.com/atom/ns#' term='7DS'/><title type='text'>mDNS and DHT-related work</title><content type='html'>This was a very productive week in looking forward to working more on the BonAHA framework and our architecture for disconnected ad-hoc networks.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;mDNS and DNS-SD: Reading the specifications again, particularly focusing on their handling of:&lt;br /&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Packet size: How does it deal with large packets? What is the maximum packet size?&lt;/li&gt;&lt;li&gt;iChat TXT record data: iChat exchanges its avatars using DNS-SD. But how large is it? What are the tradeoffs?&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;In terms of related work, here are some items I looked at this week that seem related to 7DS and the BonAHA framework:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://tools.ietf.org/html/draft-ietf-p2psip-reload-00#section-4"&gt;P2PSIP RELOAD&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.cs.gsu.edu/%7Eyes/whitepapers.html"&gt;System on Mobile Devices, SyD&lt;/a&gt; (A paper from this got accepted at Usenix 2004)&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.limofoundation.org/"&gt;LIMO&lt;/a&gt;: But this doesn't actually seem to have much relationship to 7DS/BonAHA work - it seems to be an overall, comprehensive&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-1450582104301737224?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/1450582104301737224/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=1450582104301737224' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/1450582104301737224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/1450582104301737224'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2008/09/mdns-and-dht-related-work.html' title='mDNS and DHT-related work'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-6062303303443922514</id><published>2008-09-02T12:37:00.003-04:00</published><updated>2008-09-02T12:39:32.859-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='courses'/><category scheme='http://www.blogger.com/atom/ns#' term='web'/><title type='text'>Updated website + Fall courses</title><content type='html'>As Fall semester rolls around, I decided to start it off by updating my website to use a new template - &lt;a href="http://www.freecsstemplates.org/preview/concrete"&gt;Concrete&lt;/a&gt; on FreeCSSTemplates.org. (PS: FreeCSSTemplates.org has some great, simple and totally free CSS templates for your website.)&lt;br /&gt;&lt;br /&gt;I will end up taking "Analysis of Algorithms, I" this semester and may end up auditing the "Artificial Intelligence" course if possible...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-6062303303443922514?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/6062303303443922514/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=6062303303443922514' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/6062303303443922514'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/6062303303443922514'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2008/09/updated-website-fall-courses.html' title='Updated website + Fall courses'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-3966847855332325927</id><published>2008-08-22T13:41:00.003-04:00</published><updated>2008-08-22T13:54:09.533-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><category scheme='http://www.blogger.com/atom/ns#' term='web'/><title type='text'>WORKIT website now detects duplicate usernames; gives error messages</title><content type='html'>The WORKIT website now gives error messages properly for two common reasons:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Duplicate username&lt;/li&gt;&lt;li&gt;Empty fields&lt;/li&gt;&lt;/ol&gt;I have put up &lt;a href="http://sumanrs.wordpress.com/2008/08/22/registration-error-messages-javascript-redirect/"&gt;the code here&lt;/a&gt; since Blogger's code highlighting system isn't too good.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-3966847855332325927?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/3966847855332325927/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=3966847855332325927' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/3966847855332325927'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/3966847855332325927'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2008/08/workit-website-now-detects-duplicate.html' title='WORKIT website now detects duplicate usernames; gives error messages'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-5681567963347524743</id><published>2008-08-19T15:30:00.004-04:00</published><updated>2008-08-19T15:40:09.219-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='workit'/><category scheme='http://www.blogger.com/atom/ns#' term='web'/><title type='text'>Change to a new DB server</title><content type='html'>&lt;ol&gt;&lt;li&gt;Tis the day the WORKIT website moved to a new DB server, the shared MySQL server ... so we don't intrude on department MySQL server space. Requires a bit of recoding on my part to get the WORKIT website working with the new server.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Also, found that users can create duplicate entries with same username - that's a no-no. Need to fix this.&lt;/li&gt;&lt;li&gt;The Physics Machine Shop and I played phone tag today - we finally decided to meet on Thursday to finalize the hardware setup for the remaining baseline kits.&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-5681567963347524743?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/5681567963347524743/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=5681567963347524743' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/5681567963347524743'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/5681567963347524743'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2008/08/change-to-new-db-server.html' title='Change to a new DB server'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-3270562737613898472</id><published>2008-08-15T13:37:00.002-04:00</published><updated>2008-08-15T13:39:49.840-04:00</updated><title type='text'>vi / vim extra tabs during paste - solved</title><content type='html'>I've had this annoying problem with vi / vim ever since I started to use it - whenever you copy text and paste it into vi or vim, it indents each additional line with an extra tab, rendering it completely unreadable and requiring manual editing.&lt;br /&gt;&lt;br /&gt;Luckily, I was able to find help on Google groups and the &lt;a href="http://vim.wikia.com/wiki/VimTip906"&gt;Wikia Vim&lt;/a&gt; pages. Solving this problem is as easy as typing in the command:&lt;br /&gt;&lt;pre&gt;:set paste&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;That worked for me!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-3270562737613898472?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/3270562737613898472/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=3270562737613898472' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/3270562737613898472'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/3270562737613898472'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2008/08/vi-vim-extra-tabs-during-paste-solved.html' title='vi / vim extra tabs during paste - solved'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-7026462678557201817</id><published>2008-08-15T12:47:00.001-04:00</published><updated>2008-08-15T12:48:22.122-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wireless'/><title type='text'>Wireless cards, antennas and connectors</title><content type='html'>Today I hunted down a wireless antenna-cable combo to go with our wireless card, the &lt;a href="http://www.oxfordtec.com/us/p170/Gigabyte-GN-WIAG02-wireless-Atheros-AR5005GS-Super-G-chipset-mini-pci-card/product_info.html"&gt;Atheros-based Gigabyte GN-WIAG02&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I didn't realize that there were different forms of cables and antenna for wireless cards, so I had to learn more about these.&lt;br /&gt;&lt;br /&gt;I found out on &lt;a href="http://www.hyperlinktech.com/"&gt;Hyper Link Tech&lt;/a&gt; that there are several types of these. Because the Gigabyte card is a 802.11 b/g, which runs on the 2.4GHz frequency, what I needed was a 2.4 GHz rubber duck antenna. 5 dBi seems to be fine for the WORKIT testbed.&lt;br /&gt;&lt;br /&gt;There were some helpful pages on &lt;a href="http://wireless.gumph.org/content/3/7/011-cable-connectors.html"&gt;gumph.org&lt;/a&gt; and &lt;a href="http://www.seattlewireless.net/ConnectorsAndCable"&gt;Seattle Wireless&lt;/a&gt; that helped me find out more about the antenna, cables and connectors that are needed for wireless.&lt;br /&gt;&lt;br /&gt;It appears that the most common connector for the miniPCI based wireless cards is the &lt;a href="http://en.wikipedia.org/wiki/MMCX_connector"&gt;MMCX connector&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Finally decided to get the &lt;a href="http://www.cdw.com/shop/products/default.aspx?EDC=1244014"&gt;AOpen wireless antenna&lt;/a&gt;, which appears to have the antenna as well as the cables needed to fit the antenna onto the kit.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-7026462678557201817?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/7026462678557201817/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=7026462678557201817' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/7026462678557201817'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/7026462678557201817'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2008/08/wireless-cards-antennas-and-connectors.html' title='Wireless cards, antennas and connectors'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-380413758588728315</id><published>2008-08-08T15:56:00.003-04:00</published><updated>2008-08-08T16:05:58.375-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='design'/><title type='text'>Rich UIs in Java: themes and fade animations</title><content type='html'>I was looking for ways to improve the look and feel of Java applications - for presenting my Java-based research work as a nice-looking app and for demos. I was inspired by some of the &lt;a href="http://scalenine.com/"&gt;Adobe AIR themes&lt;/a&gt; out there, and I found some interesting stuff.&lt;br /&gt;&lt;br /&gt;Among the many &lt;a href="http://en.wikipedia.org/wiki/Pluggable_look_and_feel"&gt;Swing Pluggable Look-and-Feel&lt;/a&gt; solutions is one that really stands out - &lt;a href="https://substance.dev.java.net/"&gt;Substance&lt;/a&gt;. It looks absolutely phenomenal, with a variety of options and customizations, plus its open-source. It easily stands out as a must-use PLAF for Swing. Take a look at some &lt;a href="https://substance.dev.java.net/docs/skins/toneddown.html"&gt;Substance screenshots&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;There's that for themes ... but how about fade effects and transitions?&lt;br /&gt;&lt;br /&gt;A little bit more searching reveals the &lt;a href="http://weblogs.java.net/blog/kirillcool/archive/2006/09/animating_layou.html"&gt;animation layer&lt;/a&gt;, which includes transitions - in fact, automated transitions with no changes to app code! You need to see the above link for yourself to believe it.&lt;br /&gt;&lt;br /&gt;Apparently, this &lt;a href="https://laf-widget.dev.java.net/docs/fade-animations.html"&gt;fade animations&lt;/a&gt; is part of the &lt;a href="https://laf-widget.dev.java.net/"&gt;laf-widget project&lt;/a&gt; now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-380413758588728315?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/380413758588728315/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=380413758588728315' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/380413758588728315'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/380413758588728315'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2008/08/rich-uis-in-java-themes-and-fade.html' title='Rich UIs in Java: themes and fade animations'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-180318047777679313</id><published>2008-08-07T12:23:00.003-04:00</published><updated>2008-08-07T12:31:29.729-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kernel'/><title type='text'>insmod, kernel versions, modules and Linux distros</title><content type='html'>The joy of working with kernel versions and kernel modules.&lt;br /&gt;&lt;br /&gt;So after spending a long time finally getting a modpost program running so I could build kernel modules, I was finally able to get them to compile. However, I found that the modules were not loading - insmod and modprobe gave a very unhelpful "-1 Invalid module format" error.&lt;br /&gt;&lt;br /&gt;A little bit of searching around for "kernel modules" lead me to the helpful &lt;a href="http://tldp.org/HOWTO/Module-HOWTO/"&gt;Linux Loadable Kernel Module HOWTO&lt;/a&gt;. A page titled &lt;a href="http://tldp.org/HOWTO/Module-HOWTO/x627.html#MODINFO"&gt;Technical details&lt;/a&gt; provides the full details about how to find information about the module.&lt;br /&gt;&lt;br /&gt;I was able to confirm that the module had compiled properly, and that it was atleast displaying the right meta-information. So what had gone wrong?&lt;br /&gt;&lt;br /&gt;A search for the actual error message "invalid module format" led me to a forum discussion on &lt;a href="http://www.linuxquestions.org/questions/linux-hardware-18/insmod-invalid-module-format-280500/"&gt;Linuxquestions.org about insmod&lt;/a&gt;, where one poster suggesting using 'dmesg' to find out the details of the error.&lt;br /&gt;&lt;br /&gt;Excellent information. A line in dmesg shows:&lt;br /&gt;&lt;pre&gt;No module found in object&lt;br /&gt;kaodv: version magic '2.6.20.1 preempt mod_unload 486'&lt;br /&gt;should be '2.6.20-486-voyage preempt mod_unload 486'&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Perhaps because I used the Debian Voyage kernel instead of the Voyage kernel sources? :( And after all the trouble I went through in finding a corresponding kernel source and building the tree and the toolkit...&lt;br /&gt;&lt;br /&gt;Maybe there's a way to just rename just the kernel name, since everything else seems to match ... stay tuned.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-180318047777679313?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/180318047777679313/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=180318047777679313' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/180318047777679313'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/180318047777679313'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2008/08/insmod-kernel-versions-modules-and.html' title='insmod, kernel versions, modules and Linux distros'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-1123043069637015666</id><published>2008-08-06T16:00:00.002-04:00</published><updated>2008-08-06T16:06:50.898-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='workit'/><category scheme='http://www.blogger.com/atom/ns#' term='kernel'/><title type='text'>The insmod / modprobe hurdle</title><content type='html'>Today, I hit a brick wall with insmod/modprobe in installing/setting up AODV on the Linux kernel.&lt;br /&gt;&lt;br /&gt;I was able to successfully compile the module, including the kernel object files. It appeared that the modpost compilation/linking worked perfectly as well.&lt;br /&gt;&lt;br /&gt;However, a problem came up when running the start.sh script provided - it said that it could not find the "kaodv" module, which had been compiled in the current directory.&lt;br /&gt;&lt;br /&gt;Perhaps it had not been loaded into memory properly. However,&lt;a href="http://linuxgazette.net/issue32/tag_startup.html"&gt; insmod /modprobe&lt;/a&gt; failed to find and load the module as well.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-1123043069637015666?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/1123043069637015666/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=1123043069637015666' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/1123043069637015666'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/1123043069637015666'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2008/08/insmod-modprobe-hurdle.html' title='The insmod / modprobe hurdle'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-4547676282021306420</id><published>2008-07-16T13:36:00.001-04:00</published><updated>2008-12-09T17:55:02.988-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kernel'/><title type='text'>modpost can now compile kernel modules</title><content type='html'>After &lt;a href="http://sumancolumbia.blogspot.com/2008/07/long-voyage-modpost-to-work-and-compile.html"&gt;my last post&lt;/a&gt; (which took quite a while to build all modules), modpost finally works and is able to compile kernel modules! Screenshot attached...&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_23p_82zlC3M/SH4x8l_g0pI/AAAAAAAAAAw/rxtqK6521y8/s1600-h/modpost_success.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_23p_82zlC3M/SH4x8l_g0pI/AAAAAAAAAAw/rxtqK6521y8/s320/modpost_success.png" alt="" id="BLOGGER_PHOTO_ID_5223667534856770194" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-4547676282021306420?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/4547676282021306420/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=4547676282021306420' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/4547676282021306420'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/4547676282021306420'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2008/07/modpost-can-now-compile-kernel-modules.html' title='modpost can now compile kernel modules'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_23p_82zlC3M/SH4x8l_g0pI/AAAAAAAAAAw/rxtqK6521y8/s72-c/modpost_success.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-4003460708604476504</id><published>2008-07-16T11:20:00.003-04:00</published><updated>2008-07-16T11:49:15.849-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='workit'/><category scheme='http://www.blogger.com/atom/ns#' term='kernel'/><title type='text'>Long "voyage": modpost to work and compile</title><content type='html'>Ah... after weeks of hacking through kernel code and Makefiles, I am finally able to compile and run modpost , for compiling my kernel modules on Voyage Linux 0.4.&lt;br /&gt;&lt;br /&gt;This is the story: I need to install some additional kernel modules for the WORKIT project on Voyage. All of the kernel modules pass step 1 of the Makefile, and they compile, but then I get the error:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;Building modules, stage 2.&lt;br /&gt;MODPOST 1 modules&lt;br /&gt;/bin/sh: scripts/mod/modpost: No such file or directory&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;A long search for modpost lead me to find that modpost is used for compiling modules, and is part of the kernel development tools (sorry, missing the link for that post, and couldn't find it again on Google - tells you how exotic this modpost is.)&lt;br /&gt;&lt;br /&gt;After a lot more trial and error - which included downloading and trying to recompile the Voyage Linux kernels - I found two posts today that helped immensely in coming to the last step:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.linuxforums.org/forum/linux-kernel/108863-no-modpost-directory.html"&gt;No modpost directory - Linux Forums&lt;/a&gt; : helped me realize how to build the modpost (but it was referencing the wrong directory; on my Voyage Linux, the code is at /lib/modules/2.6.20-486-voyage/build)&lt;/li&gt;&lt;/ul&gt;But I got the exact same error message as in the forum post: unrecognized command line option "-m".&lt;br /&gt;&lt;br /&gt;I copied the makefile command, removed the -m directive, and tried compiling again and got a "missing elfconfig.h" error message and other errors dependent on that.&lt;br /&gt;&lt;br /&gt;A search for "elfconfig.h" led me to a post of the &lt;a href="http://linux.derkeiler.com/Mailing-Lists/Kernel/2007-06/msg03718.html"&gt;Linux kernel mailing list about missing elfconfig.h&lt;/a&gt; which hints at running "make modules" and "make scripts".&lt;br /&gt;&lt;br /&gt;Running those two commands on the /lib/modules/2.6.20-486-voyage/build directory solves the problem - it creates the elfconfig.h (!) file and compiles modpost. (Expect this to take a while - it makes all modules and scripts.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-4003460708604476504?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/4003460708604476504/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=4003460708604476504' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/4003460708604476504'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/4003460708604476504'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2008/07/long-voyage-modpost-to-work-and-compile.html' title='Long &quot;voyage&quot;: modpost to work and compile'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-3554717107088611328</id><published>2008-07-11T13:14:00.003-04:00</published><updated>2008-07-11T13:17:57.296-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bonaha'/><category scheme='http://www.blogger.com/atom/ns#' term='workit'/><title type='text'>CCNC BonAHA paper + iptables save</title><content type='html'>Sorry, been missing a week since I was finishing up my BonAHA paper for &lt;a href="http://www.ieee-ccnc.org/2009/"&gt;CCNC 2009&lt;/a&gt; ... along with finalizing the &lt;a href="http://bonaha.sourceforge.net/"&gt;BonAHA SourceForge&lt;/a&gt; website to be ready for the paper submission.&lt;br /&gt;&lt;br /&gt;I also discovered that for some reason, my &lt;a href="http://sumancolumbia.blogspot.com/2008/06/and-linux-is-now-wireless-ap-router.html"&gt;iptables configuration outlined in And Linux is now a wireless AP router&lt;/a&gt; doesn't have each time I shutdown or reboot ... which means that I have to reenter it each time.&lt;br /&gt;&lt;br /&gt;The usual way I find this out is by trying to connect a laptop to the AP to test it ... only to find that I am not able to access the Internet through it (I get an IP address fine, meaning DHCP works.)&lt;br /&gt;&lt;br /&gt;And running "iptables-save" doesn't work either ... so apparently, I have to find another way to save the iptables configuration for the box.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-3554717107088611328?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/3554717107088611328/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=3554717107088611328' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/3554717107088611328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/3554717107088611328'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2008/07/ccnc-bonaha-paper-iptables-save.html' title='CCNC BonAHA paper + iptables save'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-8684986027127626284</id><published>2008-06-25T14:24:00.003-04:00</published><updated>2008-06-25T15:39:41.923-04:00</updated><title type='text'>Need ncurses, module-assistant to build Linux kernel?</title><content type='html'>I think I may be getting somewhere with my compile problems for building Linux kernel modules for Voyage.&lt;br /&gt;&lt;br /&gt;First of all, &lt;a href="http://www.stanchina.net/%7Eflavio/debian/fglrx-archive/msg00955.html"&gt;modpost apparently comes with linux-headers&lt;/a&gt; and is built when the kernel source is run with a "make" command.&lt;br /&gt;&lt;br /&gt;Secondly, &lt;a href="http://kernel-handbook.alioth.debian.org/ch-common-tasks.html"&gt;building the kernel apparently requires ncurses&lt;/a&gt;, which was causing most of my module build scripts to fail.&lt;br /&gt;&lt;br /&gt;Several posts are recommending moving from modpost to &lt;a href="http://olympus.het.brown.edu/cgi-bin/man/man2html?m-a+8"&gt;module-assistant for Debian&lt;/a&gt; (and &lt;a href="http://www.punknix.com/?q=node/110"&gt;here&lt;/a&gt;) ... but alas, most modules I am working with are already configured to work with modpost. :( But something to keep in mind if I am writing my own kernel modules.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;UPDATE, June 25, 2008 3:45 pm:&lt;/span&gt; I installed ncurses using this command:&lt;br /&gt;&lt;pre&gt;apt-get install libncurses-dev&lt;/pre&gt;&lt;br /&gt;and I could indeed build the kernel without any problems.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-8684986027127626284?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/8684986027127626284/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=8684986027127626284' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/8684986027127626284'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/8684986027127626284'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2008/06/need-ncurses-module-assistant-to-build.html' title='Need ncurses, module-assistant to build Linux kernel?'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-4051900513659000358</id><published>2008-06-18T13:15:00.004-04:00</published><updated>2008-06-18T13:20:37.807-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>And Linux is now a wireless AP router</title><content type='html'>I followed the instructions in the &lt;a href="http://www.yolinux.com/TUTORIALS/LinuxTutorialIptablesNetworkGateway.html"&gt;YoLinux article on making the Linux gateway&lt;/a&gt; ... and it works perfectly. The WORKIT AP now functions as a gateway router, instead of the bridge as it was earlier. (The LinuxJournal article mentioned in my previous post is a little old at this point.)&lt;br /&gt;&lt;br /&gt;I just had to follow the instructions to set up the gateway. This is what I used for the WORKIT AP (eth0 is my wired WAN connection and ath0 is the wireless LAN):&lt;br /&gt;&lt;pre&gt;   # Delete and flush. Default table is "filter". Others like "nat" must be explicitly stated.&lt;br /&gt;  # Flush all the rules in filter and nat tables&lt;br /&gt;  iptables --flush           &lt;br /&gt;  iptables --table nat --flush&lt;br /&gt;  # Delete all chains that are not in default filter and nat table&lt;br /&gt;  iptables --delete-chain    &lt;br /&gt;  iptables --table nat --delete-chain&lt;br /&gt;&lt;br /&gt;  # Set up IP FORWARDing and Masquerading&lt;br /&gt;  iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE&lt;br /&gt;  iptables --append FORWARD --in-interface ath0 -j ACCEPT&lt;br /&gt;&lt;br /&gt;  # Enables packet forwarding by kernel&lt;br /&gt;  echo 1 &gt; /proc/sys/net/ipv4/ip_forward             &lt;/pre&gt;&lt;br /&gt;Also, while instructions exist for both iptables and ipchains, you will find yourself using the iptables rules since ipchains was RIP after Linux 2.4 came out.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-4051900513659000358?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/4051900513659000358/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=4051900513659000358' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/4051900513659000358'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/4051900513659000358'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2008/06/and-linux-is-now-wireless-ap-router.html' title='And Linux is now a wireless AP router'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-8935867171296471616</id><published>2008-06-17T14:18:00.004-04:00</published><updated>2008-06-17T14:24:45.224-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='workit'/><category scheme='http://www.blogger.com/atom/ns#' term='wireless'/><title type='text'>Setting up a Linux AP: Bridge vs. router</title><content type='html'>Now that I have DHCP and DNS set up, the last thing I need to do is set up the WORKIT box to act as a complete AP by bridging the wireless (LAN) and wired (WAN) connections.&lt;br /&gt;&lt;br /&gt;I naively followed linux.com's instructions on &lt;a href="http://www.linux.com/articles/55617"&gt;setting up a wireless AP by bridging the connections&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I was surprised to see that it completely broke the DHCP/DNS/gateway system I had set up -  my wireless client instead picked up the IP address (DNS and DHCP) from the department's regular network. And my "gateway" (the WORKIT AP) had "disappeared", since I was not being assigned an IP address from it and was not on its internal network (10.0.0.x) that I had set up.&lt;br /&gt;&lt;br /&gt;What had happened? I finally realized I had set up Linux on the WORKIT AP as a glorified wireless bridge (think switch/hub), not a router!&lt;br /&gt;&lt;br /&gt;What I now need to do is set up Linux to act as a gateway, so the WORKIT AP acts completely as a full AP.&lt;br /&gt;&lt;br /&gt;A little more search leads to &lt;a href="http://www.yolinux.com/TUTORIALS/LinuxTutorialIptablesNetworkGateway.html"&gt;YoLinux's article on setting up a Linux gateway&lt;/a&gt; and &lt;a href="http://www.linuxjournal.com/article/3866"&gt;on Linux Journal&lt;/a&gt; as well. Basically, this involves a little fiddling around with iptables...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-8935867171296471616?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/8935867171296471616/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=8935867171296471616' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/8935867171296471616'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/8935867171296471616'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2008/06/setting-up-linux-ap-bridge-vs-router.html' title='Setting up a Linux AP: Bridge vs. router'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-5460692929562178539</id><published>2008-06-17T11:38:00.002-04:00</published><updated>2008-06-17T11:42:34.830-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='workit'/><title type='text'>Installing Kernel AODV for Linux</title><content type='html'>I attempted to install the "&lt;a href="http://w3.antd.nist.gov/wctg/aodv_kernel/"&gt;Kernel AODV&lt;/a&gt;" kernel module today for the WORKIT AP. Progress was relatively smooth till the last step of the make process, which called "modpost" to create the kernel module.&lt;br /&gt;&lt;br /&gt;As expected, there were some issues with my header include files, so had to change the Makefile and include the following lines:&lt;br /&gt;&lt;pre&gt;CFLAGS += -I/usr/include/&lt;br /&gt;CFLAGS += -I/usr/include/linux/&lt;br /&gt;CFLAGS += -I/home/linux-2.6.20.1/include&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;(the last one is the custom directory where I untarred the kernel source.)&lt;br /&gt;&lt;br /&gt;In addition, I also had to copy the following files from the kernel source directory:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;irq_regs.h&lt;/li&gt;&lt;li&gt;device.h&lt;/li&gt;&lt;li&gt;pda.h&lt;/li&gt;&lt;/ul&gt;to /usr/include/asm, since the compiler was complaining that they were missing.&lt;br /&gt;&lt;br /&gt;After moving all the files, the compilation went smoothly and produced all the .o files; however, it is now stuck at the last step of actually making it a kernel module using "modpost". More information coming soon.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-5460692929562178539?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/5460692929562178539/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=5460692929562178539' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/5460692929562178539'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/5460692929562178539'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2008/06/installing-kernel-aodv-for-linux.html' title='Installing Kernel AODV for Linux'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-3972273892670188551</id><published>2008-06-17T10:44:00.003-04:00</published><updated>2008-06-25T14:17:47.676-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>Installing kernel source in Voyage Linux</title><content type='html'>While making  kernel based modules, I got an error of the type:&lt;br /&gt;&lt;br /&gt;"Missing .config file in /lib/modules/2.6.20-486-voyage/build"&lt;br /&gt;&lt;br /&gt;The reason this happens is because the kernel source is not installed with Voyage Linux, but if you are building kernel modules, you need access to this.&lt;br /&gt;&lt;br /&gt;apt-get install kernel-sources does not work either.&lt;br /&gt;&lt;br /&gt;What I did was:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Download the corresponding kernel source version from the &lt;a href="http://www.kernel.org/"&gt;Linux kernel archives&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Untar to /lib/modules/2.6.20-486-voyage/build&lt;/li&gt;&lt;li&gt;Run "make config"&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Make sure to &lt;span style="font-weight: bold;"&gt;turn on&lt;/span&gt; "kernel support for .config files" (turned off by default, this is one of the first few options)&lt;/li&gt;&lt;/ol&gt;Now, you have a fully functioning kernel source tree in your Voyage Linux installation so you can compile kernel modules.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;UPDATE, June 25, 2008:&lt;/span&gt; From a forum post, I found that you can actually find the source code for the Voyage Linux 0.4 kernel from their website at : &lt;a href="http://www.voyage.hk/dists/0.4/linux/"&gt;http://www.voyage.hk/dists/0.4/linux/&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Actually, it looks like most of their distros have source online as well. Just replace "0.4" in the above link with your distribution number and expect to find your source tarball there.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-3972273892670188551?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/3972273892670188551/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=3972273892670188551' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/3972273892670188551'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/3972273892670188551'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2008/06/installing-kernel-source-in-voyage.html' title='Installing kernel source in Voyage Linux'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-7729839440828918405</id><published>2008-06-13T14:21:00.003-04:00</published><updated>2008-06-13T14:52:20.720-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='workit'/><title type='text'>Resolving compile problems with PSU's MAR - include directories and postgresql-dev</title><content type='html'>Today I attempted to install PSU's Multiple Access Router component for WORKIT. However, I found that I had to set up the include directories in the makefile in order to get the component to compile.&lt;br /&gt;&lt;br /&gt;These are the lines I added to the CONFIGURE that is used by the Makefile to get it to work:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;CFLAGS          += -I/usr/lib/gcc/i486-linux-gnu/4.1.2/include/&lt;br /&gt;CFLAGS          += -I/usr/include/c++/4.1.2/&lt;br /&gt;CFLAGS          += -I/usr/include/c++/4.1.2/i486-linux-gnu/&lt;br /&gt;CFLAGS          += -I/usr/include/linux/&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;In addition, I also had to install the Postgresql-dev package since it complained of "libpq-fe.h" missing. I installed it using:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;apt-get install postgresql-dev&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;I did have to change one setting that was causing a conflict with the INCLUDE directories for the root Makefile. This file was /dotconf/Makefile, and I commented the following line:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;# CFLAGS                =&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-7729839440828918405?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/7729839440828918405/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=7729839440828918405' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/7729839440828918405'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/7729839440828918405'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2008/06/resolving-compile-problems-with-psus.html' title='Resolving compile problems with PSU&apos;s MAR - include directories and postgresql-dev'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-3700184651808194236</id><published>2008-06-13T12:44:00.002-04:00</published><updated>2008-06-13T12:46:32.460-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='workit'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>dnsmasq now working as DHCP server as well</title><content type='html'>Now I have dnsmasq working as a DHCP server as well.&lt;br /&gt;&lt;br /&gt;In my configuration, I added the following lines:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;dhcp-range=ath0,10.0.0.10,10.0.0.250,24h&lt;br /&gt;dhcp-leasefile=/var/tmp/dnsmasq.leases&lt;br /&gt;dhcp-authoritative&lt;br /&gt;# Gateway&lt;br /&gt;dhcp-option=3,10.0.0.1&lt;br /&gt;# DNS&lt;br /&gt;dhcp-option=6,10.0.0.1&lt;/pre&gt;&lt;br /&gt;and dnsmasq is now able to serve up DHCP addresses on the fly to clients.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-3700184651808194236?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/3700184651808194236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=3700184651808194236' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/3700184651808194236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/3700184651808194236'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2008/06/dnsmasq-now-working-as-dhcp-server-as.html' title='dnsmasq now working as DHCP server as well'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-4784353763755658996</id><published>2008-06-13T11:27:00.005-04:00</published><updated>2008-06-13T15:29:01.625-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='workit'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>dnsmasq now works for DNS requests - after initial "query refused"</title><content type='html'>For a long time, I was having a problem where dnsmasq refused to respond to DNS requests and gave an error message "query refused".&lt;br /&gt;&lt;br /&gt;At first I thought that it might have been because dnsmasq wasn't running or not binding to the proper port, but after using "netstat -ap" and running "dnsmasq -d", it was obvious that dnsmasq was running and able to receive the queries.&lt;br /&gt;&lt;br /&gt;So why wasn't dnsmasq failing to do IP lookups and interact with the upstream DNS servers? Even though from most documentation (such as on &lt;a href="http://wiki.debian.org/HowTo/dnsmasq"&gt;Debian&lt;/a&gt; and &lt;a href="http://ubuntu.wordpress.com/2006/08/02/local-dns-cache-for-faster-browsing/"&gt;ubuntu.wordpress.com&lt;/a&gt;) suggests that a simple apt-get would do the trick?&lt;br /&gt;&lt;br /&gt;Anyway, I found that my /etc/resolv.conf had only 127.0.0.1 listed as its nameserver, and dnsmasq was using this as its resolv.conf . I looked around to see if I could find another file that the resolvconf binary was generating that had the actual nameservers, and I found this file: /etc/resolvconf/run/interface/eth0&lt;br /&gt;&lt;br /&gt;I change a line in /etc/dnsmasq.conf to read:&lt;br /&gt;&lt;pre&gt;resolv-file=/etc/resolvconf/run/interface/eth0&lt;/pre&gt;And hey presto, it worked!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-4784353763755658996?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/4784353763755658996/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=4784353763755658996' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/4784353763755658996'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/4784353763755658996'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2008/06/dnsmasq-now-works-for-dns-requests.html' title='dnsmasq now works for DNS requests - after initial &quot;query refused&quot;'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-8501852795480334655</id><published>2008-06-12T13:13:00.003-04:00</published><updated>2008-06-12T13:26:47.215-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='workit'/><title type='text'>Network (eth0) automatically gets IP address using DHCP now</title><content type='html'>I recently ran into a strange problem with the Voyage/Soekris box, where the box would not get the IP address using DHCP on bootup, even with the network cable plugged in. However, when I manually reset the networking (using ifdown/ifup eth0 or /etc/init.d/networking restart), it would work properly.&lt;br /&gt;&lt;br /&gt;This was strange, as it had been working fine all along, and I had the /etc/network/interfaces set up as follows:&lt;br /&gt;&lt;blockquote&gt;auto eth0&lt;br /&gt;iface eth0 inet dhcp&lt;br /&gt;&lt;/blockquote&gt;After prolonged searching on the Internet, I found two entries on Ubuntu forums:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://ubuntuforums.org/showthread.php?t=256634"&gt;No more automatic dhclient on bootup&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://ubuntuforums.org/showthread.php?t=408647"&gt;Network not connecting automatically on boot&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;that helped, but didn't quite work in my case.&lt;br /&gt;&lt;br /&gt;I finally added a line to the /etc/network/interfaces file to make it read like this:&lt;br /&gt;&lt;blockquote&gt;auto eth0&lt;br /&gt;iface eth0 inet dhcp&lt;br /&gt;      pre-up ifconfig eth0 up&lt;br /&gt;&lt;/blockquote&gt;and then, hey presto, the network card now picks up an IP address automatically on boot.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-8501852795480334655?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/8501852795480334655/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=8501852795480334655' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/8501852795480334655'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/8501852795480334655'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2008/06/network-eth0-automatically-gets-ip.html' title='Network (eth0) automatically gets IP address using DHCP now'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-2968103972320003799</id><published>2008-06-12T10:21:00.003-04:00</published><updated>2008-06-12T10:56:12.449-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='workit'/><title type='text'>Fixing dnsmasq problems on Soekris/Voyage Linux</title><content type='html'>(Sorry, my research blogging has been intermittent - but it does affect my documentation, so I am trying to be consistent about it.)&lt;br /&gt;&lt;br /&gt;This morning, I needed to look at the DNS and DHCP servers on the Soekris box - somehow, it wasn't working perfectly.&lt;br /&gt;&lt;br /&gt;The problem started when I first tried to install dhcpd (the DHCP server) last year without realizing dnsmasq had already been installed - and without knowing what dnsmasq is. After some frustrating error messages and doing some Google searches for dnsmasq and dhcpd, I finally found out more about how they work.&lt;br /&gt;&lt;br /&gt;This article gives a good overview of &lt;a href="http://www.indiangnu.org/category/dhcp-ftp-squid-samba/"&gt;how to set up dnsmasq&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-2968103972320003799?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/2968103972320003799/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=2968103972320003799' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/2968103972320003799'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/2968103972320003799'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2008/06/fixing-dnsmasq-problems-on.html' title='Fixing dnsmasq problems on Soekris/Voyage Linux'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-4529136761021466407</id><published>2008-04-29T13:32:00.005-04:00</published><updated>2008-04-29T14:10:18.119-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='courses'/><category scheme='http://www.blogger.com/atom/ns#' term='workit'/><title type='text'>Updates: LightPeers, WORKIT, Spring semester</title><content type='html'>A few updates since my last blog post, and this is a quick summary:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;I finally discovered a related work to BonAHA called &lt;a href="http://www.daimi.au.dk/%7Ebentor/LightPeers/"&gt;LightPeers&lt;/a&gt;. LightPeers appears to be a PhD dissertation done  in Denmark, and the aim of the project is the same: develop a robust application framework for mobile P2P or ad-hoc applications. There are a few differences between BonAHA and LightPeers, but the basic concept is the same.&lt;/li&gt;&lt;li&gt;I got the WORKIT MIPClient finally working and able to connect to a wireless AP! Yay! Now to get it connected to the WORKIT AP and test its connectivity to that system.&lt;/li&gt;&lt;li&gt;Almost at the end of the Spring semester now. That's good and bad ... because I'll be tied up for the next two weeks with project demos, TA grading and reports ...&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-4529136761021466407?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/4529136761021466407/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=4529136761021466407' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/4529136761021466407'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/4529136761021466407'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2008/04/updates-lightpeers-workit-spring.html' title='Updates: LightPeers, WORKIT, Spring semester'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-8185521617580020882</id><published>2008-04-18T14:37:00.004-04:00</published><updated>2008-12-09T17:55:03.983-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='workit'/><title type='text'>Photos of Soekris net5501 in Demarctech ODE-8585 Enclosure</title><content type='html'>At long last, I have photos of the &lt;a href="http://www.soekris.com/net5501.htm"&gt;Soekris net5501&lt;/a&gt; in a Demarctech ODE-8585 enclosure.&lt;br /&gt;&lt;br /&gt;This Soekris board is currently running &lt;a href="http://linux.voyage.hk/"&gt;Voyage Linux&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Thanks go to George at Columbia Univ's Physics Machine shop for putting this together.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_23p_82zlC3M/SAjre_tINxI/AAAAAAAAAAQ/2ffSQEc95pA/s1600-h/demarchtech_soekris1.jpg"&gt;&lt;img style="cursor: pointer;" src="http://2.bp.blogspot.com/_23p_82zlC3M/SAjre_tINxI/AAAAAAAAAAQ/2ffSQEc95pA/s320/demarchtech_soekris1.jpg" alt="" id="BLOGGER_PHOTO_ID_5190657488273815314" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_23p_82zlC3M/SAjrfftINyI/AAAAAAAAAAY/bwHa5ilv4aI/s1600-h/demarchtech_soekris2.jpg"&gt;&lt;img style="cursor: pointer;" src="http://4.bp.blogspot.com/_23p_82zlC3M/SAjrfftINyI/AAAAAAAAAAY/bwHa5ilv4aI/s320/demarchtech_soekris2.jpg" alt="" id="BLOGGER_PHOTO_ID_5190657496863749922" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_23p_82zlC3M/SAjrf_tINzI/AAAAAAAAAAg/2MedoSejXy8/s1600-h/demarchtech_soekris3.jpg"&gt;&lt;img style="cursor: pointer;" src="http://2.bp.blogspot.com/_23p_82zlC3M/SAjrf_tINzI/AAAAAAAAAAg/2MedoSejXy8/s320/demarchtech_soekris3.jpg" alt="" id="BLOGGER_PHOTO_ID_5190657505453684530" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_23p_82zlC3M/SAjrgPtIN0I/AAAAAAAAAAo/XYRXHOgDpOI/s1600-h/demarchtech_soekris4.jpg"&gt;&lt;img style="cursor: pointer;" src="http://3.bp.blogspot.com/_23p_82zlC3M/SAjrgPtIN0I/AAAAAAAAAAo/XYRXHOgDpOI/s320/demarchtech_soekris4.jpg" alt="" id="BLOGGER_PHOTO_ID_5190657509748651842" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-8185521617580020882?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/8185521617580020882/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=8185521617580020882' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/8185521617580020882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/8185521617580020882'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2008/04/photos-of-soekris-net5501-in-demarctech.html' title='Photos of Soekris net5501 in Demarctech ODE-8585 Enclosure'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_23p_82zlC3M/SAjre_tINxI/AAAAAAAAAAQ/2ffSQEc95pA/s72-c/demarchtech_soekris1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-2081880695028307233</id><published>2008-03-31T13:27:00.004-04:00</published><updated>2008-03-31T13:32:57.176-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ad-hoc applications'/><category scheme='http://www.blogger.com/atom/ns#' term='7DS'/><title type='text'>Ad hoc applications</title><content type='html'>For our 7DS project, we are dealing with a class of applications that are highly mobile, work in disconnected or intermittently connected networks, and without central servers such as DNS and DHCP.&lt;br /&gt;&lt;br /&gt;What name do we give this new set of applications? We call them &lt;span style="font-weight: bold;"&gt;ad-hoc applications&lt;/span&gt;!&lt;br /&gt;&lt;br /&gt;The &lt;a href="http://www.ercim.org/publication/Ercim_News/enw54/rupp.html"&gt;only reference I was able to find for ad-hoc applications&lt;/a&gt; seems to suggest that this term isn't very popular, but maybe it will catch on...&lt;br /&gt;&lt;br /&gt;Our 7DS system - and the &lt;a href="http://bonaha.sourceforge.net/"&gt;BonAHA framework&lt;/a&gt; I am building at Columbia and has been put on SourceForge - will hopefully create a usable framework for these class of ad-hoc applications. We're nearly done with version 1.0, but I still need to fix up some bugs and document the code.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-2081880695028307233?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/2081880695028307233/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=2081880695028307233' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/2081880695028307233'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/2081880695028307233'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2008/03/ad-hoc-applications.html' title='Ad hoc applications'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-7071196303607970026</id><published>2008-03-27T13:44:00.002-04:00</published><updated>2008-03-27T13:50:05.564-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='workit'/><category scheme='http://www.blogger.com/atom/ns#' term='hardware'/><category scheme='http://www.blogger.com/atom/ns#' term='wireless'/><title type='text'>Drill Bushings from McMaster-Carr for WORKIT Soekris</title><content type='html'>Hi, I'm back after a long while ... decided to continue using my Blogspot account for work related blogs, while the CS@CU wiki can remain as a wiki for official documentation.&lt;br /&gt;&lt;br /&gt;Today, I was looking at finding ways of getting washers/bushings to seal off the Demarctech hardware that encloses our Soekris net5501 box. Talking to George at the machine shop indicates that &lt;a href="http://www.mcmaster.com/"&gt;McMaster-Carr&lt;/a&gt; would be the best source of such bushings.&lt;br /&gt;&lt;br /&gt;I think I am looking for the items under :&lt;br /&gt;Machining and Clamping &gt; Drill Jig Bushings &gt; Drill Bushings and Liners &gt; Drill Bushings for Soft Materials&lt;br /&gt;&lt;br /&gt;More to come soon ... as soon as I figure out exactly what I need.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-7071196303607970026?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/7071196303607970026/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=7071196303607970026' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/7071196303607970026'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/7071196303607970026'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2008/03/drill-bushings-from-mcmaster-carr-for.html' title='Drill Bushings from McMaster-Carr for WORKIT Soekris'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-115645050673242357</id><published>2006-08-24T16:12:00.000-04:00</published><updated>2006-08-24T16:15:06.743-04:00</updated><title type='text'>Odd "Array" output in Joomla/PHP module solved</title><content type='html'>I had an odd problem in which a&lt;a href="http://www.joomla.org/"&gt; Joomla!&lt;/a&gt; module I was writing was outputting "Array" after its output.&lt;br /&gt;&lt;br /&gt;I didn't find any code in the module itself that was capable of outputting this error message, since this came after the last line of the module's output echo() statements. So, I was puzzled!&lt;br /&gt;&lt;br /&gt;Then I realized that it might have been because I had overwritten a global variable. I had liberally used variables like $id, $content, $categories, etc. So I replaced all my variable names with ones that couldn't possible belong to the reserved variable list ... such as $category__id, etc.&lt;br /&gt;&lt;br /&gt;And that solved the problem! :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-115645050673242357?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/115645050673242357/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=115645050673242357' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/115645050673242357'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/115645050673242357'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2006/08/odd-array-output-in-joomlaphp-module.html' title='Odd &quot;Array&quot; output in Joomla/PHP module solved'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-115472389820189666</id><published>2006-08-04T16:31:00.000-04:00</published><updated>2006-08-04T16:38:18.223-04:00</updated><title type='text'>C libraries to capture layer two packets</title><content type='html'>For the 7DS system, we need some libraries for peeking at the link layer  packets. These are the ones we found:&lt;br /&gt;&lt;br /&gt;Libradiate: &lt;a href="http://www.packetfactory.net/projects/libradiate/"&gt;http://www.packetfactory.net/projects/libradiate/&lt;/a&gt;&lt;br /&gt;libpcap: &lt;a href="http://www.tcpdump.org/"&gt;http://www.tcpdump.org/&lt;/a&gt;&lt;br /&gt;libnet: &lt;a href="http://www.packetfactory.net/libnet/"&gt;http://www.packetfactory.net/libnet/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-115472389820189666?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/115472389820189666/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=115472389820189666' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/115472389820189666'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/115472389820189666'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2006/08/c-libraries-to-capture-layer-two.html' title='C libraries to capture layer two packets'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-115435932440263650</id><published>2006-07-31T11:19:00.000-04:00</published><updated>2006-07-31T11:22:04.426-04:00</updated><title type='text'>Automake/autoconf for 7DS</title><content type='html'>I finally started workng with the &lt;a href="http://sources.redhat.com/autobook/autobook/autobook_toc.html#SEC_Contents"&gt;GNU Automake/Autoconf&lt;/a&gt; system for 7DS today. It's really neat! Far easier to work with than the faulty manual Makefiles I've been creating so far. I hope to have a fully GNU-style 7DS system (at least for my part) by the end of this week.&lt;br /&gt;&lt;br /&gt;I found that the deadline for submitting my paper to INFOCOM has passed, so I will probably be submitting a paper to ICC07.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-115435932440263650?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/115435932440263650/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=115435932440263650' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/115435932440263650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/115435932440263650'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2006/07/automakeautoconf-for-7ds.html' title='Automake/autoconf for 7DS'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-115393322276432044</id><published>2006-07-26T12:56:00.000-04:00</published><updated>2006-07-26T13:00:22.783-04:00</updated><title type='text'>Verbose options and logging levels/priority</title><content type='html'>Today I did something really cool with the 7DS logging system that enabled me to turn the "verbose" option off and instead introduce something more advanced: a level system that outputs log messages to the log file or screen based on the user setting.&lt;br /&gt;&lt;br /&gt;To set this up, I basically made added two functions like this, one for on-screen and one for log files:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;int SdsLogSetPrintLevel (int level)&lt;br /&gt;{&lt;br /&gt;    print_level = level;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;and then changed the code so that it prints only the higher priority messages to log file or screen, depending on user settings.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;  /* If level is greater than specified ,&lt;br /&gt;   * then print to stderr. */&lt;br /&gt;  if (level &gt;= print_level)&lt;br /&gt;    fprintf(stderr, logstatement);&lt;br /&gt;&lt;br /&gt;  /* If level is greater than specified log level, write to logfile */&lt;br /&gt;  if (level &gt;= log_level)&lt;br /&gt;    fprintf(logfp, "%s", logstatement);&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Of course, I had to set the default values appropriately, so that the log file would get all messages.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;int log_level = SDS_LOG_DEBUG,        /* File should have debug messages */&lt;br /&gt;    print_level = SDS_LOG_INFO;        /* Screen should have info messages */&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-115393322276432044?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/115393322276432044/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=115393322276432044' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/115393322276432044'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/115393322276432044'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2006/07/verbose-options-and-logging.html' title='Verbose options and logging levels/priority'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-115386007082529038</id><published>2006-07-25T16:39:00.000-04:00</published><updated>2006-07-25T16:41:10.840-04:00</updated><title type='text'>7DS code cleaning</title><content type='html'>I' m continuing to clean up my 7DS code. I have to follow my advisor's &lt;a href="http://www.cs.columbia.edu/%7Ehgs/etc/coding-style.html"&gt;instructions on formatting code&lt;/a&gt;,  which are very helpful.&lt;br /&gt;&lt;br /&gt;I'm also finding that other than configuration files and logging, I will well have to start using &lt;a href="http://www.gnu.org/software/libc/manual/html_node/Getopt.html"&gt;getopt()&lt;/a&gt; for command line options. Well, better late than never...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-115386007082529038?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/115386007082529038/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=115386007082529038' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/115386007082529038'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/115386007082529038'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2006/07/7ds-code-cleaning.html' title='7DS code cleaning'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-115325329778094899</id><published>2006-07-18T15:58:00.000-04:00</published><updated>2006-07-18T16:08:17.800-04:00</updated><title type='text'>7DS software engineering and wikis</title><content type='html'>Sorry I haven't been active for a while on this blog ... well, a few days ago, I realized I was running into a brick wall with the 7DS project, not sure of what to do, and faced with an overwhelming array of choices that I didn't know how to handle. :(&lt;br /&gt;&lt;br /&gt;Luckily, I e-mailed Henning and met him today (with Se Gi and Andy) to get an idea of how to come to grips with the situation and proceed further with the project.&lt;br /&gt;&lt;br /&gt;It looks like:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;We will release a version that has the basic features, but working.&lt;br /&gt;I think this can be released as source code with configure/make/make install, as well as installation binaries.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;In parallel, we will draft guidelines for future versions and see how to make 7DS more modular so that it is "future-compatible". Things like the community extensions and file syncronization will be part of the next release.&lt;/li&gt;&lt;/ol&gt;In addition, Henning suggested that we use a wiki to document our work. That's a great idea! The only thing now is to find a place to host it ... unless we have a CS-wide one.&lt;br /&gt;&lt;br /&gt;One great wiki I've heard a lot about is &lt;a href="http://wiki.splitbrain.org/wiki:dokuwiki"&gt;DokuWiki&lt;/a&gt;...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-115325329778094899?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/115325329778094899/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=115325329778094899' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/115325329778094899'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/115325329778094899'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2006/07/7ds-software-engineering-and-wikis.html' title='7DS software engineering and wikis'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-115151908408933757</id><published>2006-06-28T14:20:00.000-04:00</published><updated>2006-06-28T14:24:44.103-04:00</updated><title type='text'>Installing Eclipse with PHP and C</title><content type='html'>I decided to install &lt;a href="http://www.eclipse.org/"&gt;Eclipse&lt;/a&gt; today to use as my primary development kit. I've used vi, gEdit, jExt (I really like jExt!) but life might be simpler with an IDE.&lt;br /&gt;&lt;br /&gt;So I will try Eclipse with the &lt;a href="http://www.eclipse.org/cdt"&gt;C development&lt;/a&gt; and maybe &lt;a href="http://www.phpeclipse.de/"&gt;PHP development&lt;/a&gt; environements and see how it works out.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-115151908408933757?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/115151908408933757/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=115151908408933757' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/115151908408933757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/115151908408933757'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2006/06/installing-eclipse-with-php-and-c.html' title='Installing Eclipse with PHP and C'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-115144281747516925</id><published>2006-06-27T17:09:00.000-04:00</published><updated>2006-06-27T17:13:37.490-04:00</updated><title type='text'>Installed DarwinPorts, sqlite, swish-e, and all other required libraries</title><content type='html'>OK - I finally managed to get DarwinPorts installed on AirTrain (the iMac). I couldn't get it installed under OS X 10.2 - it complained that TCL was built without threading enabled.&lt;br /&gt;&lt;br /&gt;Now that I have OS X 10.4 and the Xcode tools, DarwinPorts installed without a hitch from source.&lt;br /&gt;&lt;br /&gt;I am now able to successfully build all the other required libraries that I need to get 7DS running on the Mac, including: &lt;br /&gt;- sqlite3&lt;br /&gt;- swish-e&lt;br /&gt;- libconfuse&lt;br /&gt;&lt;br /&gt;(and maybe some more? I forget.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-115144281747516925?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/115144281747516925/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=115144281747516925' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/115144281747516925'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/115144281747516925'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2006/06/installed-darwinports-sqlite-swish-e.html' title='Installed DarwinPorts, sqlite, swish-e, and all other required libraries'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-115142975981592642</id><published>2006-06-27T13:34:00.000-04:00</published><updated>2006-06-27T13:35:59.830-04:00</updated><title type='text'>Upgraded AirTrain iMac to Mac OS 10.4</title><content type='html'>I upgraded AirTrain (the IRT lab iMac) from 10.2 to &lt;a href="http://www.apple.com/macosx/"&gt;Mac OS X 10.4&lt;/a&gt;. Surprisingly, the install DVD had an upgrade option - so I didn't have to format the disk at all! So much for my warnings to my colleagues to backup all the stuff they needed...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-115142975981592642?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/115142975981592642/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=115142975981592642' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/115142975981592642'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/115142975981592642'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2006/06/upgraded-airtrain-imac-to-mac-os-104.html' title='Upgraded AirTrain iMac to Mac OS 10.4'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-114978595569292272</id><published>2006-06-08T12:51:00.000-04:00</published><updated>2006-06-08T12:59:15.706-04:00</updated><title type='text'>Porting 7DS from Unix to Mac OS and Windows</title><content type='html'>Right now, I'm involved in porting the 7DS system from the Linux system to run on Windows and the Mac OS X. It is really fun (!) though it might take a while to complete...&lt;br /&gt;&lt;br /&gt;For Windows, I am currently trying &lt;a href="http://www.cygwin.org/"&gt;Cygwin&lt;/a&gt;. I heard that it uses a compatibility layer and a cygwin.dll file though - meaning that Cygwin will have to be installed. I have heard about &lt;a href="http://www.mingw.org/"&gt;MinGW&lt;/a&gt; and will see if that avoids this issue.&lt;br /&gt;&lt;br /&gt;For the Mac OS X, I first heard that we might need to install the XCode development tools, but now it looks like it is not necesssary. The Mac OS X 10.2 system I am working with already has the GCC environment, and except for dynamic library handling, it seems to compile most apps. Dynamic library loading is a problem though: I even installed dlcompat from &lt;a href="http://fink.sourceforge.net/"&gt;Fink&lt;/a&gt;, but it still has problems! Fink, btw, is a build environment for Darwin that promises to make it easier for people to port open source apps to Mac OS.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-114978595569292272?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/114978595569292272/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=114978595569292272' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/114978595569292272'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/114978595569292272'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2006/06/porting-7ds-from-unix-to-mac-os-and.html' title='Porting 7DS from Unix to Mac OS and Windows'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-114549021614849258</id><published>2006-04-19T19:41:00.000-04:00</published><updated>2006-04-19T19:43:36.163-04:00</updated><title type='text'>Classification of XML data</title><content type='html'>As part of the 7DS community extension, I will have to classify shared community XML objects using some sort of &lt;a href="http://www.w3.org/XML/Schema"&gt;XML schema&lt;/a&gt;, &lt;a href="http://www.w3.org/RDF/"&gt;RDF&lt;/a&gt; or &lt;a href="http://www.w3.org/TR/rdf-schema/"&gt;RDF Schemas&lt;/a&gt;. We looked at &lt;a href="http://www.w3.org/TR/owl-features/"&gt;OWL&lt;/a&gt; today, but that looks fairly complicated, so we may just go ahead and use RDF and RDF schemas.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-114549021614849258?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/114549021614849258/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=114549021614849258' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/114549021614849258'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/114549021614849258'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2006/04/classification-of-xml-data.html' title='Classification of XML data'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-114504028264794615</id><published>2006-04-14T14:34:00.000-04:00</published><updated>2006-04-14T14:44:42.663-04:00</updated><title type='text'>PHP and web (http) servers on Windows Mobile / PocketPC</title><content type='html'>As the scope of the 7DS project expands, I'm coming up against building more involved 7DS web applications. The search and multicast engines were C programs that produced binary CGI executables, but building more involved community-based web systems is going to be hard. :(&lt;br /&gt;&lt;br /&gt;In looking to build the new applications in PHP, I was asked to see if PHP might be supported on Windows Mobile (one of our near-future development platforms) and I found it interesting that &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=cdfd2bb2-fa13-4062-b8d1-4406ccddb5fd&amp;amp;DisplayLang=en"&gt;Windows Mobile SDK has its own HTTP/web server&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Even more interesting, there have been problems porting the Zend PHP engine to Windows Mobile, so there is an alpha version of a ground-up &lt;a href="http://mobileleap.net/hph/"&gt;PHP engine built for Windows Mobile&lt;/a&gt; with its own web server.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-114504028264794615?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/114504028264794615/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=114504028264794615' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/114504028264794615'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/114504028264794615'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2006/04/php-and-web-http-servers-on-windows.html' title='PHP and web (http) servers on Windows Mobile / PocketPC'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-114383080129606125</id><published>2006-03-31T13:44:00.000-05:00</published><updated>2006-03-31T13:46:41.323-05:00</updated><title type='text'>Always use sizeof() when malloc()ing</title><content type='html'>I've had some real big problems implementing my webpage retreiver, and I fixed it once I realized that I had to include the sizeof() everytime I malloc()d.&lt;br /&gt;&lt;br /&gt;So remember to use this everytime you malloc, say a string:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;newstring = malloc ((strlen(oldstring)+1) * sizeof(char));&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Remember to add 1 as well, just as I did: C strings terminate with a '\0', which is an extra character.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-114383080129606125?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/114383080129606125/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=114383080129606125' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/114383080129606125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/114383080129606125'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2006/03/always-use-sizeof-when-mallocing.html' title='Always use sizeof() when malloc()ing'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-114376321766241430</id><published>2006-03-30T18:58:00.000-05:00</published><updated>2006-03-30T19:00:17.693-05:00</updated><title type='text'>Memory leak for null string assignment</title><content type='html'>This is really wierd... the following piece of code in my 7DS system results in a huge memory leak, gobbling up memory really fast.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;  if (0 == hits) {&lt;br /&gt;    // No results, empty xmlResults and return&lt;br /&gt;    sprintf (xmlResult, "");&lt;br /&gt;    return 0;&lt;br /&gt;  }&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Disabling it solves the memory problem - I wonder why?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-114376321766241430?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/114376321766241430/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=114376321766241430' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/114376321766241430'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/114376321766241430'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2006/03/memory-leak-for-null-string-assignment.html' title='Memory leak for null string assignment'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-114357978025709900</id><published>2006-03-28T16:00:00.000-05:00</published><updated>2006-03-28T16:03:00.276-05:00</updated><title type='text'>malloc() and free() error for dynamic strings solved</title><content type='html'>OK, I am a newbie at dynamic strings in C, so please forgive my silliness.&lt;br /&gt;&lt;br /&gt;I  have been getting "*** glibc detected *** free(): invalid next size (fast)" errors in my application that has to create dynamic path names and couldn't figure it out.&lt;br /&gt;&lt;br /&gt;Finally I did a Google search and found the solution here: &lt;a href="http://www.eskimo.com/%7Escs/cclass/int/sx7.html"&gt;http://www.eskimo.com/~scs/cclass/int/sx7.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Guess what I had done? malloc()d the string to use one less character than needed like this:&lt;br /&gt;&lt;code&gt;escapedURL = malloc (strlen (URL));&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This is CORRECT:&lt;br /&gt;&lt;code&gt;escapedURL = malloc (strlen (URL) + 1);&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Because C strings end with a '\0' character.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-114357978025709900?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/114357978025709900/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=114357978025709900' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/114357978025709900'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/114357978025709900'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2006/03/malloc-and-free-error-for-dynamic.html' title='malloc() and free() error for dynamic strings solved'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-114348695482612084</id><published>2006-03-27T14:13:00.000-05:00</published><updated>2006-03-27T14:37:55.313-05:00</updated><title type='text'>Parsing filename and directories out of given path in C</title><content type='html'>Sample code for how to parse directory structure and path names for a given path string in C. I will use this for the webpage retreiver project I am working on.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;#include &amp;lt;string.h&amp;gt;&lt;br /&gt;#include &amp;lt;stddef.h&amp;gt;&lt;br /&gt;#include &amp;lt;libgen.h&amp;gt;&lt;br /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;&lt;br /&gt;/* This program parses the path given in the argument into directories&lt;br /&gt;* and filename, creates the directory structure and creates an&lt;br /&gt;* empty file as well */&lt;br /&gt;int&lt;br /&gt;main (int argc, char **argv)&lt;br /&gt;{&lt;br /&gt;const char delimiters[] = "/\\"; /* File delimiters */&lt;br /&gt;char *token, *oldtoken, *cp;&lt;br /&gt;const char program_directory = getcwd (NULL, 0);  /* Program directory */&lt;br /&gt;&lt;br /&gt;/* Create copy of path string */&lt;br /&gt;cp = malloc (strlen (argv[1]));&lt;br /&gt;strcpy (cp, argv[1]);&lt;br /&gt;&lt;br /&gt;/* Split string into tokens */&lt;br /&gt;token = strtok (cp, delimiters);&lt;br /&gt;&lt;br /&gt;printf ("Directory = ");&lt;br /&gt;&lt;br /&gt;/* While token is not NULL */&lt;br /&gt;while (1)&lt;br /&gt;{&lt;br /&gt;oldtoken = malloc (strlen (token));&lt;br /&gt;strcpy (oldtoken, token); /* Copy current token */&lt;br /&gt;token = strtok (NULL, delimiters); /* Go to the next token */&lt;br /&gt;/* If nexxt token is NULL, it is the last part and assumed to&lt;br /&gt;* be a filename */&lt;br /&gt;if (token == NULL)&lt;br /&gt; {&lt;br /&gt;   printf ("\nFilename = %s\n", oldtoken);&lt;br /&gt;   /* Create an empty file of that name */&lt;br /&gt;   FILE *fp;&lt;br /&gt;   fp = fopen (oldtoken, "w");&lt;br /&gt;   fclose (fp);&lt;br /&gt;   break;&lt;br /&gt; }&lt;br /&gt;/* Otherwise it is a directory */&lt;br /&gt;else&lt;br /&gt; {&lt;br /&gt;   printf ("%s ", oldtoken);&lt;br /&gt;   mkdir (oldtoken, 0755); /* Create the directory */&lt;br /&gt;   chdir (oldtoken); /* Go there */&lt;br /&gt; }&lt;br /&gt; free (oldtoken);&lt;br /&gt;}&lt;br /&gt;printf ("\n");&lt;br /&gt;/* Free any memory elements */&lt;br /&gt;free (cp);&lt;br /&gt;oldtoken = NULL;&lt;br /&gt;&lt;br /&gt;chdir (program_directory);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-114348695482612084?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/114348695482612084/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=114348695482612084' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/114348695482612084'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/114348695482612084'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2006/03/parsing-filename-and-directories-out.html' title='Parsing filename and directories out of given path in C'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-114262373864431076</id><published>2006-03-17T14:25:00.000-05:00</published><updated>2006-03-17T14:28:58.663-05:00</updated><title type='text'>URL or URI parsing in libxml and c</title><content type='html'>I found out that libxml has URI functions that will allow you to parse URIs using libxml.&lt;br /&gt;&lt;br /&gt;Here's an example program:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;#include &amp;lt;libxml.h&amp;gt;&lt;br /&gt;&lt;br /&gt;int main(int argc, char **argv) {&lt;br /&gt;&lt;br /&gt;/* Create a null URI */&lt;br /&gt;xmlURIPtr url = xmlCreateURI ();&lt;br /&gt;&lt;br /&gt;/* Parse the user input URI */&lt;br /&gt;url = xmlParseURI ( (argc &lt;= 1) ? "http://www.theepochtimes.com/" : argv[1]);&lt;br /&gt;&lt;br /&gt;/* Print all the respective information */&lt;br /&gt;printf ("scheme = %s\n", url-&gt;scheme);&lt;br /&gt;printf ("opaque = %s\n", url-&gt;opaque);&lt;br /&gt;printf ("authority = %s\n", url-&gt;authority);&lt;br /&gt;printf ("server = %s\n", url-&gt;server);&lt;br /&gt;printf ("user = %s\n", url-&gt;user);&lt;br /&gt;printf ("port = %d\n", url-&gt;port);&lt;br /&gt;printf ("path = %s\n", url-&gt;path);&lt;br /&gt;printf ("query = %s\n", url-&gt;query);&lt;br /&gt;printf ("fragment = %s\n", url-&gt;fragment);&lt;br /&gt;printf ("cleanup = %d\n", url-&gt;cleanup);&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-114262373864431076?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/114262373864431076/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=114262373864431076' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/114262373864431076'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/114262373864431076'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2006/03/url-or-uri-parsing-in-libxml-and-c.html' title='URL or URI parsing in libxml and c'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-114261996842340188</id><published>2006-03-17T13:22:00.000-05:00</published><updated>2006-03-17T13:26:08.443-05:00</updated><title type='text'>Parsing HTML using tidy and tidylib</title><content type='html'>It's so hard to find a C program on the web that can parse HTML! Yes, you can find parsers written in Perl and other languages, but not C!&lt;br /&gt;&lt;br /&gt;So I might as well share what I've learnt so far. I am making the 7DS HTML parser in libxml, but I experimented using tidy and tidylib as well, and here's how the code for that looks:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#include &amp;lt;tidy.h&amp;rt;&lt;br /&gt;#include &amp;lt;buffio.h&amp;rt;&lt;br /&gt;#include &amp;lt;stdio.h&amp;rt;&lt;br /&gt;#include &amp;lt;errno.h&amp;rt;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* Dump the list of nodes and their attributes&lt;br /&gt;* Modified from tidylib documentation&lt;br /&gt;*/&lt;br /&gt;void dumpNode( TidyNode tnod, int indent )&lt;br /&gt;{&lt;br /&gt;TidyNode child;&lt;br /&gt;&lt;br /&gt;for ( child = tidyGetChild(tnod); child; child = tidyGetNext(child) )&lt;br /&gt;{&lt;br /&gt;ctmbstr name = tidyNodeGetName( child );&lt;br /&gt;if ( !name )&lt;br /&gt;{&lt;br /&gt;  switch ( tidyNodeGetType(child) )&lt;br /&gt;  {&lt;br /&gt;  case TidyNode_Root:       name = "Root";                    break;&lt;br /&gt;  case TidyNode_DocType:    name = "DOCTYPE";                 break;&lt;br /&gt;  case TidyNode_Comment:    name = "Comment";                 break;&lt;br /&gt;  case TidyNode_ProcIns:    name = "Processing Instruction";  break;&lt;br /&gt;  case TidyNode_Text:       name = "Text";                    break;&lt;br /&gt;  case TidyNode_CDATA:      name = "CDATA";                   break;&lt;br /&gt;  case TidyNode_Section:    name = "XML Section";             break;&lt;br /&gt;  case TidyNode_Asp:        name = "ASP";                     break;&lt;br /&gt;  case TidyNode_Jste:       name = "JSTE";                    break;&lt;br /&gt;  case TidyNode_Php:        name = "PHP";                     break;&lt;br /&gt;  case TidyNode_XmlDecl:    name = "XML Declaration";         break;&lt;br /&gt;&lt;br /&gt;  case TidyNode_Start:&lt;br /&gt;  case TidyNode_End:&lt;br /&gt;  case TidyNode_StartEnd:&lt;br /&gt;  default:&lt;br /&gt;    assert( name != NULL ); // Shouldn't get here&lt;br /&gt;    break;&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;assert( name != NULL );&lt;br /&gt;char whitespace[indent];&lt;br /&gt;memset (whitespace, ' ', indent);&lt;br /&gt;whitespace[indent-1] = '\0';&lt;br /&gt;//    printf( "%sNode: %s\n", whitespace, name );&lt;br /&gt;&lt;br /&gt;/* Get the first attribute for all nodes */&lt;br /&gt;TidyAttr tattr = tidyAttrFirst (child);&lt;br /&gt;while (tattr != NULL) {&lt;br /&gt;  /* Print the node and its attribute */&lt;br /&gt;  printf ("%s  %s %s= %s\n", whitespace, tidyNodeGetName (child), tidyAttrName (tattr), tidyAttrValue (tattr));&lt;br /&gt;  /* Get the next attribute */&lt;br /&gt;  tattr = tidyAttrNext (tattr);&lt;br /&gt;}&lt;br /&gt;dumpNode( child, indent + 4 );&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/* Dump the whole document */&lt;br /&gt;void dumpDoc( TidyDoc tdoc )&lt;br /&gt;{&lt;br /&gt;dumpNode( tidyGetRoot(tdoc), 0 );&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/* Dump only the body */&lt;br /&gt;void dumpBody( TidyDoc tdoc )&lt;br /&gt;{&lt;br /&gt;dumpNode( tidyGetBody(tdoc), 0 );&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;int main(int argc, char **argv )&lt;br /&gt;{&lt;br /&gt;/* Input file: Either the first argument or "../test.html" */&lt;br /&gt;const char* input = (argc &gt; 1) ? argv[1] : "../test.html";&lt;br /&gt;TidyBuffer output = {0};&lt;br /&gt;TidyBuffer errbuf = {0};&lt;br /&gt;int rc = -1;&lt;br /&gt;Bool ok;&lt;br /&gt;&lt;br /&gt;TidyDoc tdoc = tidyCreate();                     // Initialize "document"&lt;br /&gt;printf( "Tidying:\t%s\n", input );&lt;br /&gt;&lt;br /&gt;ok = tidyOptSetBool( tdoc, TidyXhtmlOut, yes );  // Convert to XHTML&lt;br /&gt;if ( ok )&lt;br /&gt;rc = tidySetErrorBuffer( tdoc, &amp;errbuf );      // Capture diagnostics&lt;br /&gt;if ( rc &gt;= 0 )&lt;br /&gt;/* Read from the HTML file */&lt;br /&gt;rc = tidyParseFile( tdoc, input );           // Parse the input&lt;br /&gt;if ( rc &gt;= 0 )&lt;br /&gt;rc = tidyCleanAndRepair( tdoc );               // Tidy it up!&lt;br /&gt;if ( rc &gt;= 0 )&lt;br /&gt;rc = tidyRunDiagnostics( tdoc );               // Kvetch&lt;br /&gt;if ( rc &gt; 1 )                                    // If error, force output.&lt;br /&gt;rc = ( tidyOptSetBool(tdoc, TidyForceOutput, yes) ? rc : -1 );&lt;br /&gt;if ( rc &gt;= 0 )&lt;br /&gt;rc = tidySaveBuffer( tdoc, &amp;output );          // Pretty Print&lt;br /&gt;&lt;br /&gt;if ( rc &gt;= 0 )&lt;br /&gt;{&lt;br /&gt;if ( rc &gt; 0 )&lt;br /&gt;  printf( "\nDiagnostics:\n\n%s", errbuf.bp );&lt;br /&gt;printf( "\nAnd here is the result:\n\n%s", output.bp );&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;printf( "A severe error (%d) occurred.\\n", rc );&lt;br /&gt;&lt;br /&gt;tidyBufFree( &amp;output );&lt;br /&gt;tidyBufFree( &amp;errbuf );&lt;br /&gt;&lt;br /&gt;/* Now parse and print the tags in the HTML document */&lt;br /&gt;dumpDoc (tdoc);&lt;br /&gt;&lt;br /&gt;tidyRelease( tdoc );&lt;br /&gt;return rc;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-114261996842340188?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/114261996842340188/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=114261996842340188' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/114261996842340188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/114261996842340188'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2006/03/parsing-html-using-tidy-and-tidylib.html' title='Parsing HTML using tidy and tidylib'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-114235922628977247</id><published>2006-03-14T12:55:00.000-05:00</published><updated>2006-03-14T13:04:20.056-05:00</updated><title type='text'>Webcrawler using libxml, libcurl and tidy</title><content type='html'>Contrary to my writeup in the last post about how wget might be the best way to webcrawl and fetch files to a local cache, my thoughts now are different.&lt;br /&gt;&lt;br /&gt;You can use the following libraries to build a decent webcrawler:&lt;br /&gt;&lt;br /&gt;1. &lt;a href="http://tidy.sourceforge.net/"&gt;Tidy&lt;/a&gt;: Use tidylib to clean up your HTML pages and make them XHTML. &lt;a href="http://tidy.sourceforge.net/libintro.html"&gt;tidylib's webpage &lt;/a&gt;has sample code that is good enough for converting HTML to XHTML - just make sure you save to a file using &lt;a href="http://tidy.sourceforge.net/docs/api/group__Save.html#a0"&gt;tidySaveFile&lt;/a&gt;().&lt;br /&gt;&lt;br /&gt;libxml has problems parsing HTML, even if used with xmlRecoverFile() rather than xmlParseFile().&lt;br /&gt;&lt;br /&gt;2. &lt;a href="http://www.xmlsoft.org/"&gt;libxml&lt;/a&gt;: Parse the XHTML, get all elements' &lt;src&gt;attributes (and any other URLs you need) and pass on the URLs to libcurl to download. Need I say more?&lt;br /&gt;&lt;br /&gt;Well, actually I should. libxml is a little hard to understand from the API, and sample code to do what you want is hard to find. I had to do quite a bit of searching, looking up sample programs, and then reading the API to figure out how things worked.&lt;br /&gt;&lt;br /&gt;3. &lt;a href="http://curl.haxx.se/"&gt;curl&lt;/a&gt;: Or rather &lt;a href="http://curl.haxx.se/libcurl/"&gt;libcurl&lt;/a&gt;. To retrieve files from the Net. Again, need I say more?&lt;br /&gt;&lt;br /&gt;Life would have been simpler if curl had a recursive download function ... or &lt;a href="http://www.gnu.org/software/wget/"&gt;wget&lt;/a&gt; had a library I could use ... but then, that's why we computer engineers and students have a life!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-114235922628977247?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/114235922628977247/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=114235922628977247' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/114235922628977247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/114235922628977247'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2006/03/webcrawler-using-libxml-libcurl-and.html' title='Webcrawler using libxml, libcurl and tidy'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-114115029232676116</id><published>2006-02-28T13:10:00.000-05:00</published><updated>2006-02-28T13:11:32.343-05:00</updated><title type='text'>wget to create local cache of webpage</title><content type='html'>Here's how to use wget to create a local cache of a webpage:&lt;br /&gt;&lt;span class="txt"&gt;wget -r -l 1 –p –-convert-links http://www.yourdomain.com&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For more information: &lt;a href="http://www.devarticles.com/c/a/Web-Services/Website-Mirroring-With-wget/1/"&gt;http://www.devarticles.com/c/a/Web-Services/Website-Mirroring-With-wget/1/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-114115029232676116?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/114115029232676116/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=114115029232676116' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/114115029232676116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/114115029232676116'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2006/02/wget-to-create-local-cache-of-webpage.html' title='wget to create local cache of webpage'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-113993928229885789</id><published>2006-02-14T12:47:00.000-05:00</published><updated>2006-02-14T12:48:02.386-05:00</updated><title type='text'></title><content type='html'>Very nice and detailed documentation on creating  RPMs:&lt;br /&gt;&lt;a href="http://www.gurulabs.com/GURULABS-RPM-LAB/GURULABS-RPM-GUIDE-v1.0.PDF"&gt;http://www.gurulabs.com/GURULABS-RPM-LAB/GURULABS-RPM-GUIDE-v1.0.PDF&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It includes information not present in the official RPM FAQ at &lt;a href="http://www.rpm.org/"&gt;http://www.rpm.org/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-113993928229885789?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/113993928229885789/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=113993928229885789' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/113993928229885789'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/113993928229885789'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2006/02/very-nice-and-detailed-documentation.html' title=''/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-113924912607849560</id><published>2006-02-06T13:01:00.000-05:00</published><updated>2006-02-06T14:33:17.043-05:00</updated><title type='text'>Processes in C: /dev/urandom C code, forking several child processes...</title><content type='html'>Hi,&lt;br /&gt;&lt;br /&gt;Sorry, I've been busy with courses AND research lately, it 's given me less time to post on the blog.&lt;br /&gt;&lt;br /&gt;For an OS course, we have to do the &lt;a href="http://www.derkeiler.com/Newsgroups/sci.crypt/2003-04/index.html#1052"&gt;Miller-Rabin test for primality&lt;/a&gt;, and it involves forking atleast 3 child processes; getting random numbers from /dev/urandom, etc.&lt;br /&gt;&lt;br /&gt;Here is some code for having 2 or more child processes:&lt;br /&gt;&lt;a href="http://www.csl.mtu.edu/cs4411.ck/www/NOTES/process/fork/fork-03.c"&gt;http://www.csl.mtu.edu/cs4411.ck/www/NOTES/process/fork/fork-03.c&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;For reading from /dev/urandom (and why that's a good idea):&lt;br /&gt;&lt;a href="http://www.kalyanvarma.net/tech/security/random.html"&gt;http://www.kalyanvarma.net/tech/security/random.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-113924912607849560?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/113924912607849560/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=113924912607849560' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/113924912607849560'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/113924912607849560'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2006/02/processes-in-c-devurandom-c-code.html' title='Processes in C: /dev/urandom C code, forking several child processes...'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-113449976045921602</id><published>2005-12-13T13:47:00.000-05:00</published><updated>2005-12-13T13:49:20.473-05:00</updated><title type='text'>Got Darwin Streaming Server running in Linux</title><content type='html'>Buggered if I know why ... but I installed Darwin Streaming Server without a root account and changed the settings and other files as needed.&lt;br /&gt;&lt;br /&gt;Then, yesterday, it worked when I started it, but then , I shut it down and couldn't start it again.&lt;br /&gt;&lt;br /&gt;Then, after many tries, it finally worked when I &lt;span style="font-style: italic;"&gt;chdir&lt;/span&gt;'d to /homes/streaming/usr/local/sbin and ran this command:&lt;br /&gt;./DarwinStreamingServer -c /homes/streaming/etc/streaming/streamingserver.xml&lt;br /&gt;&lt;br /&gt;But it wouldn't run from any other directory!&lt;br /&gt;&lt;br /&gt;The web admin page still does not work; wonder why.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-113449976045921602?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/113449976045921602/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=113449976045921602' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/113449976045921602'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/113449976045921602'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2005/12/got-darwin-streaming-server-running-in.html' title='Got Darwin Streaming Server running in Linux'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-113441485633667767</id><published>2005-12-12T14:10:00.000-05:00</published><updated>2005-12-13T14:08:21.313-05:00</updated><title type='text'>PhD qualifiers  &amp; Installing Darwin without root account</title><content type='html'>Sorry, I've disappeared for a while since I'm preparing for the &lt;a href="http://www.blogger.com/www.ee.columbia.edu/index.php?dir=academics&amp;page=ph_d_program"&gt;EE department's PhD qualifying exams&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I still have to install Darwin Streaming Server for the CS department's videos. My colleague Salman tipped me off to this great link on &lt;a href="http://www.netsoc.tcd.ie/%7Ejgilbert/dss_redhat9/"&gt;how to install Darwin without a root or su account&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;But the new Darwin SS has some changes from the link that is posted. You might want to do the following instead:&lt;br /&gt;- Edit the &lt;span style="font-style: italic;"&gt;Install&lt;/span&gt; script so that the directories are your directories&lt;br /&gt;- In &lt;span style="font-style: italic;"&gt;Install&lt;/span&gt; script, comment the lines to create user qtss and the &lt;span style="font-style: italic;"&gt;chmod&lt;/span&gt; lines&lt;br /&gt;- Change the streamingserver.xml he mentions to update the directory links&lt;br /&gt;- The new streamingadminserver.pl has default configuration values in the script itself, so you have to change those values rather than change an external config file.&lt;br /&gt;&lt;br /&gt;If you are using &lt;span style="font-style: italic;"&gt;vi&lt;/span&gt;, you can do the replacements by issuing the following commands:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;:%s/\/usr\//\/homes\/streaming\/usr\//g&lt;br /&gt;:%s/\/var\//\/homes\/streaming\/var\//g&lt;br /&gt;:%s/\/etc\//\/homes\/streaming\/etc\//g&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;If you are editing streamingserver.pl, you ONLY need to do that for lines 230 - 270 in the current version, because only those are Linux-specific config settings. (Replace % with 230, 270)&lt;br /&gt;&lt;br /&gt;I basically diff'd the config and script files he had with mine and decided to just play it safe and modify the default files.&lt;br /&gt;&lt;br /&gt;Other than that, you should hear more from me after I'm done with my PhD quals in early January ... but at that point, I'll be taking Operating Systems and a seminar course for the Spring 2006 semester.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-113441485633667767?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/113441485633667767/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=113441485633667767' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/113441485633667767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/113441485633667767'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2005/12/phd-qualifiers-installing-darwin.html' title='PhD qualifiers  &amp; Installing Darwin without root account'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-113139846796199047</id><published>2005-11-07T16:19:00.000-05:00</published><updated>2005-11-07T16:21:07.976-05:00</updated><title type='text'>NetSurf - Source code for browser</title><content type='html'>Right after I posted the last post about lack of open-source documentation for HTML parsing, I stumbled across this neat browser for RISC OS: NetSurf. And the &lt;a href="http://netsurf.strcprstskrzkrk.co.uk/codedocs/"&gt;full source code is neatly documented&lt;/a&gt;!&lt;br /&gt;&lt;br /&gt;I plan to go over the code for NetSurf in building my new app.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-113139846796199047?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/113139846796199047/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=113139846796199047' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/113139846796199047'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/113139846796199047'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2005/11/netsurf-source-code-for-browser.html' title='NetSurf - Source code for browser'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-113139672300821711</id><published>2005-11-07T15:47:00.000-05:00</published><updated>2005-12-13T14:03:15.386-05:00</updated><title type='text'>libxml for parsing HTML</title><content type='html'>Long time no see. Have been busy with preparing for my EE PhD qualifiers!&lt;br /&gt;&lt;br /&gt;Well anyway, now I am to create a HTTP-retreiver-&amp;amp;-parser to get files for the 7DS multicast query system. It now has to not only get the result-set for the 7DS queries, but should also get the files themselves, as well as associated elements, such as images, etc.&lt;br /&gt;&lt;br /&gt;I found several HTML parsers for C (after long searches) such as &lt;a href="http://ekhtml.sf.net/"&gt;ekhtml&lt;/a&gt; (nil documentation), &lt;a href="http://tidy.sf.net/"&gt;tidy&lt;/a&gt; (library does not build properly) and &lt;a href="http://www.w3.org/Library/"&gt;LibWWW&lt;/a&gt; (supposed to be very complicated) ... and have settled on using &lt;a href="http://xmlsoft.org/"&gt;LibXML&lt;/a&gt;'s inbuilt HTML parsing tools.&lt;br /&gt;&lt;br /&gt;Sad that open source code has very little documentation ... hey, but neither does 7DS yet!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-113139672300821711?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/113139672300821711/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=113139672300821711' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/113139672300821711'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/113139672300821711'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2005/11/libxml-for-parsing-html.html' title='libxml for parsing HTML'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-112896782260385950</id><published>2005-10-10T13:58:00.000-04:00</published><updated>2005-10-10T14:10:22.610-04:00</updated><title type='text'>Reformatting source</title><content type='html'>I came back from India 2 weeks back, and am spending time reformatting my C source code.&lt;br /&gt;&lt;br /&gt;I am going to use a tool called &lt;a href="http://docpp.sourceforge.net/"&gt;DOC++&lt;/a&gt; for documentation. Also, I am going to split my code in such a way that commonly used functions go into a "library" file.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-112896782260385950?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/112896782260385950/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=112896782260385950' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/112896782260385950'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/112896782260385950'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2005/10/reformatting-source.html' title='Reformatting source'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-112378627519105481</id><published>2005-08-11T14:47:00.000-04:00</published><updated>2005-08-11T14:51:15.193-04:00</updated><title type='text'>Wireless card woes</title><content type='html'>I'm still having problems getting the Senao wireless card to work on WRAP. :(&lt;br /&gt;&lt;br /&gt;I am coming to the conclusion that maybe ... there is something wrong with the device itself?&lt;br /&gt;&lt;br /&gt;I finally managed to get a copy of lspci for Bering and ran it on WRAP - I got it here &lt;a href="http://fritzfam.com/brad/leaftmp/"&gt;http://fritzfam.com/brad/leaftmp/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;But now that I am running lspci, I don't see any wireless card on the PCI list!! :(&lt;br /&gt;&lt;br /&gt;My last hope - that it is a PCI card with a PCMCIA - PCI bridge ... but there's not very much hope.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-112378627519105481?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/112378627519105481/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=112378627519105481' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/112378627519105481'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/112378627519105481'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2005/08/wireless-card-woes.html' title='Wireless card woes'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-112378602203716654</id><published>2005-08-11T14:42:00.000-04:00</published><updated>2005-08-11T14:47:02.043-04:00</updated><title type='text'>7DS works on WRAP</title><content type='html'>I got 7DS working on WRAP now!&lt;br /&gt;&lt;br /&gt;I've mostly focussed on getting the wireless card to work with WRAP for the past few weeks... and in the meantime, I did some work on getting 7DS running on the WRAP board.&lt;br /&gt;&lt;br /&gt;Here are what I did:&lt;br /&gt;- Put all the 7DS binaries into 7ds.lrp&lt;br /&gt;- Ran the query_receiver and it received multicast packets sent by another machine&lt;br /&gt;&lt;span style="font-style: italic;"&gt;(This was a little wierd; multicast did not work one day, but it worked the next.)&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;- Copied the directory structure using /home/local/sumans/ (same as on the development machines) and put this into 7ds_cach.lrp&lt;br /&gt;- Copied the db.7ds.queries sqlite3 database to the appropriate place on the WRAP board&lt;br /&gt;&lt;br /&gt;and it worked!&lt;br /&gt;&lt;br /&gt;Also, I got the 7DS web interface and CGIs working as well. Here's how that was done:&lt;br /&gt;- The website and CGIs are already in 7ds_cach.lrp&lt;br /&gt;- I had to modify the mhttpd setting on WRAP and add this line:&lt;br /&gt;&lt;code&gt;dir = /home/sumans/local/www&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;and that worked as well!&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-112378602203716654?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/112378602203716654/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=112378602203716654' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/112378602203716654'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/112378602203716654'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2005/08/7ds-works-on-wrap.html' title='7DS works on WRAP'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-112231249577506663</id><published>2005-07-25T13:18:00.000-04:00</published><updated>2005-07-25T13:28:15.780-04:00</updated><title type='text'>natsemi network card on WRAP</title><content type='html'>Well, I got the NatSemi network card working on the WRAP board after a lot of confusing tries!&lt;br /&gt;&lt;br /&gt;First of all, I had to uncomment the lines for "crc32" and "natsemi" to load the modules at start up - which I forgot to do.&lt;br /&gt;&lt;br /&gt;Once I did that, I got some "unresolved symbol" error messages. A &lt;a href="http://www.mail-archive.com/leaf-user@lists.sourceforge.net/index.html#20026"&gt;post to the LEAF mailing list&lt;/a&gt; revealed that I might have different versions of the kernel and modules - which was the case! I had downloaded the latest version of kernel and modules, but used an older version of the WRAP-specific kernel ... which is where the problem was.&lt;br /&gt;&lt;br /&gt;I then updated the WRAP board to use the same versions of the kernel and modules, and it worked!&lt;br /&gt;&lt;br /&gt;Not only did the natsemi driver work, but I also got the 7DS multicast network working today! It didn't work last week (CRF told me the systems I was using were behind "different switches") but they sure do work now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-112231249577506663?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/112231249577506663/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=112231249577506663' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/112231249577506663'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/112231249577506663'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2005/07/natsemi-network-card-on-wrap.html' title='natsemi network card on WRAP'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-112136919426974230</id><published>2005-07-14T15:18:00.000-04:00</published><updated>2005-07-14T15:39:59.920-04:00</updated><title type='text'>WRAP, wireless cards and LEAF</title><content type='html'>Now that 7DS runs on LEAF/WRAP, I need to figure out how the wireless card on WRAP works.&lt;br /&gt;&lt;br /&gt;First off, the boot up screen for Bering does not show that a wireless card has been detected.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;PCI: Device 00:95 not found by BIOS&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;Bad news? :(&lt;br /&gt;&lt;br /&gt;After taking a close look at the miniPCI board on the WRAP board, I made out the words "SL-2511MP PLUS 2.10". A Google search reveals that it is a Senao 802.11b wireless card.&lt;br /&gt;&lt;br /&gt;Well, I should have known this because it on the purchase invoice, but I like to do things the hard way. :(&lt;br /&gt;&lt;br /&gt;How do we get LEAF to recognize this?&lt;br /&gt;&lt;br /&gt;A few more hours on Google leads me to dozens of discussions on mailing lists, &lt;a href="http://madwifi.sourceforge.net/"&gt;madwifi&lt;/a&gt;, &lt;a href="http://hostap.sourceforge.net/"&gt;hostap &lt;/a&gt;and &lt;a href="http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/"&gt;Jean Tourrilhes's Linux Wireless page&lt;/a&gt; - which don't help me very much, because Senao is not mentioned anywhere.&lt;br /&gt;&lt;br /&gt;But I have gotten some idea now of how wireless works on Linux.&lt;br /&gt;&lt;br /&gt;The Senao website itself is not helpful. :(&lt;br /&gt;&lt;br /&gt;A few more hours on Google lead to this excellent introduction to the &lt;a href="http://www.seattlewireless.net/index.cgi/SenaoCard"&gt;Senao wireless cards by SeattleWireless&lt;/a&gt; - I learn that the Senao card is built around the Prism 2 chipset. They also say the HostAP drivers work.&lt;br /&gt;&lt;br /&gt;Well, that's something that should get me started on getting the wireless card working...&lt;br /&gt;&lt;br /&gt;And neat - I just found some detailed documentation of setting up &lt;span style="font-style: italic;"&gt;a&lt;/span&gt; wireless card based on the Prism wireless card at &lt;a href="http://www.skippy.net/blog/2005/01/07/hostap/"&gt;skippy.net&lt;/a&gt;!&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-112136919426974230?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/112136919426974230/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=112136919426974230' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/112136919426974230'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/112136919426974230'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2005/07/wrap-wireless-cards-and-leaf.html' title='WRAP, wireless cards and LEAF'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-112136865172352080</id><published>2005-07-14T15:12:00.000-04:00</published><updated>2005-07-14T15:17:31.730-04:00</updated><title type='text'>Made glibc 2.3 lrp package</title><content type='html'>I threw in the towel with uCLibc and created a glibc 2.3.2 LRP package. I also created LRP packages for libm and libpthread that are glibc based.&lt;br /&gt;&lt;br /&gt;And hey - 7DS works on LEAF Bering-uCLibc/WRAP now! (Will try to add screenshots soon.)&lt;br /&gt;&lt;br /&gt;The reason I decided not to use uCLibc was because:&lt;br /&gt;&lt;ol&gt;   &lt;li&gt;I couldn't run it on the Linux box I was building under because I am not root - so no /lib/ld-uclibc.x.x (wonder why the links are hardcoded)&lt;/li&gt;   &lt;li&gt;When I finally managed to transfer a uCLibc-compiled version of a simple program to the WRAP board, two things happened:&lt;/li&gt;   &lt;ol&gt;     &lt;li&gt;First, it complained that libgcc_x.so.1 was missing.&lt;/li&gt;     &lt;li&gt;After I manually copied that library file, my program gave segmentation faults that I couldn't fix, because LEAF has no debugger.&lt;/li&gt;   &lt;/ol&gt; &lt;/ol&gt; So I went back and created my own glibc 2.3 LRP packages. I referred to the files that were in the glibc 2.2.5 package and created one - and it worked!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-112136865172352080?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/112136865172352080/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=112136865172352080' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/112136865172352080'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/112136865172352080'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2005/07/made-glibc-23-lrp-package.html' title='Made glibc 2.3 lrp package'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-112127728937874334</id><published>2005-07-13T13:51:00.000-04:00</published><updated>2005-07-13T13:54:49.383-04:00</updated><title type='text'>Compiling with uCLibc (and) CS MICE</title><content type='html'>I downloaded ucLibc's toolchain (apparently, you have to build a whole new toolchain called "buildroot" to compile programs with uClibc, but that wasn't too hard.)&lt;br /&gt;&lt;br /&gt;Then I built it and compiled a simple program ... and the compile worked. Yay!&lt;br /&gt;&lt;br /&gt;But the program wouldn't run because it was looking for /lib/ld-uclibc.x.x - which I couldn't install because I am not root. :(&lt;br /&gt;&lt;br /&gt;There was something in uCLibc documentation about the paths being hardcoded, wonder why.&lt;br /&gt;&lt;br /&gt;---------&lt;br /&gt;&lt;br /&gt;Also, met with CU-CS webmaster Ben today - talked to him about how to use the MICE system. I will be hacking some PHP scripts to see if I can read data from MICE.&lt;br /&gt;&lt;br /&gt;Eventually, this should develop into a Mambo component that can be plugged into the new Mambo version of the IRT website.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-112127728937874334?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/112127728937874334/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=112127728937874334' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/112127728937874334'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/112127728937874334'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2005/07/compiling-with-uclibc-and-cs-mice.html' title='Compiling with uCLibc (and) CS MICE'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-112110952717022395</id><published>2005-07-11T15:13:00.000-04:00</published><updated>2005-07-11T15:18:47.173-04:00</updated><title type='text'>7DS on WRAP: ucLibc</title><content type='html'>My persistent efforts in making 7DS run on the LEAF/WRAP board hit a dead end last week.&lt;br /&gt;&lt;br /&gt;The reason was that the latest glibc LRP package they have is 2.2.5 ... but my build requires 2.3!&lt;br /&gt;&lt;br /&gt;I thought of creating an LRP package of glibc 2.3, but that may turn out to be a monster library!&lt;br /&gt;&lt;br /&gt;My professor suggested last week that I reconsider and see if I can instead compile 7DS with ucLibc to get it running on WRAP, so I am taking a look at that...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-112110952717022395?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/112110952717022395/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=112110952717022395' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/112110952717022395'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/112110952717022395'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2005/07/7ds-on-wrap-uclibc.html' title='7DS on WRAP: ucLibc'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-112007012904751150</id><published>2005-06-29T14:16:00.000-04:00</published><updated>2005-07-14T15:30:51.066-04:00</updated><title type='text'>Bering-ulibc installed on WRAP</title><content type='html'>Phew, after hours upon hours, I finally succeed in installing Bering-uLibC on the WRAP board!!!&lt;br /&gt;&lt;br /&gt;First off, I couldn't just install and run it as I did with WISP ... Bering-ulibc is a different animal altogether.&lt;br /&gt;&lt;br /&gt;There's a ton of documentation at this page: &lt;a href="http://leaf.sourceforge.net/doc/guide/bucu-sc1100.html"&gt;LEAF for the pcengines WRAP&lt;/a&gt; but some of it might need to be tweaked for your needs. What I did was basically as follows (on Windows XP machine with CF card reader):&lt;br /&gt;&lt;ol&gt;   &lt;li&gt;Popped the CF into memory card reader.&lt;br /&gt;&lt;/li&gt;   &lt;li&gt;Formatted using WinXP DOS format (&lt;span style="font-style: italic;"&gt;format d: /FS:FAT&lt;/span&gt;)&lt;br /&gt;  &lt;span style="font-weight: bold;"&gt;Note: &lt;/span&gt;CF needs to be formatted as FAT12 or FAT16, otherwise it won't boot. And don't worry about having to make a DOS 6.22 boot diskette; WinXP DOS's format works just fine - just make sure to specify /FS:FAT to format it as FAT16.&lt;br /&gt;&lt;/li&gt;   &lt;li&gt;Download syslinux (&lt;a href="http://syslinux.zytor.com/"&gt;http://syslinux.zytor.com/&lt;/a&gt;) and unzip the latest version on your drive.&lt;/li&gt;   &lt;li&gt;Run &lt;span style="font-style: italic;"&gt;syslinux -s d:&lt;/span&gt;&lt;/li&gt;   &lt;li&gt;You should have already downloaded the latest Bering-ulibc package from the download website of the &lt;a href="http://leaf.sourceforge.net/bering-uclibc/"&gt;LEAF website&lt;/a&gt;.&lt;/li&gt;   &lt;li&gt;Unzip the image and use &lt;a href="http://www.winimage.com/"&gt;WinImage&lt;/a&gt; to open the .imz file.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Note: &lt;/span&gt;I wasn't able to unzip their .imz files using any software other than WinImage.&lt;/li&gt;   &lt;li&gt;Unzip the Bering files to a local directory.&lt;/li&gt;   &lt;li&gt;(All following instructions use the same directory.)&lt;br /&gt;&lt;/li&gt;   &lt;li&gt;Download any additional packages and put them in the same directory&lt;/li&gt;   &lt;li&gt;Edit &lt;span style="font-style: italic;"&gt;leaf.cfg&lt;/span&gt; in this directory and make following changes:&lt;br /&gt;  &lt;ul&gt;       &lt;li&gt;Change &lt;span style="font-style: italic;"&gt;/dev/fdxx&lt;/span&gt; to &lt;span style="font-style: italic;"&gt;/dev/hda&lt;/span&gt;&lt;br /&gt;      &lt;span style="font-weight: bold;"&gt;Note: &lt;/span&gt;The documentation says /dev/hda1, but I spent many hours trying to get that to work ... so when I changed it to /dev/hda, it finally worked. Perhaps WRAP uses /dev/hda because there is only one CF without partitions.&lt;/li&gt;       &lt;li&gt;Append the additional packages to the LRP list so that they also boot up.&lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;   &lt;li&gt;Edit &lt;span style="font-style: italic;"&gt;syslinux.cfg&lt;/span&gt; and make the following changes:&lt;br /&gt;  &lt;ul&gt;       &lt;li&gt;Change &lt;span style="font-style: italic;"&gt;/dev/fdxx&lt;/span&gt; to &lt;span style="font-style: italic;"&gt;/dev/hda&lt;/span&gt; &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;   &lt;li&gt;Download the kernel with patch for WRAP that does not require a keyboard controller. Delete the old "linux" file and rename the newly downloaded "linux-2.4.x-xx.tux" to "linux".&lt;/li&gt;   &lt;li&gt;Download the initrd-ide-cd file that will allow you to boot from the CF rather than a floppy. Delete the old "initrd" file and rename your "initrd-ide-cd" to "initrd".&lt;/li&gt;   &lt;li&gt;Copy all your files to the CF.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Note:&lt;/span&gt; You will notice you have an ldlinux.xx on your local directory as well as the CF. Leave the one on the CF intact - it was created by syslinux and you need that to boot the CF.&lt;/li&gt; &lt;/ol&gt; Remove the CF (after unmounting it first if needed), pop it into the WRAP board, and watch WRAP boot up with Bering-ulibc and your required packages!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Edit [July 14, 2005]: One step I missed mentioning here is that you have to make the serial port the primary means of input/output for communicating with the device. Here's some information from the LEAF documentation on &lt;/span&gt;&lt;a style="font-style: italic;" href="http://sourceforge.net/docman/display_doc.php?docid=1428&amp;group_id=13751"&gt;how to use a serial port with LEAF&lt;/a&gt;&lt;span style="font-style: italic;"&gt;.&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &lt;span style="font-style: italic;"&gt;In short, you have to edit syslinux.cfg (use 9600 baud, I had some trouble at higher speeds) and /etc/inittab. The /etc/inittab is the toughie, as you have to unpack the etc.lrp package, edit the file, repackage the LRP and copy it back to your CF.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-112007012904751150?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/112007012904751150/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=112007012904751150' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/112007012904751150'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/112007012904751150'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2005/06/bering-ulibc-installed-on-wrap.html' title='Bering-ulibc installed on WRAP'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-111999384979444790</id><published>2005-06-28T17:19:00.000-04:00</published><updated>2005-06-28T17:24:09.796-04:00</updated><title type='text'>India trip; Mozilla search</title><content type='html'>Today I have had to virtually cancel my India trip due to a lot of reasons. :( I don't expect to be going this year ... hopefully next year.&lt;br /&gt;&lt;br /&gt;For the 7DS project, I have had to look at seeing how Mozilla's toolbar search works. It looks like it has to be built as a &lt;a href="http://mycroft.mozdev.org/deepdocs.html"&gt;plugin for Mycroft&lt;/a&gt;. (Don't be scared by the word plugin - looks like simple "plugins" can be built using XML files.)&lt;br /&gt;&lt;br /&gt;Another interesting thing is the &lt;a href="http://www.mozilla.org/docs/end-user/keywords.html"&gt;keyword search from the address bar&lt;/a&gt;! Sounds interesting...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Other updates:&lt;/span&gt; WRAP is now going to use Bering-uclibc instead of WISP, since the Bering kernel is more recent than the WISP kernel, and also includes the wd1100.o driver by default, which should turn off the "keyboard jammed" messages.&lt;br /&gt;&lt;br /&gt;I've had some trouble getting the Bering image to boot off my CF, but I think it's just a problem of not reading the documentation...&lt;br /&gt;&lt;br /&gt;I'm sure there are other updates related to 7DS over the last week or so, but I've plain forgotten...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-111999384979444790?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/111999384979444790/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=111999384979444790' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/111999384979444790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/111999384979444790'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2005/06/india-trip-mozilla-search.html' title='India trip; Mozilla search'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-111818014821931933</id><published>2005-06-07T17:31:00.000-04:00</published><updated>2005-06-07T17:35:48.223-04:00</updated><title type='text'>Getting the hang of LEAF</title><content type='html'>Whew, I am finally beginning to get the hang of LEAF, how to install packages, etc (at least theoritically.)&lt;br /&gt;&lt;br /&gt;A lesson: for best documentation on open source projects, refer to the mailing lists, not the official website or documentation!&lt;br /&gt;&lt;br /&gt;An aside: I've been looking at BREW and J2ME for porting our 7DS project to cell phones ... but it appears that &lt;a href="http://news.com.com/2100-1033-931583.html"&gt;J2ME beats BREW hands down&lt;/a&gt;? More on this to come.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-111818014821931933?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/111818014821931933/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=111818014821931933' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/111818014821931933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/111818014821931933'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2005/06/getting-hang-of-leaf.html' title='Getting the hang of LEAF'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-111781247306593195</id><published>2005-06-03T11:23:00.000-04:00</published><updated>2005-06-03T11:31:46.346-04:00</updated><title type='text'>sqlite time and date, garbage collection</title><content type='html'>Phew, I _finally_ managed to figure out how to garbage collect old values in a sqlite database.&lt;br /&gt;&lt;br /&gt;There wasn't much documentation on the date/time functions in sqlite, so I had to do quite a bit of reading on that, strftime() as well as locale times (because that heavily influences the strftime () values.)&lt;br /&gt;&lt;br /&gt;Anyway, here is the magic code I used:&lt;br /&gt;&lt;code&gt;DELETE FROM queries WHERE (strftime('%s', time_created) + keepalive*60 - strftime('%s','now', 'localtime') &lt; 0)&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;where my table 'queries' has columns 'query', 'time_created' and 'keepalive' (in minutes).&lt;br /&gt;&lt;br /&gt;The formula is obvious:&lt;br /&gt;if (time_created + keepalive - current_time &lt; 0) {&lt;br /&gt;  delete the query;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;and that's what that SQL does.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-111781247306593195?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/111781247306593195/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=111781247306593195' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/111781247306593195'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/111781247306593195'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2005/06/sqlite-time-and-date-garbage.html' title='sqlite time and date, garbage collection'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-111713855014215877</id><published>2005-05-26T16:12:00.000-04:00</published><updated>2005-05-26T16:15:50.146-04:00</updated><title type='text'>Porting Linux to LEAF</title><content type='html'>Did I ever tell you how hard it is to port Linux applications to embedded systems?&lt;br /&gt;&lt;br /&gt;Well, apparently to port your application to LEAF (running on WRAP with x86 and all), you still need to repackage all our libraries, binaries, etc into a LRP format (a highly compressed .tar.gz file).&lt;br /&gt;&lt;br /&gt;So far, so good, but what happens when you have a ton of libraries to port to the WRAP? Like libxml, swish-e ... tinyHTTP?&lt;br /&gt;&lt;br /&gt;And also, the documentation for making LRP packages is not that good, so you mostly have to find your way through it...&lt;br /&gt;&lt;br /&gt;More on this to come.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-111713855014215877?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/111713855014215877/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=111713855014215877' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/111713855014215877'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/111713855014215877'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2005/05/porting-linux-to-leaf.html' title='Porting Linux to LEAF'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-111600951152095606</id><published>2005-05-13T14:33:00.000-04:00</published><updated>2005-05-13T14:38:31.523-04:00</updated><title type='text'>leaf-wisp and 7DS queries</title><content type='html'>I removed m0n0wall from the WRAP box and "installed" a LEAF distro (branch actually) called "Wisp" which is a small version of LEAF meant for CF cards.&lt;br /&gt;&lt;br /&gt;I just downloaded the binary and wrote it to the CF card, and it works perfectly - except for the silly and well-documented "pc_keyb: keyboard jammed" error message. Other than that, it seems to work smoothly - boots properly and gives me a shell prompt when I quit the configuration screen.&lt;br /&gt;&lt;br /&gt;The 7DS query page is finished: see it in &lt;a href="http://baghdad.clic.cs.columbia.edu:8080/cgi-bin/query_page.cgi"&gt;all its glory in HTML&lt;/a&gt;! (Page subject to change.)&lt;br /&gt;&lt;br /&gt;Of course, it is far from perfect, and I still need to work more on tying the  different pieces together and making them robust.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-111600951152095606?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/111600951152095606/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=111600951152095606' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/111600951152095606'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/111600951152095606'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2005/05/leaf-wisp-and-7ds-queries.html' title='leaf-wisp and 7DS queries'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-111583953907630474</id><published>2005-05-11T15:21:00.000-04:00</published><updated>2005-05-11T15:25:39.086-04:00</updated><title type='text'>XML parsing and more on WRAP</title><content type='html'>I finally managed to get the XML parsing with libxml working to my heart's content. For one, using the &lt;span style="font-style: italic;"&gt;-lxml&lt;/span&gt; apparently uses the old libxml libraries, so I tried compiling my programs with &lt;span style="font-style: italic;"&gt;-lxml2&lt;/span&gt; and that solved a lot of compiler and linker problems.&lt;br /&gt;&lt;br /&gt;When I finally got XML working, my GNU time functions stopped working for some odd reason. &lt;span style="font-style: italic;"&gt;gdb &lt;/span&gt;told me that my program was crashing on the &lt;span style="font-style: italic;"&gt;localtime()&lt;/span&gt; call - while it had been working perfectly all along! Argh!&lt;br /&gt;&lt;br /&gt;As for WRAP box updates - I found out last week that m0n0wall, neat as it is, has no shell and a very limited interface which only allows you to change IP address and a few other elementary settings.&lt;br /&gt;&lt;br /&gt;Our idea of installing 7DS on m0n0wall on WRAP goes out the window!&lt;br /&gt;&lt;br /&gt;But its sibling m0n0box seems interesting and more fully featured, though I would like to see if we can use Linux on WRAP ...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-111583953907630474?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/111583953907630474/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=111583953907630474' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/111583953907630474'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/111583953907630474'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2005/05/xml-parsing-and-more-on-wrap.html' title='XML parsing and more on WRAP'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-111524134082515088</id><published>2005-05-04T17:13:00.000-04:00</published><updated>2005-05-04T17:15:40.833-04:00</updated><title type='text'>libxml &amp; sqlite</title><content type='html'>Well, I finished sorting out &lt;span style="font-style: italic;"&gt;sqlite&lt;/span&gt; and am able to work with it using C programs quite well. The callback functions are a little tricky, but I am getting the hang of them.&lt;br /&gt;&lt;br /&gt;I also started using &lt;span style="font-style: italic;"&gt;libxml&lt;/span&gt; today to encode and parse all those query and response messages. It's really neat and easy, but the code for parsing something is long and complicated! Despite that, working with XML seems to be fun...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-111524134082515088?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/111524134082515088/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=111524134082515088' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/111524134082515088'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/111524134082515088'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2005/05/libxml-sqlite.html' title='libxml &amp; sqlite'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-111505812984873599</id><published>2005-05-02T14:20:00.000-04:00</published><updated>2005-05-02T14:22:09.850-04:00</updated><title type='text'>More on sqlite and WRAP</title><content type='html'>Well, I finally managed to get sqlite working with my C program.&lt;br /&gt;&lt;br /&gt;Installation was easy, and I did that last week. The C API was a little harder, but I got it working today.&lt;br /&gt;&lt;br /&gt;I got the female-female null modem adapter and am going to use it to play with the m0n0box / WRAP system today.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-111505812984873599?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/111505812984873599/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=111505812984873599' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/111505812984873599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/111505812984873599'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2005/05/more-on-sqlite-and-wrap.html' title='More on sqlite and WRAP'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-111463666980107207</id><published>2005-04-27T17:16:00.000-04:00</published><updated>2005-04-27T17:17:49.803-04:00</updated><title type='text'>NSF progress report and SQLite</title><content type='html'>Today I worked on (and finished) a NSF progress report for the components of the 7DS system that I worked on.&lt;br /&gt;&lt;br /&gt;I also started playing with &lt;span style="font-style: italic;"&gt;sqlite&lt;/span&gt; and reading through documentation for it. I need a database for my query-multicast system for 7DS, and it looks like this may be the right fit.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-111463666980107207?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumancolumbia.blogspot.com/feeds/111463666980107207/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12336733&amp;postID=111463666980107207' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/111463666980107207'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/111463666980107207'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2005/04/nsf-progress-report-and-sqlite.html' title='NSF progress report and SQLite'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12336733.post-111410290230031955</id><published>2005-04-21T13:00:00.000-04:00</published><updated>2005-04-21T13:01:42.300-04:00</updated><title type='text'>First post</title><content type='html'>This blog will be about my Computer Science research in the IRT Lab at Columbia University. I am hoping it will help others who struggle with complex hardware and software stuff... and also serve as a reminder for myself when I need to write documentation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12336733-111410290230031955?l=sumancolumbia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/111410290230031955'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12336733/posts/default/111410290230031955'/><link rel='alternate' type='text/html' href='http://sumancolumbia.blogspot.com/2005/04/first-post.html' title='First post'/><author><name>Suman Srinivasan</name><uri>http://www.blogger.com/profile/13931675526899636368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry></feed>
