<?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-9797590</id><updated>2012-02-01T09:41:54.551-08:00</updated><title type='text'>Journey of Life</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default?start-index=101&amp;max-results=100'/><author><name>Tiebing</name><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>350</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-9797590.post-4180916249007051298</id><published>2012-02-01T09:41:00.000-08:00</published><updated>2012-02-01T09:41:54.567-08:00</updated><title type='text'>IE and IPv6 address</title><content type='html'>To use IPv6 address in your IE8/IE9 address bar, you have to add a square bracket to the beginning and the end of the IP address. Your IPv6 URL will look something like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;http://[2001:1:1::02]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-4180916249007051298?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/4180916249007051298/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2012/02/ie-and-ipv6-address.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/4180916249007051298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/4180916249007051298'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2012/02/ie-and-ipv6-address.html' title='IE and IPv6 address'/><author><name>Tiebing</name><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-9797590.post-61785117618577549</id><published>2012-01-24T16:24:00.000-08:00</published><updated>2012-01-24T16:24:22.542-08:00</updated><title type='text'>Change WireShark Dispaly Time to GMT/UTC or other timezone</title><content type='html'>&lt;br /&gt;&lt;div class="MsoNormal"&gt;On Windows:&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;1. Open a CMD window&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;2.&amp;nbsp;set TZ=GMT or TZ=GMT10 or&amp;nbsp;set TZ=GMT-5 (whatever you want your timezone to be)&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;3. lunch wireshark by:&amp;nbsp;"C:\Program Files\Wireshark\wireshark.exe"&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;On Linux:&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;/div&gt;&lt;pre&gt;TZ=GMT wireshark&lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-61785117618577549?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/61785117618577549/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2012/01/change-wireshark-dispaly-time-to-gmtutc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/61785117618577549'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/61785117618577549'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2012/01/change-wireshark-dispaly-time-to-gmtutc.html' title='Change WireShark Dispaly Time to GMT/UTC or other timezone'/><author><name>Tiebing</name><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-9797590.post-1802930254311219474</id><published>2012-01-13T10:21:00.001-08:00</published><updated>2012-01-13T10:21:18.274-08:00</updated><title type='text'>rsync using a different ssh port</title><content type='html'>&lt;code&gt;# rsync -avz -e "ssh -p $portNumber" user@remoteip:/path/to/files/ /local/path/&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-1802930254311219474?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/1802930254311219474/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2012/01/rsync-using-different-ssh-port.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/1802930254311219474'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/1802930254311219474'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2012/01/rsync-using-different-ssh-port.html' title='rsync using a different ssh port'/><author><name>Tiebing</name><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-9797590.post-3291044738208009925</id><published>2011-12-30T15:50:00.001-08:00</published><updated>2011-12-30T15:50:12.011-08:00</updated><title type='text'>Disable Windows Temporary IPv6 Address</title><content type='html'>&lt;br /&gt;&lt;div style="padding-left: 30px;"&gt;In a "cmd" window with administrative rights, run the following commands:&lt;/div&gt;&lt;div style="padding-left: 30px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="padding-left: 30px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;netsh interface ipv6 set privacy state=disabled store=active&lt;br /&gt;netsh interface ipv6 set privacy state=disabled store=persistent&lt;br /&gt;netsh interface ipv6 set global randomizeidentifiers=disabled store=active&lt;br /&gt;netsh interface ipv6 set global randomizeidentifiers=disabled store=persistent&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;Then Restart your machine.&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-3291044738208009925?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/3291044738208009925/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/12/disable-windows-temporary-ipv6-address.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/3291044738208009925'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/3291044738208009925'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/12/disable-windows-temporary-ipv6-address.html' title='Disable Windows Temporary IPv6 Address'/><author><name>Tiebing</name><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-9797590.post-8264473098684040463</id><published>2011-12-29T09:16:00.000-08:00</published><updated>2011-12-29T09:16:11.886-08:00</updated><title type='text'>Shrew Soft VPN client group auth key auth-mutual-psk</title><content type='html'>If you are provided with a shrew-soft Windows VPN client from your company, and you would like to run a VPN client on Linux. You can either use the Shrew VPN client Linux version or another open source VPN client "vpnc".&lt;br /&gt;&lt;br /&gt;To run vpnc, you will need to know the group password. If you export your Shrew VPN profile which is a plain text file, you will see a line in the file that starts with:&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp;b:auth-mutual-psk:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;This is the group password, encoded with BASE64 format. So just copy the value and paste it to any web-based BASE64 decoder such as the one&amp;nbsp;&lt;a href="http://www.opinionatedgeek.com/dotnet/tools/Base64Decode/"&gt;http://www.opinionatedgeek.com/dotnet/tools/Base64Decode/&lt;/a&gt;&amp;nbsp;(This link happens to be on the top when I searched and it works fine), then you get the group password in plain-text.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-8264473098684040463?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/8264473098684040463/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/12/shrew-soft-vpn-client-group-auth-key.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/8264473098684040463'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/8264473098684040463'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/12/shrew-soft-vpn-client-group-auth-key.html' title='Shrew Soft VPN client group auth key auth-mutual-psk'/><author><name>Tiebing</name><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-9797590.post-2440831138644981744</id><published>2011-12-28T16:44:00.000-08:00</published><updated>2011-12-28T16:44:58.778-08:00</updated><title type='text'>Running User Mode Linux as normal non-root user</title><content type='html'>User Mode Linux (UML) is running linux over linux. The guest linux OS runs as a regular process on the host CPU. UML has been around for a while, the famous windows-based "coLinux" is inspired by it.&lt;br /&gt;&lt;br /&gt;An unique feature of UML is that you can run it on a powerful Linux server as a regular user. You do not need any sort of root permission to run it. In fact, this is the only feasible solution for a non-root user (other than QEMU running in emulation mode which is much much slower). UML in fast.&lt;br /&gt;&lt;br /&gt;To get UML running, you need two things: the kernel and the file system. UML provides the kernel and the compilation is straightforward.&lt;br /&gt;&lt;br /&gt;To get file system, you need to have root access on a Linux machine (does not have to be your final HOST machine) and do the following:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;(root@host)# apt-get install debootstrap&lt;/pre&gt;&lt;pre&gt;&lt;pre&gt;(root@host)# cd /tmp&lt;br /&gt;(root@host)# dd if=/dev/zero of=debian.bin bs=1M count=1 seek=4096&lt;br /&gt;(root@host)# mkfs.ext3 debian.bin&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;&lt;pre&gt;(root@host)# mkdir -p /mnt; mount -o loop debian.bin /mnt&lt;br /&gt;(root@host)# debootstrap squeeze /mnt&lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;If you are in the year after 2012, Replace "squeeze" with whatever the latest debian stable version name is. &lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;&lt;pre&gt;(root@host)# chroot /mnt &lt;/pre&gt;&lt;pre&gt;&lt;pre&gt;(chroot@host)# mkdir /dev/ubd&lt;br /&gt;(chroot@host)# cd /dev/ubd&lt;br /&gt;(chroot@host)# for i in 0 1 2 3 4 5 6 7; do mknod $i b 98 $[ $i * 16 ]; done&lt;/pre&gt;&lt;pre&gt;&lt;pre&gt;(chroot@host)# cat &amp;gt; /etc/fstab &amp;lt;&amp;lt; EOF&lt;br /&gt;/dev/ubd/0      /        xfs    defaults 0 0&lt;br /&gt;/dev/ubd/1      none     swap   defaults 0 0&lt;br /&gt;none            /proc    proc   defaults 0 0&lt;br /&gt;sys             /sys     sysfs  defaults 0 0&lt;br /&gt;none            /dev/pts devpts defaults 0 0&lt;br /&gt;EOF&lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;&lt;pre&gt;(chroot@host)# echo uml0 &amp;gt; /etc/hostname&lt;/pre&gt;&lt;pre&gt;&lt;pre&gt;(chroot@host)# exit&lt;br /&gt;(root@host)# rm -f /mnt/root/.bash_history&lt;br /&gt;(root@host)# umount /mnt&lt;/pre&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;Now the file debian.bin has the latest debian base installation. This is your File System. &lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;Now you need to download and compile Slirp from http://slirp.sourceforge.net/. Slirp is a cool hack that allows UML limited access to the network by &lt;/pre&gt;tunneling it over regular UDP and TCP connections. This is really the key to making UML useful as a regular user. The other (better) methods for accessing the network need root access. Be sure to apply the latest patch, as otherwise it does not work. It is critical to edit &lt;code&gt;config.h&lt;/code&gt; and uncomment the line that says &lt;code&gt;#define FULL_BOLT&lt;/code&gt;. This will make Slirp go as fast as it can. Otherwise, slirp will only go 115kbps. Trying to do "apt-get" over that is painful. &lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;Copy the slirp program you build to /home/YOU/bin/&lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;./linux ubd0=debian6.bin con=pts con0=fd:0,fd:1 eth0=slirp,,/home/user/bin/slirp&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;I also add "single rw" to get linux boot into single mode and get me started. Once everything is running, I take out "single rw" so that all the daemons are started correctly.&lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;I also have a file ~/.slirprc to direct TCP connections so that I can ssh into the UML. &lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;#cat ~/.slirprc&lt;br /&gt;redir 2200 22&lt;br /&gt;&lt;/pre&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;pre&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-2440831138644981744?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/2440831138644981744/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/12/running-user-mode-linux-as-normal-non.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/2440831138644981744'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/2440831138644981744'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/12/running-user-mode-linux-as-normal-non.html' title='Running User Mode Linux as normal non-root user'/><author><name>Tiebing</name><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-9797590.post-661929856982184298</id><published>2011-12-23T12:08:00.001-08:00</published><updated>2011-12-29T16:04:59.954-08:00</updated><title type='text'>StrongSwan Configuration Guide</title><content type='html'>Recently I got a chance to study strongswan and itsconfigurations. This document intends to record the findings, in the hope tohelp myself in the future and to help others too.&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Strongswan is open-source IPSec/VPN software. It was basedon FreeSwan, whose development is now stopped. Another descendent of FreeSwanis “OpenSwan”. I have no experience with OpenSwan, and therefore will befocusing on StrongSwan in this document.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;By the way, I found the authors of StrongSwan (Andrea andMartini) very much helpful. The know strongswan inside out and was able toexplain things really well in many of the mailinglist posts and also in thewiki documentation. This is a great strength of strongswan.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;StrongSwan’s core VPN behavior is largely controlled by theconfiguration file /etc/ipsec.conf. There are many possible lines there you canput in this file. Some lines are extremely important, and a good understandingof what they mean is critical to the successful establishment of the VPNtunnels.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;There are a few types of VPN Connections:&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;ol start="1" style="margin-top: 0in;" type="1"&gt;&lt;li class="MsoNormal"&gt;Host     to Host&lt;/li&gt;&lt;li class="MsoNormal"&gt;Net to     Net&lt;/li&gt;&lt;li class="MsoNormal"&gt;Host     to Net&lt;/li&gt;&lt;/ol&gt;&lt;div class="MsoNormal" style="margin-left: .25in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Host to Host is fairly rare, and many of the things discussedhere also apply to apply to it. So I will focus on “net-net” and “host-net”.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;The following settings are tested with StrongSwan 4.5.3 and4.6.1.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="border-bottom: solid windowtext 1.0pt; border: none; mso-border-bottom-alt: solid windowtext .75pt; mso-element: para-border-div; padding: 0in 0in 1.0pt 0in;"&gt;&lt;div class="MsoNormal" style="border: none; margin-left: .25in; mso-border-bottom-alt: solid windowtext .75pt; mso-list: l2 level1 lfo1; mso-padding-alt: 0in 0in 1.0pt 0in; padding: 0in; tab-stops: list .25in; text-indent: -.25in;"&gt;&lt;b&gt;1.&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span dir="LTR"&gt;&lt;b&gt;Common Configuration&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Common configuration lines in /etc/ipsec.conf&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Code"&gt;config setup&lt;/div&gt;&lt;div class="Code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strictcrlpolicy=no&lt;/div&gt;&lt;div class="Code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; charonstart=yes&lt;/div&gt;&lt;div class="Code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; plutostart=no&lt;/div&gt;&lt;div class="Code"&gt;conn %default&lt;/div&gt;&lt;div class="Code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ikelifetime=60m&lt;/div&gt;&lt;div class="Code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;keylife=20m&lt;/div&gt;&lt;div class="Code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rekeymargin=3m&lt;/div&gt;&lt;div class="Code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; keyingtries=1&lt;/div&gt;&lt;div class="Code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; keyexchange=ikev2&lt;/div&gt;&lt;div class="Code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;esp=aes256gcm16,aes128gcm16!&lt;/div&gt;&lt;div class="Code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mobike=yes&lt;/div&gt;&lt;div class="Code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; leftikeport=4500&lt;/div&gt;&lt;div class="Code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rightikeport=4500&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Explanations:&lt;/div&gt;&lt;div class="Code"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;“strictcrlpolicy” indicates whether CRL is mandatory or not.If CRL is not mandatory, put no. Otherwise, put yes.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;“Charon” is the IKEv2 daemon, and “Pluto” is the IKEv1daemon. In this document, we are only using “IKEv2” and will focus on IKEv2options only.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;“Mobike” stands for Mobile IKE. This is for the case wherethe public IP of the device may change. If Mobike is enabled, strongswan mayfloat its communication port from UDP port 500 to UDP port 4500 and starttelling the Linux kernel to use UDP encapsulation for ESP packets.&amp;nbsp; It is a good thing to enable if there is achance that your device’s public IP may change.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;“leftikepor” and “rightikeport” tells strongswan to alwaysuse UDP port 4500, from the very beginning of IKEv2 message exchange. &lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="border-bottom: solid windowtext 1.0pt; border: none; mso-border-bottom-alt: solid windowtext .75pt; mso-element: para-border-div; padding: 0in 0in 1.0pt 0in;"&gt;&lt;div class="MsoNormal" style="border: none; margin-left: .25in; mso-border-bottom-alt: solid windowtext .75pt; mso-list: l2 level1 lfo1; mso-padding-alt: 0in 0in 1.0pt 0in; padding: 0in; tab-stops: list .25in; text-indent: -.25in;"&gt;&lt;b&gt;2.&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span dir="LTR"&gt;&lt;b&gt;Net to Net&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 18.25pt; mso-list: l2 level2 lfo1; tab-stops: list 18.25pt; text-indent: -18.25pt;"&gt;2.1&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&amp;nbsp; &lt;/span&gt;&lt;span dir="LTR"&gt;&amp;nbsp;VPN Server&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;u&gt;A working net-net &lt;b&gt;VPN SERVER&lt;/b&gt; configuration file&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/div&gt;&lt;div class="Code"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Code"&gt;&lt;st1:state w:st="on"&gt;&lt;st1:place w:st="on"&gt;Conn&lt;/st1:place&gt;&lt;/st1:state&gt;myvpn&lt;/div&gt;&lt;div class="Code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; left=%defaultroute&lt;/div&gt;&lt;div class="Code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;leftcert=/etc/certs/vpn.cert&lt;/div&gt;&lt;div class="Code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;leftsubnet=192.168.17.0/24&lt;/div&gt;&lt;div class="Code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; leftfirewall=yes&lt;/div&gt;&lt;div class="Code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; right=%any&lt;/div&gt;&lt;div class="Code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; rightsubnet=0.0.0.0/0&lt;/div&gt;&lt;div class="Code" style="text-indent: 23.65pt;"&gt;auto=add&lt;/div&gt;&lt;div class="MsoNormal" style="text-indent: 23.65pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Left means “my side”. Right means “my peer’s side”.&amp;nbsp; You could switch it the other way, but thisis how most people use it and is a common convention. Unless one really wantsto be different and asking for troubles, it is strongly suggested that thiscommon convention be followed.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;“left” is your IP address. This can be set to“%defaultroute” where the system will figure out the value based on the “right”IP address. &lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;“leftcert” is the certificate file of the left. The filepath can be an absolute path (starting with /) or a relative path, in whichcase, the system will look for certs under /etc/ipsec.d/certs/&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;“leftsubnet”: This is “the” critical line that tellsstrongswan you want a subnet tunnel instead of a host tunnel. Without thisline, the strongswan will try to make a host-only tunnel.&amp;nbsp; This is the subnet on “your” device’s side.Your peers will only be able to talk to IPs in this subnet.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;“leftfirewall”: optional. Tells strongswan to automaticallyinsert firewall rules (iptables rules) when a connection is up or down.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;“right” is the peer’s address. For server, this can be“%any”.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;“rightsubnet”: similar to “leftsubnet”, this line iscritical to indicating that you want to connect to a “subnet”, not just aremote host. Unless “leftsubnet”, you can put “0.0.0.0/0” indicating that youjust accept the subnet that the peer defines.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;“auto=add” means when you run “ipsec start”, the ipsecdaemon just listens, not initiate a connection. “auto=start” means that whenyou run “ipsec start”, the ipsec daemon will actually try to initiate a call.So “auto=add” is good for servers, and “auto=start” is good for clients.“auto=start” is equivalent to “auto=add” plus “ipsec up MYCONNECTION”&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;We skipped “leftid=”. leftid by default is derived from theleftcert certificate file, using the Distinguished Name, in the format of“C=XX, O=XXX, CN=XXX, …”. There are any forms of ID that can be used by theleftid/rightid field, but in this document we chose to use this format. See theend of this document for more detailed description of leftid/rightid field.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;u&gt;A working net-net &lt;b&gt;VPN CLIENT&lt;/b&gt; configuration file&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Net-net is pretty much symmetrical. You can run the abovesame configuration file on client side and it will work. I chose to one moreconfiguration line:&lt;/div&gt;&lt;div class="Code" style="text-indent: 23.65pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Code" style="text-indent: 23.65pt;"&gt;rightid="C=CH, O=strongSwan, CN=server"&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;This tells the client to check the server’s certificate IDand make sure it matches this ID. This is just to be safe so that I know I didnot connect to some other server. Keep this mind this is after the servercertificate is being authenticated by the CA certificate.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="border-bottom: solid windowtext 1.0pt; border: none; mso-border-bottom-alt: solid windowtext .75pt; mso-element: para-border-div; padding: 0in 0in 1.0pt 0in;"&gt;&lt;div class="MsoNormal" style="border: none; margin-left: .25in; mso-border-bottom-alt: solid windowtext .75pt; mso-list: l2 level1 lfo1; mso-padding-alt: 0in 0in 1.0pt 0in; padding: 0in; tab-stops: list .25in; text-indent: -.25in;"&gt;&lt;b&gt;3.&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span dir="LTR"&gt;&lt;b&gt;Host to Net&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: .25in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 18.25pt; mso-list: l2 level2 lfo1; tab-stops: list 18.25pt; text-indent: -18.25pt;"&gt;3.1&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&amp;nbsp; &lt;/span&gt;&lt;span dir="LTR"&gt;&amp;nbsp;VPN Server&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;u&gt;A working host-net &lt;b&gt;VPN SERVER&lt;/b&gt; configuration file&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/div&gt;&lt;div class="Code"&gt;conn server&lt;/div&gt;&lt;div class="Code" style="text-indent: 23.65pt;"&gt;leftcert=server.cert&lt;/div&gt;&lt;div class="Code" style="text-indent: 23.65pt;"&gt;leftfirewall=yes&lt;/div&gt;&lt;div class="Code" style="text-indent: 23.65pt;"&gt;right=%any&lt;/div&gt;&lt;div class="Code" style="text-indent: 23.65pt;"&gt;rightsourceip=192.168.22.0/24&lt;/div&gt;&lt;div class="Code" style="text-indent: 23.65pt;"&gt;auto=add&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Notice that we simply removed “leftsubnet” and “rightsubnet”from the net-net VPN SERVER configuration, and here we have a host-net VPNSERVER.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;We added one more line “rightsourceip”. This enables theserver to “automatically assign a virtual IP address to the connecting peer”.&lt;br /&gt;&lt;br /&gt;Note that in IKEv1 (Pluto) "rightsourceip" can be used to specify the internal side IP address. For IKEv2 (Charon) this is done automatically by the charon daemon and rightsourceip takes up the new meaning of requesting a virtual IP address. If the server does not have "rightsourceip" configured but client has "leftsourceip=x.x.x.x" configured, the tunnel establishment will fail because the server is rejecting the request for a virtual IP address.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 18.25pt; mso-list: l2 level2 lfo1; tab-stops: list 18.25pt; text-indent: -18.25pt;"&gt;3.2&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&amp;nbsp; &lt;/span&gt;&lt;span dir="LTR"&gt;VPN Client&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;u&gt;A working host-net &lt;b&gt;VPN CLIENT&lt;/b&gt; configuration file&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Code" style="margin-left: .5in;"&gt;left=%defaultroute&lt;/div&gt;&lt;div class="Code" style="margin-left: .5in;"&gt;leftcert=client.cert&lt;/div&gt;&lt;div class="Code" style="margin-left: .5in;"&gt;leftsourceip=%config&lt;/div&gt;&lt;div class="Code" style="margin-left: .5in;"&gt;leftfirewall=yes&lt;/div&gt;&lt;div class="Code" style="margin-left: .5in;"&gt;right=192.168.5.1&lt;/div&gt;&lt;div class="Code" style="text-indent: .5in;"&gt;rightid="C=CH, O=strongSwan, CN=server"&lt;/div&gt;&lt;div class="Code" style="margin-left: .5in;"&gt;auto=start&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;The only special line here is “leftsourceip”, which tellsthe client to obtain a virtual IP address from the VPN Server.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="border-bottom: solid windowtext 1.0pt; border: none; mso-border-bottom-alt: solid windowtext .75pt; mso-element: para-border-div; padding: 0in 0in 1.0pt 0in;"&gt;&lt;div class="MsoNormal" style="border: none; margin-left: .25in; mso-border-bottom-alt: solid windowtext .75pt; mso-list: l2 level1 lfo1; mso-padding-alt: 0in 0in 1.0pt 0in; padding: 0in; tab-stops: list .25in; text-indent: -.25in;"&gt;&lt;b&gt;4.&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span dir="LTR"&gt;&lt;b&gt;&amp;nbsp;leftid and rightid, what to use?&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;The ID by which a peer is identifying itself during IKE mainmode can by any of the ID types &lt;i&gt;IPV4_ADDR&lt;/i&gt;, &lt;i&gt;FQDN&lt;/i&gt;, &lt;i&gt;USER_FQDN&lt;/i&gt;or &lt;i&gt;DER_ASN1_DN&lt;/i&gt;. If one of the first three ID types is used, then theaccompanying X.509 certificate of the peer must contain a matching &lt;i&gt;subjectAltName&lt;/i&gt;field of the type &lt;i&gt;ipAddress&lt;/i&gt; (&lt;i&gt;IP:&lt;/i&gt;), &lt;i&gt;dnsName&lt;/i&gt; (&lt;i&gt;DNS:&lt;/i&gt;)or &lt;i&gt;rfc822Name&lt;/i&gt; (&lt;i&gt;email:&lt;/i&gt;), respectively. &lt;b&gt;With the fourth type &lt;i&gt;DER_ASN1_DN,&lt;/i&gt;the identifier must completely match the &lt;i&gt;subject&lt;/i&gt; field of the peer'scertificate&lt;/b&gt;. One of the two possible representations of a DistinguishedName (DN) is the LDAP-type format&lt;/div&gt;&lt;div class="Code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rightid="C=CH,O=Linux strongSwan,CN=sun.strongswan.org"&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Additional whitespace can be added everywhere as desiredsince it will be automatically eliminated by the X.509 parser. An exception isthe single whitespace between individual words , like e.g. in &lt;i&gt;LinuxstrongSwan&lt;/i&gt;, which is preserved by the parser.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;The Relative Distinguished Names (RDNs) can alternatively beseparated by a slash ( &lt;i&gt;'/'&lt;/i&gt;)&amp;nbsp; instead of a comma (&lt;i&gt;',')&lt;/i&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Code" style="text-indent: 23.65pt;"&gt;rightid="/C=CH/O=LinuxstrongSwan/CN=sun.strongswan.org"&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;This is the representation extracted from the certificate bythe OpenSSL command line option&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Code" style="text-indent: 23.65pt;"&gt;openssl x509 -in sunCert.pem -noout –subject&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;The following X.501 RDNs are supported by &lt;b&gt;&lt;i&gt;strongSwan&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border: outset black 1.0pt; mso-border-alt: outset black .75pt; mso-cellspacing: 0in; mso-padding-alt: 1.05pt 1.05pt 1.05pt 1.05pt; width: 75.0%;"&gt; &lt;tbody&gt;&lt;tr style="height: 11.3pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0;"&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 25.0%;" width="25%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;DC&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 50.0%;" width="50%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;Domain Component&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr style="height: 11.3pt; mso-yfti-irow: 1;"&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 25.0%;" width="25%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;C&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 50.0%;" width="50%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;Country&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr style="height: 11.3pt; mso-yfti-irow: 2;"&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 25.0%;" width="25%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;ST&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 50.0%;" width="50%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;State or province&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr style="height: 10.2pt; mso-yfti-irow: 3;"&gt;  &lt;td style="border: inset black 1.0pt; height: 10.2pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 25.0%;" width="25%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;L&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;td style="border: inset black 1.0pt; height: 10.2pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 50.0%;" width="50%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;Locality or town&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr style="height: 11.3pt; mso-yfti-irow: 4;"&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 25.0%;" width="25%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;O&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 50.0%;" width="50%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;Organisation&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr style="height: 11.3pt; mso-yfti-irow: 5;"&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 25.0%;" width="25%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;OU&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 50.0%;" width="50%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;Organisational Unit&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr style="height: 11.3pt; mso-yfti-irow: 6;"&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 25.0%;" width="25%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;CN&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 50.0%;" width="50%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;Common Name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr style="height: 11.3pt; mso-yfti-irow: 7;"&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 25.0%;" width="25%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;ND&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 50.0%;" width="50%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;Name Distinguisher,  used with &lt;i&gt;CN&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr style="height: 11.3pt; mso-yfti-irow: 8;"&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 25.0%;" width="25%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;N&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 50.0%;" width="50%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;Name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr style="height: 11.3pt; mso-yfti-irow: 9;"&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 25.0%;" width="25%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;G&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 50.0%;" width="50%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;Given name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr style="height: 11.3pt; mso-yfti-irow: 10;"&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 25.0%;" width="25%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;S&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 50.0%;" width="50%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;Surname&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr style="height: 11.3pt; mso-yfti-irow: 11;"&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 25.0%;" width="25%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;I&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 50.0%;" width="50%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;Initials&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr style="height: 11.3pt; mso-yfti-irow: 12;"&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 25.0%;" width="25%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;T&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 50.0%;" width="50%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;Personal title&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr style="height: 11.3pt; mso-yfti-irow: 13;"&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 25.0%;" width="25%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;E&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 50.0%;" width="50%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;E-mail&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr style="height: 11.3pt; mso-yfti-irow: 14;"&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 25.0%;" width="25%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;Email&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 50.0%;" width="50%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;E-mail&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr style="height: 11.3pt; mso-yfti-irow: 15;"&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 25.0%;" width="25%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp; emailAddress&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 50.0%;" width="50%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;E-mail&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr style="height: 11.3pt; mso-yfti-irow: 16;"&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 25.0%;" width="25%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;SN&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 50.0%;" width="50%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;Serial number&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr style="height: 11.3pt; mso-yfti-irow: 17;"&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 25.0%;" width="25%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp; serialNumber&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 50.0%;" width="50%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;Serial number&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr style="height: 11.3pt; mso-yfti-irow: 18;"&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 25.0%;" width="25%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;D&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 50.0%;" width="50%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;Description&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr style="height: 11.3pt; mso-yfti-irow: 19;"&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 25.0%;" width="25%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;UID&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 50.0%;" width="50%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;User ID&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr style="height: 11.3pt; mso-yfti-irow: 20;"&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 25.0%;" width="25%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;ID&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 50.0%;" width="50%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;X.500 Unique  Identifier&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr style="height: 11.3pt; mso-yfti-irow: 21;"&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 25.0%;" width="25%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;TCGID&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 50.0%;" width="50%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;[Siemens] &lt;st1:place w:st="on"&gt;&lt;st1:placename w:st="on"&gt;Trust&lt;/st1:placename&gt; &lt;st1:placetype w:st="on"&gt;Center&lt;/st1:placetype&gt;&lt;/st1:place&gt; Global ID&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr style="height: 11.3pt; mso-yfti-irow: 22;"&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 25.0%;" width="25%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;unstructuredName&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 50.0%;" width="50%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;Unstructured Name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr style="height: 11.3pt; mso-yfti-irow: 23;"&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 25.0%;" width="25%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;UN&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 50.0%;" width="50%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;Unstructured Name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr style="height: 11.3pt; mso-yfti-irow: 24;"&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 25.0%;" width="25%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;employeeNumber&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 50.0%;" width="50%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;Employee Number&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr style="height: 11.3pt; mso-yfti-irow: 25; mso-yfti-lastrow: yes;"&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 25.0%;" width="25%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;EN&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;td style="border: inset black 1.0pt; height: 11.3pt; mso-border-alt: inset black .75pt; padding: 1.05pt 1.05pt 1.05pt 1.05pt; width: 50.0%;" width="50%"&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&amp;nbsp;Employee Number&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="border-bottom: solid windowtext 1.0pt; border: none; mso-border-bottom-alt: solid windowtext .75pt; mso-element: para-border-div; padding: 0in 0in 1.0pt 0in;"&gt;&lt;div class="MsoNormal" style="border: none; margin-left: .25in; mso-border-bottom-alt: solid windowtext .75pt; mso-list: l2 level1 lfo1; mso-padding-alt: 0in 0in 1.0pt 0in; padding: 0in; tab-stops: list .25in; text-indent: -.25in;"&gt;&lt;b&gt;5.&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span dir="LTR"&gt;&lt;b&gt;Recommended Documentation&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol start="1" style="margin-top: 0in;" type="1"&gt;&lt;li class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;&lt;a href="http://www.strongswan.org/docs/readme.htm"&gt;http://www.strongswan.org/docs/readme.htm&lt;/a&gt;     I’ve found this readme file very helpful, although it may be a little old.     Information presented here still applies. &amp;nbsp;It is a good starting point, and gives     you a good base understanding of everything. This should be the first     read, and then you can move on to other documentation such as the wiki.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;Strong Swan WiKi, which contains “lots of”     information. Here is a guide to get you started:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;ol start="1" style="margin-top: 0in;" type="a"&gt;&lt;li class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;IpsecConf &lt;/span&gt;&lt;span style="font-size: 9pt;"&gt;&lt;a href="http://wiki.strongswan.org/projects/strongswan/wiki/IpsecConf"&gt;http://wiki.strongswan.org/projects/strongswan/wiki/IpsecConf&lt;/a&gt;&lt;/span&gt;&lt;span style="font-size: 10.5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;ConnSection &lt;/span&gt;&lt;span style="font-size: 9pt;"&gt;&lt;a href="http://wiki.strongswan.org/projects/strongswan/wiki/ConnSection"&gt;http://wiki.strongswan.org/projects/strongswan/wiki/ConnSection&lt;/a&gt;&lt;/span&gt;&lt;span style="font-size: 10.5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal"&gt;&lt;span style="font-size: 10.5pt;"&gt;ConfigurationExamples&lt;/span&gt;&lt;span style="font-size: 9pt;"&gt;: &lt;a href="http://wiki.strongswan.org/projects/strongswan/wiki/UserDocumentation#Configuration-Examples"&gt;http://wiki.strongswan.org/projects/strongswan/wiki/UserDocumentation#Configuration-Examples&lt;/a&gt;&lt;/span&gt;&lt;span style="font-size: 10.5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/ol&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-661929856982184298?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/661929856982184298/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/12/strongswanconfiguration-guide-recently.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/661929856982184298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/661929856982184298'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/12/strongswanconfiguration-guide-recently.html' title='StrongSwan Configuration Guide'/><author><name>Tiebing</name><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-9797590.post-7673111457602052471</id><published>2011-12-15T10:57:00.000-08:00</published><updated>2011-12-15T10:57:52.907-08:00</updated><title type='text'>ubuntu kvm KSM high cpu usage</title><content type='html'>Source:&amp;nbsp;&lt;a href="http://www.interphero.com/?p=219"&gt;http://www.interphero.com/?p=219&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If you use KVM virtualization, under Ubuntu 10.04 Server LTS, with more than one virtual host running at a time, you may have noticed &lt;em&gt;ksmd&lt;/em&gt; eating a lot of CPU cycles.&amp;nbsp; This behavior was not present under 8.04 Server LTS.&amp;nbsp; Apparently, the kmsd functionality was enabled by default in 10.04.&amp;nbsp; KSM – Kernel Samepage Merging – merges memory pages between virtual hosts to save space.&amp;nbsp; Unfortunately, for some, it also utilizes a lot of CPU resources to perform this function.&amp;nbsp; For my use case, I don’t care about the amount of RAM occupied by my virtual hosts, indeed, I installed far more RAM than I need in my server so that I don’t have to worry about a lack of RAM.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;If you would like to disable ksmd, edit your &lt;em&gt;/etc/default/qemu-kvm&lt;/em&gt; file as follows:&lt;br /&gt;&lt;br /&gt;&lt;div class="entry-content"&gt;&lt;br /&gt;# To disable qemu-kvm’s page merging feature, set KSM_ENABLED=0 and&lt;br /&gt;# sudo restart qemu-kvm&lt;br /&gt;KSM_ENABLED=0&lt;br /&gt;#SLEEP_MILLISECS=2000&lt;br /&gt;&lt;br /&gt;Then, as the comments in the file state, restart qemu-kvm. (stop your VM, then "sudo stop qemu-kvm", then "sudo start qemu-kvm")&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-7673111457602052471?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/7673111457602052471/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/12/ubuntu-kvm-ksm-high-cpu-usage.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/7673111457602052471'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/7673111457602052471'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/12/ubuntu-kvm-ksm-high-cpu-usage.html' title='ubuntu kvm KSM high cpu usage'/><author><name>Tiebing</name><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-9797590.post-4811391422621361338</id><published>2011-12-13T06:56:00.001-08:00</published><updated>2011-12-13T07:05:39.610-08:00</updated><title type='text'>Net-snmp debug token list</title><content type='html'>&lt;a href="http://net-snmp.sourceforge.net/wiki/index.php/Debug_tokens_5.4.2.1"&gt;http://net-snmp.sourceforge.net/wiki/index.php/Debug_tokens_5.4.2.1&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;For example:&amp;nbsp;register_mib is an useful token for debugging SNMP AGENTX subagents.&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-4811391422621361338?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/4811391422621361338/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/12/net-snmp-debug-token-list.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/4811391422621361338'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/4811391422621361338'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/12/net-snmp-debug-token-list.html' title='Net-snmp debug token list'/><author><name>Tiebing</name><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-9797590.post-2283000644617409312</id><published>2011-12-07T17:11:00.001-08:00</published><updated>2011-12-07T17:11:17.810-08:00</updated><title type='text'>crontab for non-root user</title><content type='html'>If you could not get your crontab file to work with non-root user, and you have made sure the crond is running and your crontab syntax is correct, check this:&lt;br /&gt;&lt;br /&gt;Make sure there is an empty line as last line in your crontab file.&lt;br /&gt;&lt;br /&gt;This fixed my problem.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-2283000644617409312?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/2283000644617409312/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/12/crontab-for-non-root-user.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/2283000644617409312'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/2283000644617409312'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/12/crontab-for-non-root-user.html' title='crontab for non-root user'/><author><name>Tiebing</name><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-9797590.post-3528217498467750757</id><published>2011-11-15T17:38:00.001-08:00</published><updated>2011-11-15T17:39:17.066-08:00</updated><title type='text'>Samba shared drive on Ubuntu/Debian</title><content type='html'>This samba configuration file configures the samba to be a group shared drive (x: drive). All users access are guest.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;File: /etc/samba/smb.conf&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;----------------------------------&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;[global]&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;workgroup = DOCS&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;netbios name = DOCS_SRV2&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;security = share&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;name resolve order = wins lmhosts bcast host&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;wins server = 10.10.0.10&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;wins proxy = yes&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;guest account = nobody&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;[X]&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; comment = Guest Share&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; path = /data/x&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; browseable = yes&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; read only = no&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; guest ok = yes&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; guest account = nobody&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; guest only = yes&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-3528217498467750757?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/3528217498467750757/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/11/samba-shared-drive-on-ubuntudebian.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/3528217498467750757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/3528217498467750757'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/11/samba-shared-drive-on-ubuntudebian.html' title='Samba shared drive on Ubuntu/Debian'/><author><name>Tiebing</name><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-9797590.post-1102416732915985540</id><published>2011-11-09T13:51:00.000-08:00</published><updated>2011-11-09T13:51:48.773-08:00</updated><title type='text'>cvs server setup in debian / ubuntu</title><content type='html'>&lt;br /&gt;&lt;h3 class="post-title entry-title"&gt;&amp;nbsp;Setup CVS server on Debian / Ubuntu&lt;/h3&gt;&lt;div class="post-header"&gt;&lt;div class="post-header-line-1"&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="post-body entry-content" id="post-body-3290695010395931633"&gt;&lt;b&gt;1. Install CVS client and server:&lt;/b&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;apt-get install cvs cvsd&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;With the default installation, the root for cvsd is at /var/lib/cvsd.The default repositories demo and myrepos are defined in the configuration file /etc/cvsd/cvsd.conf.&lt;/div&gt;&lt;div class="post-body entry-content" id="post-body-3290695010395931633"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="post-body entry-content" id="post-body-3290695010395931633"&gt;By default, cvsd is installed in a chroot environment. To make it use the regular / environment, change this in cvsd.conf:&lt;/div&gt;&lt;div class="post-body entry-content" id="post-body-3290695010395931633"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="post-body entry-content" id="post-body-3290695010395931633"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; RootJail none&lt;/span&gt;&lt;/div&gt;&lt;div class="post-body entry-content" id="post-body-3290695010395931633"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="post-body entry-content" id="post-body-3290695010395931633"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Also, you may want to change the Listen statement to the following so that it does not listening on IPv6 sockets.&lt;/span&gt;&lt;/div&gt;&lt;div class="post-body entry-content" id="post-body-3290695010395931633"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="post-body entry-content" id="post-body-3290695010395931633"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;div class="post-body entry-content" id="post-body-3290695010395931633"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Listen 0.0.0.0 2401&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;br /&gt;&lt;b&gt;2. Start the CVS server:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;sudo /etc/init.d/cvsd start&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3. &lt;b&gt;Create myrepos and CVSROOT directories&lt;/b&gt; with following command (Note: the absolute path is needed to initialize the repose):&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;sudo cvs -d /var/lib/cvsd/myrepos init&lt;br /&gt;sudo chown -R cvsd:cvsd /var/lib/cvsd/myrepos&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The basic structures of cvsd and the repository $CVSROOT are ready.&lt;br /&gt;&lt;br /&gt;4. &lt;b&gt;Add user to the group cvsd and create the password for users.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;From System-&amp;gt;Administration-&amp;gt;Users and Groups. Click Unlock button and enter the password, then click Manage Groups button. Highlight cvsd then click Properties and select the username from the Group Members list.&lt;br /&gt;&lt;br /&gt;Create the user password for CVS login as shown below:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;cvsd-passwd /var/lib/cvsd/myrepos username&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;5. &lt;b&gt;Login to cvs server&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;cvs -d :pserver:username@localhost:/myrepos login&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;However, if the $CVSROOT is defined just simply enter "cvs login" instead. Add following line in ~/.bashrc is the easiest way to add it to the environment.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;export CVSROOT=:pserver:$USER@localhost:/myrepos&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If log in has no problem, CVS should be working fine.&lt;/div&gt;&lt;div class="post-body entry-content" id="post-body-3290695010395931633"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="post-body entry-content" id="post-body-3290695010395931633"&gt;Adapted from this post:&amp;nbsp;&lt;a href="http://pwong-tipsandtricks.blogspot.com/2009/09/setup-cvs-server-on-ubuntu.html"&gt;http://pwong-tipsandtricks.blogspot.com/2009/09/setup-cvs-server-on-ubuntu.html&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-1102416732915985540?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/1102416732915985540/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/11/cvs-server-setup-in-debian-ubuntu.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/1102416732915985540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/1102416732915985540'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/11/cvs-server-setup-in-debian-ubuntu.html' title='cvs server setup in debian / ubuntu'/><author><name>Tiebing</name><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-9797590.post-1979817454382264328</id><published>2011-11-03T11:39:00.000-07:00</published><updated>2011-11-03T11:39:48.777-07:00</updated><title type='text'>Windows SSH client with automatic reconnect capability</title><content type='html'>Putty does not automatic reconnect. There are a few that do:&lt;br /&gt;&lt;br /&gt;1.&amp;nbsp;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;a href="http://nemesis2.qx.net/pages/MyEnTunnel"&gt;MyEnTunnel &amp;nbsp;&lt;/a&gt;,&lt;/span&gt; Your background ssh tunnel software that runs on Windows.&lt;br /&gt;2.&amp;nbsp;Tunnelier &amp;nbsp;(Free for individual use)&lt;br /&gt;3. &amp;nbsp;&lt;a href="http://haanstra.eu/putty/"&gt;Putty-Tray&amp;nbsp;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;What do you use for this purpose?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-1979817454382264328?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/1979817454382264328/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/11/windows-ssh-client-with-automatic.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/1979817454382264328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/1979817454382264328'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/11/windows-ssh-client-with-automatic.html' title='Windows SSH client with automatic reconnect capability'/><author><name>Tiebing</name><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-9797590.post-3420235235330796723</id><published>2011-10-20T13:35:00.000-07:00</published><updated>2011-10-20T13:35:18.849-07:00</updated><title type='text'>compiling / building colinux</title><content type='html'>I have been using colinux for the last 6 years under Windows XP and then Windows Vista. It has always worked great. &amp;nbsp;However, I have never tried to build coLinux from scratch. Today, due to the reason that I need a kernel module that is not in the module list provided by the stock colinux build image, I had to go through this exercise.&lt;br /&gt;&lt;br /&gt;Overall it is a fairly straightforward process. But I need to make the notes so that later on other people can find it useful.&lt;br /&gt;&lt;br /&gt;It is better to have a fast machine, a fast internet connection, and over 1GB of free disk space.&lt;br /&gt;&lt;br /&gt;My host machine is Ubuntu 10.04 running in X86-64bit mode. The final image of colinux kernel is 32-bit. The build process automatically does that for you.&lt;br /&gt;&lt;br /&gt;1. Download the latest snapshot release source tar ball from&amp;nbsp;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;a href="http://www.colinux.org/snapshots/"&gt;www.&lt;b&gt;colinux&lt;/b&gt;.org/&lt;b&gt;snapshots&lt;/b&gt;/&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;2. untar it, cd to devel-coLinux...&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;3. ./configure&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;4. make&lt;/span&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; This will download gcc,bin-utils,mingw32, kernel source, etc&lt;br /&gt;5. You will find you kernel (vmlinux) and modules tar.gz file in the build directory,which should be displayed on the console when the build started.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;--To rebuild the kernel with your modified config file--&lt;/b&gt;&lt;br /&gt;1. go to the kernel build directory, where your vmlinux file is located.&lt;br /&gt;2. backup your current config file: &amp;nbsp;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;cp .config good_config&lt;/span&gt;&lt;br /&gt;3. change the config file: &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;make ARCH=i386 menuconfig&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;4. go to your devel-coLinux-xxx directory, do "&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;make kernel&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;"&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-3420235235330796723?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/3420235235330796723/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/10/compiling-building-colinux.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/3420235235330796723'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/3420235235330796723'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/10/compiling-building-colinux.html' title='compiling / building colinux'/><author><name>Tiebing</name><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-9797590.post-4173057992452651368</id><published>2011-10-12T11:03:00.000-07:00</published><updated>2011-10-12T11:03:20.381-07:00</updated><title type='text'>linux dynamic library executable and initialization</title><content type='html'>&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;-----------&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;C file&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;-------------&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;/* initialization when .so is loaded */&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;static int (*libc_flock)(int fd, int operation)=NULL;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;int flock(int fd, int operation){&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; printf("my flock called. &amp;nbsp;fd=%d operation=%d\n",fd,operation);&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; if (!handle){&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; handle=dlopen("/lib/libc.so.6",RTLD_LAZY);&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; if (!libc_flock){&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; libc_flock=dlsym(handle,"flock");&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (libc_flock==NULL)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return NULL;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; return libc_flock(fd,operation);&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;__attribute__((constructor)) static void mylib_init(void){&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; printf("============&amp;gt;\nmylib is initialized\n================&amp;gt;\n");&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;/* this part of code make your .so executable */&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;const char my_interp[] __attribute__((section(".interp"))) = "/lib/ld-linux.so.2";&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;void my_main(int argc, char **argv) {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; int i;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; printf("Called as:");&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; for (i = 0; i &amp;lt; argc; i++)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printf(" %s", argv[i]);&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; printf("\n");&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; exit(0);&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;--------------&lt;/div&gt;&lt;div&gt;Makefile:&lt;/div&gt;&lt;div&gt;----------------&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;libmylib.so: mylib.c&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(CC) -shared -Wl,-soname,$@ -fPIC -O2 -s -o $@ $^ -ldl &amp;nbsp;-Wl,-e,my_main&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-4173057992452651368?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/4173057992452651368/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/10/linux-dynamic-library-executable-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/4173057992452651368'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/4173057992452651368'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/10/linux-dynamic-library-executable-and.html' title='linux dynamic library executable and initialization'/><author><name>Tiebing</name><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-9797590.post-3905976863036241105</id><published>2011-10-07T09:41:00.001-07:00</published><updated>2011-10-07T09:41:49.960-07:00</updated><title type='text'>To read chinese in gvim in Windows</title><content type='html'>set guifont=NSimSun:h12:cGB2312&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-3905976863036241105?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/3905976863036241105/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/10/to-read-chinese-in-gvim-in-windows.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/3905976863036241105'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/3905976863036241105'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/10/to-read-chinese-in-gvim-in-windows.html' title='To read chinese in gvim in Windows'/><author><name>Tiebing</name><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-9797590.post-5430552327578001662</id><published>2011-10-04T15:35:00.000-07:00</published><updated>2011-10-04T15:41:32.273-07:00</updated><title type='text'>C/C++ dbug library</title><content type='html'>There are many debug libraries available for C/C++. &amp;nbsp;Recently I started looking into the "dbug" library created by Fred Fish in 1988 and released to public. You can download the library at &lt;a href="http://sourceforge.net/projects/dbug/"&gt;source forge&amp;nbsp;&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The library has just one C file: dbug.c and one header file: dbug.h (another header file dbug_long.h has more comments can be used in place of dbug.h)&lt;br /&gt;&lt;br /&gt;The concept is that you can turn debug on/off on the fly; enable per-function tracing; and other stuff such as profiling which usually you don't need.&lt;br /&gt;&lt;br /&gt;To use it:&lt;br /&gt;&lt;br /&gt;First, you initialize it by doing this:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &lt;span class="Apple-style-span" style="color: #351c75;"&gt;DBUG_PUSH ("d:t:O:L:");&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Then in every function, you begin your function code with:&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; DBUG_ENTER ("my_function_name");&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;End your function with either&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp;DBUG_VOID_RETURN;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;or&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp;DBUG_RETURN (0);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;if you return integer 0.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To use printf to debug something, use this macro:&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp;DBUG_PRINT ("info", ("Returned value: %d", ret));&lt;/span&gt;&lt;/div&gt;&lt;div&gt;where "info" is your keyword/category of debugs. In DBUG_PUSH, you can use "d,keyword1,keyword2..." to turn on/off a list of categories that you want to debug.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Note that there is a file "example.c" in the root directory of the downloaded package, which shows you how to use the library.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: #351c75;"&gt;Reference for the controlling string in dbug_push:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: #351c75;"&gt;this is copied from &lt;a href="http://www.tol.it/doc/MySQL/appendixC.html"&gt;MySQL document Appendix C&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The debug control string is a sequence of colon separated fields        as follows:&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;field_1&amp;gt;:&amp;lt;field_2&amp;gt;:&amp;lt;field_N&amp;gt;&lt;/span&gt;&lt;br /&gt;Each field consists of a mandatory flag character followed by        an optional "," and comma separated list of modifiers:&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;flag[,modifier,modifier,...,modifier]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The currently recognized flag characters are:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt; &lt;pre&gt;&lt;br /&gt;&lt;li&gt;d       Enable output from DBUG_&lt;n&gt; macros for&lt;br /&gt;        for the current state.  May be followed&lt;br /&gt;        by a list of keywords which selects output&lt;br /&gt;        only for the DBUG macros with that keyword.&lt;br /&gt;        A null list of keywords implies output for&lt;br /&gt;        all macros.&lt;/n&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;D       Delay after each debugger output line.&lt;br /&gt;        The argument is the number of tenths of seconds&lt;br /&gt;        to delay, subject to machine capabilities.&lt;br /&gt;        I.E.  -#D,20 is delay two seconds.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;f       Limit debugging and/or tracing, and profiling to the&lt;br /&gt;        list of named functions.  Note that a null list will&lt;br /&gt;        disable all functions.  The appropriate "d" or "t"&lt;br /&gt;        flags must still be given, this flag only limits their&lt;br /&gt;        actions if they are enabled.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;F       Identify the source file name for each&lt;br /&gt;        line of debug or trace output.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;i       Identify the process with the pid for each line of&lt;br /&gt;        debug or trace output.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;g       Enable profiling.  Create a file called 'dbugmon.out'&lt;br /&gt;        containing information that can be used to profile&lt;br /&gt;        the program.  May be followed by a list of keywords&lt;br /&gt;        that select profiling only for the functions in that&lt;br /&gt;        list.  A null list implies that all functions are&lt;br /&gt;        considered.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;L       Identify the source file line number for&lt;br /&gt;        each line of debug or trace output.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;n       Print the current function nesting depth for&lt;br /&gt;        each line of debug or trace output.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;N       Number each line of dbug output.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;o       Redirect the debugger output stream to the&lt;br /&gt;        specified file.  The default output is stderr.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;O       As O but the file is really flushed between each&lt;br /&gt;        write. When needed the file is closed and reopened&lt;br /&gt;        between each write.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;p       Limit debugger actions to specified processes.&lt;br /&gt;        A process must be identified with the&lt;br /&gt;        DBUG_PROCESS macro and match one in the list&lt;br /&gt;        for debugger actions to occur.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;P       Print the current process name for each&lt;br /&gt;        line of debug or trace output.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;r       When pushing a new state, do not inherit&lt;br /&gt;        the previous state's function nesting level.&lt;br /&gt;        Useful when the output is to start at the&lt;br /&gt;        left margin.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;S       Do function _sanity(_file_,_line_) at each&lt;br /&gt;        debugged function until _sanity() returns&lt;br /&gt;        something that differs from 0.&lt;br /&gt;        (Mostly used with safemalloc)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;t       Enable function call/exit trace lines.&lt;br /&gt;        May be followed by a list (containing only&lt;br /&gt;        one modifier) giving a numeric maximum&lt;br /&gt;        trace level, beyond which no output will&lt;br /&gt;        occur for either debugging or tracing&lt;br /&gt;        macros.  The default is a compile time&lt;br /&gt;        option.&lt;/li&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/ul&gt;Some examples of debug control strings which might appear        on a shell command line (the "-#" is typically used to        introduce a control string to an application program) are:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;                -#d:t&lt;br /&gt;                -#d:f,main,subr1:F:L:t,20&lt;br /&gt;                -#d,input,output,files:n&lt;br /&gt;&lt;/pre&gt;For convenience, any leading "-#" is stripped off.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-5430552327578001662?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/5430552327578001662/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/10/cc-dbug-library.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/5430552327578001662'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/5430552327578001662'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/10/cc-dbug-library.html' title='C/C++ dbug library'/><author><name>Tiebing</name><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-9797590.post-8358012241298670513</id><published>2011-09-30T17:47:00.001-07:00</published><updated>2011-09-30T17:47:37.993-07:00</updated><title type='text'>vim paste and indent</title><content type='html'>If you use "dd" to cut a line in vim and want to use "p" to paste it to another place. The original indent will remain. To make the intent fit with the destination indent, use ]p.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-8358012241298670513?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/8358012241298670513/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/09/vim-paste-and-indent.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/8358012241298670513'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/8358012241298670513'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/09/vim-paste-and-indent.html' title='vim paste and indent'/><author><name>Tiebing</name><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-9797590.post-2691194201554846070</id><published>2011-09-30T15:06:00.000-07:00</published><updated>2011-09-30T15:06:02.158-07:00</updated><title type='text'>List unused C/C++ functions</title><content type='html'>You have a C/C++ project. It is more than a few files, including some libraries. Now you want to know whether you can get rid of / comment out some of the functions that are never used.&lt;br /&gt;&lt;br /&gt;There is no well-known FREE and OPEN SOURCE tools that can do this for you as of 2011, but a not-very-well-known tool called "callcatcher" created by Caolan does the job beautifully.&lt;br /&gt;&lt;br /&gt;First, to download the callcatcher, go to the official website:&amp;nbsp;&lt;a href="http://www.skynet.ie/~caolan/Packages/callcatcher.html"&gt;http://www.skynet.ie/~caolan/Packages/callcatcher.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It is written in Python. So you may want to install it by becoming a root or use sudo.&lt;br /&gt;&lt;br /&gt;To use the tool, you need to change ALL your make files to prepend "callcatcher" to your "gcc/g++" command. For example, in your original Makefile, you have&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;CC=gcc&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;AR=ar&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now change it to&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;CC=callcatcher gcc&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;AR=callarchive ar&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When you are done compiling, to see which functions is not used, do:&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;callanalyse MY-EXE-FILE&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Another caveat is that you cannot compile multiple times at the same time, like this&lt;/b&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;$(CC) -o main main.c lib1.c lib2.c &amp;nbsp;(This is bad for callcatcher)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Instead you need to change it to something like this, so that you only compile one file at a time, then link it:&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;%.o:%.c&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp;$(CC) $(CFLAGS) -c $^&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;main: $(OBJS)&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; $(CC) -o $@ $(OBJS)&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-2691194201554846070?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/2691194201554846070/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/09/list-unused-cc-functions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/2691194201554846070'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/2691194201554846070'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/09/list-unused-cc-functions.html' title='List unused C/C++ functions'/><author><name>Tiebing</name><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-9797590.post-4582943007429852627</id><published>2011-09-01T15:42:00.000-07:00</published><updated>2011-09-01T15:47:10.156-07:00</updated><title type='text'>Setup your own (small / tiny) Certificate Authority (CA)</title><content type='html'>&lt;br /&gt;&lt;pre&gt;&lt;/pre&gt;&lt;pre&gt;For more than 100 certificates, you could use: NewPKI, OpenCA, IDX PKI which&lt;br /&gt;are opensource projects.&lt;br /&gt;&lt;br /&gt;A smaller solution is TinyCA (&lt;a href="http://tinyca.sm-zone.net/"&gt;http://tinyca.sm-zone.net/&lt;/a&gt;). Note that this is just a GUI front-end to openssl.&lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;From Wikipedia:&lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/EJBCA" title="EJBCA"&gt;EJBCA&lt;/a&gt; (java-based)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/OpenCA" title="OpenCA"&gt;OpenCA&lt;/a&gt; (the most popular one)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/OpenSSL" title="OpenSSL"&gt;OpenSSL&lt;/a&gt;, which is really an SSL/TLS library, but comes with tools allowing its use as a simple certificate authority.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/GnoMint" title="GnoMint"&gt;gnoMint&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a class="external text" href="http://pki.fedoraproject.org/wiki/PKI_Main_Page" rel="nofollow"&gt;DogTag&lt;/a&gt; (This looks really good)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a class="external text" href="http://xca.hohnstaedt.de/" rel="nofollow"&gt;XCA&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&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/9797590-4582943007429852627?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/4582943007429852627/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/09/setup-your-own-small-tiny-certificate.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/4582943007429852627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/4582943007429852627'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/09/setup-your-own-small-tiny-certificate.html' title='Setup your own (small / tiny) Certificate Authority (CA)'/><author><name>Tiebing</name><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-9797590.post-8748497267085197076</id><published>2011-08-30T17:16:00.001-07:00</published><updated>2011-08-30T17:16:41.410-07:00</updated><title type='text'>simple telnet server by using socat</title><content type='html'>On server side:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;./socat exec:'bash -li',pty,stderr,setsid &amp;nbsp;tcp-listen:8999,reuseaddr&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;On client side:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;./socat tcp-connect:127.0.0.1:8999 file:`tty`,raw,echo=0&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-8748497267085197076?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/8748497267085197076/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/08/simple-telnet-server-by-using-socat.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/8748497267085197076'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/8748497267085197076'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/08/simple-telnet-server-by-using-socat.html' title='simple telnet server by using socat'/><author><name>Tiebing</name><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-9797590.post-1904535900907512789</id><published>2011-08-30T14:44:00.000-07:00</published><updated>2011-08-30T14:48:10.364-07:00</updated><title type='text'>C, C++ source code tools to help you be productive</title><content type='html'>1. Source code beautifier: helps you with coding style compliance&lt;br /&gt;&amp;nbsp; indent&lt;br /&gt;&amp;nbsp; uncrustify&lt;br /&gt;&lt;br /&gt;2. Static anylysis&lt;br /&gt;&amp;nbsp; pc-lint/flexelint (needs $$)&lt;br /&gt;&amp;nbsp; splint&lt;br /&gt;&amp;nbsp; cpplint.py (google code)&lt;br /&gt;&lt;br /&gt;3. bug finder&lt;br /&gt;&amp;nbsp; cppcheck&lt;br /&gt;&amp;nbsp; flawfinder&lt;br /&gt;&amp;nbsp; uno&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-1904535900907512789?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/1904535900907512789/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/08/c-c-source-code-tools-to-help-you-be.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/1904535900907512789'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/1904535900907512789'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/08/c-c-source-code-tools-to-help-you-be.html' title='C, C++ source code tools to help you be productive'/><author><name>Tiebing</name><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-9797590.post-6605397306666312700</id><published>2011-08-26T11:50:00.001-07:00</published><updated>2011-08-26T11:50:26.567-07:00</updated><title type='text'>gitignore diff_exclude</title><content type='html'>A list of files usually should be ignored by git and diff when you generate a patch:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;*.o&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;*.out&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;*.a&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;*.so&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;*.dll&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;*.swp&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;*.la&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;*.lo&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;*.swp&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;.gitignore&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;.depend&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;tags&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;*~&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;*.d&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;*.1&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;*.Po&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;*.Plo&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;*.log&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;*.status&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;*.dd&lt;/span&gt;&lt;br /&gt;&lt;div&gt;CVS&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-6605397306666312700?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/6605397306666312700/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/08/gitignore-diffexclude.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/6605397306666312700'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/6605397306666312700'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/08/gitignore-diffexclude.html' title='gitignore diff_exclude'/><author><name>Tiebing</name><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-9797590.post-5154341368223258406</id><published>2011-08-25T16:52:00.001-07:00</published><updated>2011-08-25T16:52:40.015-07:00</updated><title type='text'>git cheat sheet</title><content type='html'>&lt;a href="http://cheat.errtheblog.com/s/git"&gt;http://cheat.errtheblog.com/s/git&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-5154341368223258406?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/5154341368223258406/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/08/git-cheat-sheet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/5154341368223258406'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/5154341368223258406'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/08/git-cheat-sheet.html' title='git cheat sheet'/><author><name>Tiebing</name><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-9797590.post-8296199115401608188</id><published>2011-08-25T15:59:00.000-07:00</published><updated>2011-08-25T15:59:24.206-07:00</updated><title type='text'>Makefile Automatic Variables</title><content type='html'>&lt;br /&gt;Here is a table of automatic variables:        &lt;a href="" name="index-g_t_0024_0040_0040-938"&gt;&lt;/a&gt; &lt;a href="" name="index-g_t_0040_0040-_0040r_007b_0028automatic-variable_0029_007d-939"&gt;&lt;/a&gt; &lt;br /&gt;&lt;dl&gt;&lt;dt&gt;&lt;code&gt;$@&lt;/code&gt;&lt;/dt&gt;&lt;dd&gt;The file name of the target of the rule.  If the target is an archive member, then ‘&lt;samp&gt;&lt;span class="samp"&gt;$@&lt;/span&gt;&lt;/samp&gt;’ is the name of the archive file.  In a pattern rule that has multiple targets (see &lt;a href="http://www.gnu.org/software/make/manual/make.html#Pattern-Intro"&gt;Introduction to Pattern Rules&lt;/a&gt;), ‘&lt;samp&gt;&lt;span class="samp"&gt;$@&lt;/span&gt;&lt;/samp&gt;’ is the name of whichever target caused the rule's recipe to be run.       &lt;a href="" name="index-g_t_0024_0025-940"&gt;&lt;/a&gt;&lt;a href="" name="index-g_t_0025-_0040r_007b_0028automatic-variable_0029_007d-941"&gt;&lt;/a&gt;&lt;/dd&gt;&lt;dt&gt;&lt;code&gt;$%&lt;/code&gt;&lt;/dt&gt;&lt;dd&gt;The target member name, when the target is an archive member.  See &lt;a href="http://www.gnu.org/software/make/manual/make.html#Archives"&gt;Archives&lt;/a&gt;.  For example, if the target is &lt;samp&gt;&lt;span class="file"&gt;foo.a(bar.o)&lt;/span&gt;&lt;/samp&gt; then ‘&lt;samp&gt;&lt;span class="samp"&gt;$%&lt;/span&gt;&lt;/samp&gt;’ is &lt;samp&gt;&lt;span class="file"&gt;bar.o&lt;/span&gt;&lt;/samp&gt; and ‘&lt;samp&gt;&lt;span class="samp"&gt;$@&lt;/span&gt;&lt;/samp&gt;’ is &lt;samp&gt;&lt;span class="file"&gt;foo.a&lt;/span&gt;&lt;/samp&gt;.  ‘&lt;samp&gt;&lt;span class="samp"&gt;$%&lt;/span&gt;&lt;/samp&gt;’ is empty when the target is not an archive member.       &lt;a href="" name="index-g_t_0024_003c-942"&gt;&lt;/a&gt;&lt;a href="" name="index-g_t_003c-_0040r_007b_0028automatic-variable_0029_007d-943"&gt;&lt;/a&gt;&lt;/dd&gt;&lt;dt&gt;&lt;code&gt;$&amp;lt;&lt;/code&gt;&lt;/dt&gt;&lt;dd&gt;The name of the first prerequisite.  If the target got its recipe from an implicit rule, this will be the first prerequisite added by the implicit rule (see &lt;a href="http://www.gnu.org/software/make/manual/make.html#Implicit-Rules"&gt;Implicit Rules&lt;/a&gt;).       &lt;a href="" name="index-g_t_0024_003f-944"&gt;&lt;/a&gt;&lt;a href="" name="index-g_t_003f-_0040r_007b_0028automatic-variable_0029_007d-945"&gt;&lt;/a&gt;&lt;/dd&gt;&lt;dt&gt;&lt;code&gt;$?&lt;/code&gt;&lt;/dt&gt;&lt;dd&gt;The names of all the prerequisites that are newer than the target, with spaces between them.  For prerequisites which are archive members, only the named member is used (see &lt;a href="http://www.gnu.org/software/make/manual/make.html#Archives"&gt;Archives&lt;/a&gt;).  &lt;a href="" name="index-prerequisites_002c-list-of-changed-946"&gt;&lt;/a&gt;&lt;a href="" name="index-list-of-changed-prerequisites-947"&gt;&lt;/a&gt; &lt;a href="" name="index-g_t_0024_005e-948"&gt;&lt;/a&gt;&lt;a href="" name="index-g_t_005e-_0040r_007b_0028automatic-variable_0029_007d-949"&gt;&lt;/a&gt;&lt;/dd&gt;&lt;dt&gt;&lt;code&gt;$^&lt;/code&gt;&lt;/dt&gt;&lt;dd&gt;The names of all the prerequisites, with spaces between them.  For prerequisites which are archive members, only the named member is used (see &lt;a href="http://www.gnu.org/software/make/manual/make.html#Archives"&gt;Archives&lt;/a&gt;).  A target has only one prerequisite on each other file it depends on, no matter how many times each file is listed as a prerequisite.  So if you list a prerequisite more than once for a target, the value of &lt;code&gt;$^&lt;/code&gt; contains just one copy of the name.  This list does &lt;strong&gt;not&lt;/strong&gt; contain any of the order-only prerequisites; for those see the ‘&lt;samp&gt;&lt;span class="samp"&gt;$|&lt;/span&gt;&lt;/samp&gt;’ variable, below.  &lt;a href="" name="index-prerequisites_002c-list-of-all-950"&gt;&lt;/a&gt;&lt;a href="" name="index-list-of-all-prerequisites-951"&gt;&lt;/a&gt; &lt;a href="" name="index-g_t_0024_002b-952"&gt;&lt;/a&gt;&lt;a href="" name="index-g_t_002b-_0040r_007b_0028automatic-variable_0029_007d-953"&gt;&lt;/a&gt;&lt;/dd&gt;&lt;dt&gt;&lt;code&gt;$+&lt;/code&gt;&lt;/dt&gt;&lt;dd&gt;This is like ‘&lt;samp&gt;&lt;span class="samp"&gt;$^&lt;/span&gt;&lt;/samp&gt;’, but prerequisites listed more than once are duplicated in the order they were listed in the makefile.  This is primarily useful for use in linking commands where it is meaningful to repeat library file names in a particular order.       &lt;a href="" name="index-g_t_0024_007c-954"&gt;&lt;/a&gt;&lt;a href="" name="index-g_t_007c-_0040r_007b_0028automatic-variable_0029_007d-955"&gt;&lt;/a&gt;&lt;/dd&gt;&lt;dt&gt;&lt;code&gt;$|&lt;/code&gt;&lt;/dt&gt;&lt;dd&gt;The names of all the order-only prerequisites, with spaces between them.       &lt;a href="" name="index-g_t_0024_002a-956"&gt;&lt;/a&gt;&lt;a href="" name="index-g_t_002a-_0040r_007b_0028automatic-variable_0029_007d-957"&gt;&lt;/a&gt;&lt;/dd&gt;&lt;dt&gt;&lt;code&gt;$*&lt;/code&gt;&lt;/dt&gt;&lt;dd&gt;The stem with which an implicit rule matches (see &lt;a href="http://www.gnu.org/software/make/manual/make.html#Pattern-Match"&gt;How Patterns Match&lt;/a&gt;).  If the target is &lt;samp&gt;&lt;span class="file"&gt;dir/a.foo.b&lt;/span&gt;&lt;/samp&gt; and the target pattern is &lt;samp&gt;&lt;span class="file"&gt;a.%.b&lt;/span&gt;&lt;/samp&gt; then the stem is &lt;samp&gt;&lt;span class="file"&gt;dir/foo&lt;/span&gt;&lt;/samp&gt;.  The stem is useful for constructing names of related files.  &lt;a href="" name="index-stem_002c-variable-for-958"&gt;&lt;/a&gt; In a static pattern rule, the stem is part of the file name that matched the ‘&lt;samp&gt;&lt;span class="samp"&gt;%&lt;/span&gt;&lt;/samp&gt;’ in the target pattern.       In an explicit rule, there is no stem; so ‘&lt;samp&gt;&lt;span class="samp"&gt;$*&lt;/span&gt;&lt;/samp&gt;’ cannot be determined in that way.  Instead, if the target name ends with a recognized suffix (see &lt;a href="http://www.gnu.org/software/make/manual/make.html#Suffix-Rules"&gt;Old-Fashioned Suffix Rules&lt;/a&gt;), ‘&lt;samp&gt;&lt;span class="samp"&gt;$*&lt;/span&gt;&lt;/samp&gt;’ is set to the target name minus the suffix.  For example, if the target name is ‘&lt;samp&gt;&lt;span class="samp"&gt;foo.c&lt;/span&gt;&lt;/samp&gt;’, then ‘&lt;samp&gt;&lt;span class="samp"&gt;$*&lt;/span&gt;&lt;/samp&gt;’ is set to ‘&lt;samp&gt;&lt;span class="samp"&gt;foo&lt;/span&gt;&lt;/samp&gt;’, since ‘&lt;samp&gt;&lt;span class="samp"&gt;.c&lt;/span&gt;&lt;/samp&gt;’ is a suffix.  GNU &lt;code&gt;make&lt;/code&gt; does this bizarre thing only for compatibility with other implementations of &lt;code&gt;make&lt;/code&gt;.  You should generally avoid using ‘&lt;samp&gt;&lt;span class="samp"&gt;$*&lt;/span&gt;&lt;/samp&gt;’ except in implicit rules or static pattern rules.       If the target name in an explicit rule does not end with a recognized suffix, ‘&lt;samp&gt;&lt;span class="samp"&gt;$*&lt;/span&gt;&lt;/samp&gt;’ is set to the empty string for that rule.  &lt;/dd&gt;&lt;/dl&gt;‘&lt;samp&gt;&lt;span class="samp"&gt;$?&lt;/span&gt;&lt;/samp&gt;’ is useful even in explicit rules when you wish to operate on only the prerequisites that have changed.  For example, suppose that an archive named &lt;samp&gt;&lt;span class="file"&gt;lib&lt;/span&gt;&lt;/samp&gt; is supposed to contain copies of several object files.  This rule copies just the changed object files into the archive:  &lt;br /&gt;&lt;pre class="example"&gt;lib: foo.o bar.o lose.o win.o&lt;br /&gt;             ar r lib $?&lt;br /&gt;&lt;/pre&gt;Of the variables listed above, four have values that are single file names, and three have values that are lists of file names.  These seven have variants that get just the file's directory name or just the file name within the directory.  The variant variables' names are formed by appending ‘&lt;samp&gt;&lt;span class="samp"&gt;D&lt;/span&gt;&lt;/samp&gt;’ or ‘&lt;samp&gt;&lt;span class="samp"&gt;F&lt;/span&gt;&lt;/samp&gt;’, respectively.  These variants are semi-obsolete in GNU &lt;code&gt;make&lt;/code&gt; since the functions &lt;code&gt;dir&lt;/code&gt; and &lt;code&gt;notdir&lt;/code&gt; can be used to get a similar effect (see &lt;a href="http://www.gnu.org/software/make/manual/make.html#File-Name-Functions"&gt;Functions for File Names&lt;/a&gt;).  Note, however, that the ‘&lt;samp&gt;&lt;span class="samp"&gt;D&lt;/span&gt;&lt;/samp&gt;’ variants all omit the trailing slash which always appears in the output of the &lt;code&gt;dir&lt;/code&gt; function.  Here is a table of the variants:        &lt;a href="" name="index-g_t_0024_0028_0040_0040D_0029-959"&gt;&lt;/a&gt; &lt;a href="" name="index-g_t_0040_0040D-_0040r_007b_0028automatic-variable_0029_007d-960"&gt;&lt;/a&gt; &lt;br /&gt;&lt;dl&gt;&lt;dt&gt;‘&lt;samp&gt;&lt;span class="samp"&gt;$(@D)&lt;/span&gt;&lt;/samp&gt;’&lt;/dt&gt;&lt;dd&gt;The directory part of the file name of the target, with the trailing slash removed.  If the value of ‘&lt;samp&gt;&lt;span class="samp"&gt;$@&lt;/span&gt;&lt;/samp&gt;’ is &lt;samp&gt;&lt;span class="file"&gt;dir/foo.o&lt;/span&gt;&lt;/samp&gt; then ‘&lt;samp&gt;&lt;span class="samp"&gt;$(@D)&lt;/span&gt;&lt;/samp&gt;’ is &lt;samp&gt;&lt;span class="file"&gt;dir&lt;/span&gt;&lt;/samp&gt;.  This value is &lt;samp&gt;&lt;span class="file"&gt;.&lt;/span&gt;&lt;/samp&gt; if ‘&lt;samp&gt;&lt;span class="samp"&gt;$@&lt;/span&gt;&lt;/samp&gt;’ does not contain a slash.       &lt;a href="" name="index-g_t_0024_0028_0040_0040F_0029-961"&gt;&lt;/a&gt;&lt;a href="" name="index-g_t_0040_0040F-_0040r_007b_0028automatic-variable_0029_007d-962"&gt;&lt;/a&gt;&lt;/dd&gt;&lt;dt&gt;‘&lt;samp&gt;&lt;span class="samp"&gt;$(@F)&lt;/span&gt;&lt;/samp&gt;’&lt;/dt&gt;&lt;dd&gt;The file-within-directory part of the file name of the target.  If the value of ‘&lt;samp&gt;&lt;span class="samp"&gt;$@&lt;/span&gt;&lt;/samp&gt;’ is &lt;samp&gt;&lt;span class="file"&gt;dir/foo.o&lt;/span&gt;&lt;/samp&gt; then ‘&lt;samp&gt;&lt;span class="samp"&gt;$(@F)&lt;/span&gt;&lt;/samp&gt;’ is &lt;samp&gt;&lt;span class="file"&gt;foo.o&lt;/span&gt;&lt;/samp&gt;.  ‘&lt;samp&gt;&lt;span class="samp"&gt;$(@F)&lt;/span&gt;&lt;/samp&gt;’ is equivalent to ‘&lt;samp&gt;&lt;span class="samp"&gt;$(notdir $@)&lt;/span&gt;&lt;/samp&gt;’.       &lt;a href="" name="index-g_t_0024_0028_002aD_0029-963"&gt;&lt;/a&gt;&lt;a href="" name="index-g_t_002aD-_0040r_007b_0028automatic-variable_0029_007d-964"&gt;&lt;/a&gt;&lt;/dd&gt;&lt;dt&gt;‘&lt;samp&gt;&lt;span class="samp"&gt;$(*D)&lt;/span&gt;&lt;/samp&gt;’&lt;/dt&gt;&lt;dd&gt;&lt;a href="" name="index-g_t_0024_0028_002aF_0029-965"&gt;&lt;/a&gt;&lt;a href="" name="index-g_t_002aF-_0040r_007b_0028automatic-variable_0029_007d-966"&gt;&lt;/a&gt;&lt;/dd&gt;&lt;dt&gt;‘&lt;samp&gt;&lt;span class="samp"&gt;$(*F)&lt;/span&gt;&lt;/samp&gt;’&lt;/dt&gt;&lt;dd&gt;The directory part and the file-within-directory part of the stem; &lt;samp&gt;&lt;span class="file"&gt;dir&lt;/span&gt;&lt;/samp&gt; and &lt;samp&gt;&lt;span class="file"&gt;foo&lt;/span&gt;&lt;/samp&gt; in this example.       &lt;a href="" name="index-g_t_0024_0028_0025D_0029-967"&gt;&lt;/a&gt;&lt;a href="" name="index-g_t_0025D-_0040r_007b_0028automatic-variable_0029_007d-968"&gt;&lt;/a&gt;&lt;/dd&gt;&lt;dt&gt;‘&lt;samp&gt;&lt;span class="samp"&gt;$(%D)&lt;/span&gt;&lt;/samp&gt;’&lt;/dt&gt;&lt;dd&gt;&lt;a href="" name="index-g_t_0024_0028_0025F_0029-969"&gt;&lt;/a&gt;&lt;a href="" name="index-g_t_0025F-_0040r_007b_0028automatic-variable_0029_007d-970"&gt;&lt;/a&gt;&lt;/dd&gt;&lt;dt&gt;‘&lt;samp&gt;&lt;span class="samp"&gt;$(%F)&lt;/span&gt;&lt;/samp&gt;’&lt;/dt&gt;&lt;dd&gt;The directory part and the file-within-directory part of the target archive member name.  This makes sense only for archive member targets of the form &lt;samp&gt;&lt;var&gt;archive&lt;/var&gt;&lt;span class="file"&gt;(&lt;/span&gt;&lt;var&gt;member&lt;/var&gt;&lt;span class="file"&gt;)&lt;/span&gt;&lt;/samp&gt; and is useful only when &lt;var&gt;member&lt;/var&gt; may contain a directory name.  (See &lt;a href="http://www.gnu.org/software/make/manual/make.html#Archive-Members"&gt;Archive Members as Targets&lt;/a&gt;.)       &lt;a href="" name="index-g_t_0024_0028_003cD_0029-971"&gt;&lt;/a&gt;&lt;a href="" name="index-g_t_003cD-_0040r_007b_0028automatic-variable_0029_007d-972"&gt;&lt;/a&gt;&lt;/dd&gt;&lt;dt&gt;‘&lt;samp&gt;&lt;span class="samp"&gt;$(&amp;lt;D)&lt;/span&gt;&lt;/samp&gt;’&lt;/dt&gt;&lt;dd&gt;&lt;a href="" name="index-g_t_0024_0028_003cF_0029-973"&gt;&lt;/a&gt;&lt;a href="" name="index-g_t_003cF-_0040r_007b_0028automatic-variable_0029_007d-974"&gt;&lt;/a&gt;&lt;/dd&gt;&lt;dt&gt;‘&lt;samp&gt;&lt;span class="samp"&gt;$(&amp;lt;F)&lt;/span&gt;&lt;/samp&gt;’&lt;/dt&gt;&lt;dd&gt;The directory part and the file-within-directory part of the first prerequisite.       &lt;a href="" name="index-g_t_0024_0028_005eD_0029-975"&gt;&lt;/a&gt;&lt;a href="" name="index-g_t_005eD-_0040r_007b_0028automatic-variable_0029_007d-976"&gt;&lt;/a&gt;&lt;/dd&gt;&lt;dt&gt;‘&lt;samp&gt;&lt;span class="samp"&gt;$(^D)&lt;/span&gt;&lt;/samp&gt;’&lt;/dt&gt;&lt;dd&gt;&lt;a href="" name="index-g_t_0024_0028_005eF_0029-977"&gt;&lt;/a&gt;&lt;a href="" name="index-g_t_005eF-_0040r_007b_0028automatic-variable_0029_007d-978"&gt;&lt;/a&gt;&lt;/dd&gt;&lt;dt&gt;‘&lt;samp&gt;&lt;span class="samp"&gt;$(^F)&lt;/span&gt;&lt;/samp&gt;’&lt;/dt&gt;&lt;dd&gt;Lists of the directory parts and the file-within-directory parts of all prerequisites.       &lt;a href="" name="index-g_t_0024_0028_002bD_0029-979"&gt;&lt;/a&gt;&lt;a href="" name="index-g_t_002bD-_0040r_007b_0028automatic-variable_0029_007d-980"&gt;&lt;/a&gt;&lt;/dd&gt;&lt;dt&gt;‘&lt;samp&gt;&lt;span class="samp"&gt;$(+D)&lt;/span&gt;&lt;/samp&gt;’&lt;/dt&gt;&lt;dd&gt;&lt;a href="" name="index-g_t_0024_0028_002bF_0029-981"&gt;&lt;/a&gt;&lt;a href="" name="index-g_t_002bF-_0040r_007b_0028automatic-variable_0029_007d-982"&gt;&lt;/a&gt;&lt;/dd&gt;&lt;dt&gt;‘&lt;samp&gt;&lt;span class="samp"&gt;$(+F)&lt;/span&gt;&lt;/samp&gt;’&lt;/dt&gt;&lt;dd&gt;Lists of the directory parts and the file-within-directory parts of all prerequisites, including multiple instances of duplicated prerequisites.       &lt;a href="" name="index-g_t_0024_0028_003fD_0029-983"&gt;&lt;/a&gt;&lt;a href="" name="index-g_t_003fD-_0040r_007b_0028automatic-variable_0029_007d-984"&gt;&lt;/a&gt;&lt;/dd&gt;&lt;dt&gt;‘&lt;samp&gt;&lt;span class="samp"&gt;$(?D)&lt;/span&gt;&lt;/samp&gt;’&lt;/dt&gt;&lt;dd&gt;&lt;a href="" name="index-g_t_0024_0028_003fF_0029-985"&gt;&lt;/a&gt;&lt;a href="" name="index-g_t_003fF-_0040r_007b_0028automatic-variable_0029_007d-986"&gt;&lt;/a&gt;&lt;/dd&gt;&lt;dt&gt;‘&lt;samp&gt;&lt;span class="samp"&gt;$(?F)&lt;/span&gt;&lt;/samp&gt;’&lt;/dt&gt;&lt;dd&gt;Lists of the directory parts and the file-within-directory parts of all prerequisites that are newer than the target.  &lt;/dd&gt;&lt;/dl&gt;Note that we use a special stylistic convention when we talk about these automatic variables; we write “the value of ‘&lt;samp&gt;&lt;span class="samp"&gt;$&amp;lt;&lt;/span&gt;&lt;/samp&gt;’”, rather than “the&amp;nbsp;variable&amp;nbsp;&lt;code&gt;&amp;lt;&lt;/code&gt;” as we would write for ordinary variables such as &lt;code&gt;objects&lt;/code&gt; and &lt;code&gt;CFLAGS&lt;/code&gt;.  We think this convention looks more natural in this special case.  Please do not assume it has a deep significance; ‘&lt;samp&gt;&lt;span class="samp"&gt;$&amp;lt;&lt;/span&gt;&lt;/samp&gt;’ refers to the variable named &lt;code&gt;&amp;lt;&lt;/code&gt; just as ‘&lt;samp&gt;&lt;span class="samp"&gt;$(CFLAGS)&lt;/span&gt;&lt;/samp&gt;’ refers to the variable named &lt;code&gt;CFLAGS&lt;/code&gt;.  You could just as well use ‘&lt;samp&gt;&lt;span class="samp"&gt;$(&amp;lt;)&lt;/span&gt;&lt;/samp&gt;’ in place of ‘&lt;samp&gt;&lt;span class="samp"&gt;$&amp;lt;&lt;/span&gt;&lt;/samp&gt;’. &lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-8296199115401608188?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/8296199115401608188/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/08/makefile-automatic-variables.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/8296199115401608188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/8296199115401608188'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/08/makefile-automatic-variables.html' title='Makefile Automatic Variables'/><author><name>Tiebing</name><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-9797590.post-6292303672237436594</id><published>2011-08-23T16:32:00.003-07:00</published><updated>2011-08-23T16:32:45.692-07:00</updated><title type='text'>vim global command</title><content type='html'>&lt;br /&gt;&lt;div class="post-text"&gt;The :global command is your friend - learn it  well.  It lets you run arbitrary :ex commands on every line that matches  a regex.  It abbreviates to :g.&lt;br /&gt;To delete all lines that match "George Bush":&lt;br /&gt;&lt;pre&gt;&lt;code&gt;:g/George Bush/ d&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;The command that follows can have its own address/range prefix, which  will be relative to the matched line.  So to delete the 5th line after  George Bush:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;:g/George Bush/ .+5 d&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;To delete the DEBUG log entries:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;:g/DEBUG/ .,+10 d&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;If you knew the stack trace was variable length but always ended at a blank line (or other regex):&lt;br /&gt;&lt;pre&gt;&lt;code&gt;:g/DEBUG/ .,/^$/ d&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;You can also execute a command on every line that does NOT match with  :g!.  e.g. to replace "Bush" with "Obama" on every line that does not  contain the word "sucks":&lt;br /&gt;&lt;pre&gt;&lt;code&gt; :g!/sucks/ s/Bush/Obama/&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;The default command is to print the line to the message window.  e.g. to list every line marked TODO:&lt;br /&gt;&lt;pre&gt;&lt;code&gt; :g/TODO&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;This is also useful for checking the regex matches the lines you expect before you do something destructive.&lt;br /&gt;You can chain multiple commands using "|".  e.g. to change Bush to  Obama AND George to Barack on every line that does not contain "sucks":&lt;br /&gt;&lt;pre&gt;&lt;code&gt; :g!/sucks/ s/Bush/Obama/g | s/George/Barack/g&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-6292303672237436594?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/6292303672237436594/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/08/vim-global-command_23.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/6292303672237436594'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/6292303672237436594'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/08/vim-global-command_23.html' title='vim global command'/><author><name>Tiebing</name><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-9797590.post-1519568236211347719</id><published>2011-08-23T16:32:00.001-07:00</published><updated>2011-08-23T16:32:43.464-07:00</updated><title type='text'>vim global command</title><content type='html'>&lt;br /&gt;&lt;div class="post-text"&gt;The :global command is your friend - learn it  well.  It lets you run arbitrary :ex commands on every line that matches  a regex.  It abbreviates to :g.&lt;br /&gt;To delete all lines that match "George Bush":&lt;br /&gt;&lt;pre&gt;&lt;code&gt;:g/George Bush/ d&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;The command that follows can have its own address/range prefix, which  will be relative to the matched line.  So to delete the 5th line after  George Bush:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;:g/George Bush/ .+5 d&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;To delete the DEBUG log entries:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;:g/DEBUG/ .,+10 d&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;If you knew the stack trace was variable length but always ended at a blank line (or other regex):&lt;br /&gt;&lt;pre&gt;&lt;code&gt;:g/DEBUG/ .,/^$/ d&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;You can also execute a command on every line that does NOT match with  :g!.  e.g. to replace "Bush" with "Obama" on every line that does not  contain the word "sucks":&lt;br /&gt;&lt;pre&gt;&lt;code&gt; :g!/sucks/ s/Bush/Obama/&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;The default command is to print the line to the message window.  e.g. to list every line marked TODO:&lt;br /&gt;&lt;pre&gt;&lt;code&gt; :g/TODO&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;This is also useful for checking the regex matches the lines you expect before you do something destructive.&lt;br /&gt;You can chain multiple commands using "|".  e.g. to change Bush to  Obama AND George to Barack on every line that does not contain "sucks":&lt;br /&gt;&lt;pre&gt;&lt;code&gt; :g!/sucks/ s/Bush/Obama/g | s/George/Barack/g&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-1519568236211347719?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/1519568236211347719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/08/vim-global-command.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/1519568236211347719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/1519568236211347719'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/08/vim-global-command.html' title='vim global command'/><author><name>Tiebing</name><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-9797590.post-7593273571245990165</id><published>2011-08-23T14:07:00.000-07:00</published><updated>2011-08-23T14:07:07.237-07:00</updated><title type='text'>gcc default include path</title><content type='html'>this is how to find out the default include path:&lt;br /&gt;&lt;br /&gt;method 1:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;`gcc -print-prog-name=cc1` -v&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;method 2:&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&lt;div class="post-text"&gt;You can create a file that attempts to include a bogus system header.&lt;br /&gt;If you run gcc in verbose mode on such a source, it will list all the system include locations as it looks for the bogus header.&lt;br /&gt;$ echo "#include &amp;lt;bogus.h&amp;gt; int main(){}" &amp;gt; t.c; gcc -v t.c; rm t.c&lt;br /&gt;[..]&lt;br /&gt;&lt;pre&gt;&lt;code&gt;#include "..." search starts here:&lt;br /&gt;#include &amp;lt;...&amp;gt; search starts here:&lt;br /&gt; /usr/local/include&lt;br /&gt; /usr/lib/gcc/i686-apple-darwin9/4.0.1/include&lt;br /&gt; /usr/include&lt;br /&gt; /System/Library/Frameworks (framework directory)&lt;br /&gt; /Library/Frameworks (framework directory)&lt;br /&gt;End of search list.&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;[..]&lt;pre&gt;&lt;code&gt;t.c:1:32: error: bogus.h: No such file or directory&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-7593273571245990165?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/7593273571245990165/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/08/gcc-default-include-path.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/7593273571245990165'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/7593273571245990165'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/08/gcc-default-include-path.html' title='gcc default include path'/><author><name>Tiebing</name><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-9797590.post-1385585190193370616</id><published>2011-08-19T14:16:00.001-07:00</published><updated>2011-08-19T14:16:41.202-07:00</updated><title type='text'>FREE PHP IDE editors</title><content type='html'>1.&amp;nbsp;aptana Studio&lt;br /&gt;2. codeLobster&lt;br /&gt;3. Komodo edit&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-1385585190193370616?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/1385585190193370616/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/08/free-php-ide-editors.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/1385585190193370616'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/1385585190193370616'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/08/free-php-ide-editors.html' title='FREE PHP IDE editors'/><author><name>Tiebing</name><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-9797590.post-6629919495103158056</id><published>2011-08-08T19:53:00.001-07:00</published><updated>2011-08-08T19:53:21.672-07:00</updated><title type='text'>Ubnt airos upgrade firmware</title><content type='html'>&lt;b&gt;&lt;a href="http://www.ubnt.com/wiki/Firmware_Recovery"&gt;http://www.ubnt.com/wiki/Firmware_Recovery&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;hold reset pin while power up the device, then&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;tftp -i 192.168.1.20 put XS2.ar2316.v3.4-rc.4351.090504.2146.bin&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-6629919495103158056?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/6629919495103158056/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/08/ubnt-airos-upgrade-firmware.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/6629919495103158056'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/6629919495103158056'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/08/ubnt-airos-upgrade-firmware.html' title='Ubnt airos upgrade firmware'/><author><name>Tiebing</name><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-9797590.post-454842720412178570</id><published>2011-08-04T18:11:00.000-07:00</published><updated>2011-08-04T18:11:13.691-07:00</updated><title type='text'>virtualbox vboxheadless high cpu usage</title><content type='html'>If you are running RHEL / CentOS in virtualbox, and find that virtualbox uses high cpu even if the virtual machine is idling, it may be caused by the HZ=1000 timer interrupt issue in your linux kernel. The solution:&lt;br /&gt;&lt;br /&gt;add &lt;span style="font-style: italic;"&gt;divider=10&lt;/span&gt; to the CentOS kernel parms in /boot/grub/grub.conf&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-454842720412178570?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/454842720412178570/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/08/virtualbox-vboxheadless-high-cpu-usage.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/454842720412178570'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/454842720412178570'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/08/virtualbox-vboxheadless-high-cpu-usage.html' title='virtualbox vboxheadless high cpu usage'/><author><name>Tiebing</name><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-9797590.post-4698037426077749425</id><published>2011-08-02T17:39:00.001-07:00</published><updated>2011-08-02T17:39:35.185-07:00</updated><title type='text'>Widows XP Remote Desktop IPv6</title><content type='html'>Windows XP Remote Desktop service does not listen on IPv6 addresses. Use the follow trick to fix it:&lt;br /&gt;&lt;br /&gt;This command will do the trick.&lt;br /&gt;netsh interface portproxy add v6tov4 listenport=3389 connectaddress=127.0.0.1 connectport=3389&lt;br /&gt;&lt;br /&gt;After using it you'll be able to connect using a recent version of Remote Desktop Client over IPv6 to a WinXP/Win2k3 box.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-4698037426077749425?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/4698037426077749425/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/08/widows-xp-remote-desktop-ipv6.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/4698037426077749425'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/4698037426077749425'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/08/widows-xp-remote-desktop-ipv6.html' title='Widows XP Remote Desktop IPv6'/><author><name>Tiebing</name><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-9797590.post-7936229122909904603</id><published>2011-07-28T07:31:00.000-07:00</published><updated>2011-07-28T07:31:32.301-07:00</updated><title type='text'>Simulate unplug usb device on Linux (USB Reset)</title><content type='html'>http://cpansearch.perl.org/src/DPAVLIN/Biblio-RFID-0.03/examples/usbreset.c&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;/* usbreset -- send a USB port reset to a USB device */&lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt;&lt;br /&gt;http://marc.info/?l=linux-usb-users&amp;amp;m=116827193506484&amp;amp;w=2&lt;br /&gt;&lt;br /&gt;and needs mounted usbfs filesystem&lt;br /&gt;&lt;br /&gt; sudo mount -t usbfs none /proc/bus/usb&lt;br /&gt;&lt;br /&gt;There is a way to suspend a USB device.  In order to use it, &lt;br /&gt;you must have a kernel with CONFIG_PM_SYSFS_DEPRECATED turned on.  To &lt;br /&gt;suspend a device, do (as root):&lt;br /&gt;&lt;br /&gt; echo -n 2 &amp;gt;/sys/bus/usb/devices/.../power/state&lt;br /&gt;&lt;br /&gt;where the "..." is the ID for your device.  To unsuspend, do the same &lt;br /&gt;thing but with a "0" instead of the "2" above.&lt;br /&gt;&lt;br /&gt;Note that this mechanism is slated to be removed from the kernel within &lt;br /&gt;the next year.  Hopefully some other mechanism will take its place.&lt;br /&gt;&lt;br /&gt;&amp;gt; To reset a&lt;br /&gt;&amp;gt; device?&lt;br /&gt;&lt;br /&gt;Here's a program to do it.  You invoke it as either&lt;br /&gt;&lt;br /&gt; usbreset /proc/bus/usb/BBB/DDD&lt;br /&gt;or&lt;br /&gt; usbreset /dev/usbB.D&lt;br /&gt;&lt;br /&gt;depending on how your system is set up, where BBB and DDD are the bus and&lt;br /&gt;device address numbers.&lt;br /&gt;&lt;br /&gt;Alan Stern&lt;br /&gt;&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;#include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;#include &amp;lt;fcntl.h&amp;gt;&lt;br /&gt;#include &amp;lt;errno.h&amp;gt;&lt;br /&gt;#include &amp;lt;sys/ioctl.h&amp;gt;&lt;br /&gt;&lt;br /&gt;#include &amp;lt;linux/usbdevice_fs.h&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;int main(int argc, char **argv)&lt;br /&gt;{&lt;br /&gt; const char *filename;&lt;br /&gt; int fd;&lt;br /&gt; int rc;&lt;br /&gt;&lt;br /&gt; if (argc != 2) {&lt;br /&gt;  fprintf(stderr, "Usage: usbreset device-filename\n");&lt;br /&gt;  return 1;&lt;br /&gt; }&lt;br /&gt; filename = argv[1];&lt;br /&gt;&lt;br /&gt; fd = open(filename, O_WRONLY);&lt;br /&gt; if (fd &amp;lt; 0) {&lt;br /&gt;  perror("Error opening output file");&lt;br /&gt;  return 1;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; printf("Resetting USB device %s\n", filename);&lt;br /&gt; rc = ioctl(fd, USBDEVFS_RESET, 0);&lt;br /&gt; if (rc &amp;lt; 0) {&lt;br /&gt;  perror("Error in ioctl");&lt;br /&gt;  return 1;&lt;br /&gt; }&lt;br /&gt; printf("Reset successful\n");&lt;br /&gt;&lt;br /&gt; close(fd);&lt;br /&gt; return 0;&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/9797590-7936229122909904603?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/7936229122909904603/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/07/simulate-unplug-usb-device-on-linux-usb.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/7936229122909904603'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/7936229122909904603'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/07/simulate-unplug-usb-device-on-linux-usb.html' title='Simulate unplug usb device on Linux (USB Reset)'/><author><name>Tiebing</name><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-9797590.post-8079617529135912555</id><published>2011-07-28T06:32:00.000-07:00</published><updated>2011-07-28T06:32:46.073-07:00</updated><title type='text'>Tether Blackberry 9700 on Linux (Debian/Ubuntu)</title><content type='html'>With the fantastic open source software "&lt;a href="http://barry.sf.net/"&gt;barry&lt;/a&gt;", tethering to Blackberry ( I use 9700 and my carrier is AT&amp;amp;T) is very easy and straightforward. You don't need a Tethering plan, just the regular blackberry data plan.&lt;br /&gt;&lt;br /&gt;Warning: be careful with your data usage once you are tethered.&lt;br /&gt;&lt;br /&gt;My system is Debian 5.0.3. But this should work on all newer debians and reasonably new Ubuntus. Run all commands as "root":&lt;br /&gt;&lt;br /&gt;1. Download and install barry for debian from the sourceforge website. You only need two files: libbarry0 and barry-utils. The files I use are:&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;barry-util_0.17.1-0_i386.deb &amp;nbsp;libbarry0_0.17.1-0_i386.deb&lt;br /&gt;2. For AT&amp;amp;T users:&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;cd /etc/ppp/peers&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;change the file 'barry-att_cingular' to comment out the following lines:&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; #novj&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; #noipdefault&lt;br /&gt;3. run "pppd call barry-att_cingular" to get you connected.&lt;br /&gt;&lt;br /&gt;Notes about routes:&lt;br /&gt;If your computer already have a default gateway, pppd will not change/update it. In that case, make sure you delete your default gateway before running pppd, or you can manually add the default gw.&lt;br /&gt;&lt;br /&gt;To stop the connection, just hit "Ctrl-C". Or, you can do "killall pppd" and wait for a few seconds for it to disconnect.&lt;br /&gt;&lt;br /&gt;I use this in Vmware Player virtual machine with Debian 5.0.3 and it works great.&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-8079617529135912555?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/8079617529135912555/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/07/tether-blackberry-9700-on-linux.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/8079617529135912555'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/8079617529135912555'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/07/tether-blackberry-9700-on-linux.html' title='Tether Blackberry 9700 on Linux (Debian/Ubuntu)'/><author><name>Tiebing</name><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-9797590.post-6981587258691035451</id><published>2011-07-20T15:24:00.001-07:00</published><updated>2011-07-20T15:24:43.614-07:00</updated><title type='text'>Windows 2003 Server Remote Desktop Local Drive Map</title><content type='html'>I could not get the local drive map to work when I remote desktop to a windows 2003 server.&lt;br /&gt;&lt;br /&gt;Turned out the the Windows 2003 server disabled the local drive map. So&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Click &lt;strong class="uiterm"&gt;Start&lt;/strong&gt;, point to &lt;strong class="uiterm"&gt;All Programs&lt;/strong&gt;, point to &lt;strong class="uiterm"&gt;Administrative Tools&lt;/strong&gt;, and then click &lt;strong class="uiterm"&gt;Terminal Services Configuration&lt;/strong&gt;.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;In the left pane, click &lt;strong class="uiterm"&gt;Connections&lt;/strong&gt;.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;In the right pane, right-click &lt;strong class="uiterm"&gt;RDP-tcp&lt;/strong&gt;, and then click &lt;strong class="uiterm"&gt;Properties&lt;/strong&gt;.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Click around all the tabs, and make sure disk drive map is not disabled.&lt;/li&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-6981587258691035451?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/6981587258691035451/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/07/windows-2003-server-remote-desktop.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/6981587258691035451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/6981587258691035451'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/07/windows-2003-server-remote-desktop.html' title='Windows 2003 Server Remote Desktop Local Drive Map'/><author><name>Tiebing</name><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-9797590.post-2615946906884794173</id><published>2011-07-17T08:21:00.001-07:00</published><updated>2011-07-17T08:21:52.845-07:00</updated><title type='text'>airos persistent directory</title><content type='html'>AirOS allow users to add scripts in the /etc/persistent directory of Ubiquiti device.&lt;br /&gt;These scripts can modify configuration by starting additional services and more. &lt;br /&gt;The standard scripts are: &lt;br /&gt;&lt;pre&gt;/etc/persistent/rc.prestart&lt;br /&gt;/etc/persistent/rc.poststart&lt;br /&gt;/etc/persistent/rc.prestop&lt;br /&gt;/etc/persistent/rc.poststop &lt;br /&gt;&lt;/pre&gt;They are called before and after the standard boot and shutdown scripts start or stop services... &lt;br /&gt;&lt;a href="" id="Add_static_route_via_script" name="Add_static_route_via_script"&gt;&lt;/a&gt;&lt;h2&gt; &lt;span class="mw-headline"&gt;Add static route via script&lt;/span&gt;&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Reboot devices to clean all static routes and access via SSH/Telnet to AirOS device &lt;/li&gt;&lt;li&gt;Create a script &lt;b&gt;/etc/persistent/rc.poststart&lt;/b&gt; and write here commands to add static route &lt;/li&gt;&lt;li&gt;Make sure that &lt;b&gt;/etc/persistent/rc.poststart&lt;/b&gt; are executable &lt;/li&gt;&lt;li&gt;Check if your script work fine running the command line: &lt;b&gt;./etc/persistent/rc.poststart&lt;/b&gt;&lt;br /&gt;note: the command now start with a "dot" = run the script! &lt;/li&gt;&lt;li&gt;Run the command: &lt;b&gt;cfgmtd -w -p /etc/&lt;/b&gt; to make persistent &lt;/li&gt;&lt;li&gt;Reboot and verify that all it's working...&amp;nbsp;&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/9797590-2615946906884794173?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/2615946906884794173/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/07/airos-persistent-directory.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/2615946906884794173'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/2615946906884794173'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/07/airos-persistent-directory.html' title='airos persistent directory'/><author><name>Tiebing</name><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-9797590.post-1813533956799602164</id><published>2011-07-16T08:00:00.000-07:00</published><updated>2011-07-16T08:00:44.821-07:00</updated><title type='text'>openwrt make targets</title><content type='html'>&lt;div class="box wikistyle" id="wikipage"&gt;      &lt;div id="wikipage-inner"&gt;     &lt;h1&gt;Useful_Trunk_Rebuild_Make_Targets&lt;/h1&gt;&lt;br /&gt;These were culled from IRC logs at irc.freenode.net on #wgt634u .   The comments may not be correct.  If so, please fix them.  This page was  put together to help with build problems related to dirty source trees.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;make package/base-files-clean target/linux-clean target/lzma-clean target/utils-clean&lt;/li&gt;&lt;ul&gt;&lt;li&gt;good general cleaning and doesn't rebuild toolchain&lt;/li&gt;&lt;li&gt;clobbers certain changes you may have made to files in 'root' - (i.e. is it incompatible with &lt;a href="http://openwrt.pbwiki.com/WGT634U_USB_root"&gt;WGT634U_USB_root&lt;/a&gt; building?)&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;make target/linux-clean&lt;/li&gt;&lt;ul&gt;&lt;li&gt;cleans kernel&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;make clean&lt;/li&gt;&lt;ul&gt;&lt;li&gt;duh, calls 'make dirclean'&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;make toolchain/uClibc-clean&lt;/li&gt;&lt;ul&gt;&lt;li&gt;clean uClibc only&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;make package/base-files-clean&lt;/li&gt;&lt;ul&gt;&lt;li&gt;always run before rebuild?&lt;/li&gt;&lt;li&gt;DANGER - remove package and unpacks the source archive again&lt;/li&gt;&lt;li&gt;aka: make package/&lt;em&gt;package_name&lt;/em&gt;-clean (ie: make package/jpeg-clean)&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;make package/&lt;em&gt;package name&lt;/em&gt;-rebuild&lt;/li&gt;&lt;ul&gt;&lt;li&gt;recompile the package after you make changes&lt;/li&gt;&lt;li&gt;if this still does a &lt;em&gt;make clean&lt;/em&gt; (ie: deletes everything, including your changes) add this to your package/&lt;em&gt;whatever&lt;/em&gt;/Makefile:&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="breakout"&gt; &lt;br /&gt;&lt;ul&gt;&lt;li&gt;mostlyclean:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;rm $(PKG_BUILD_DIR)/.built&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br /&gt;&lt;div class="yoda_Content" style="margin-left: -9000px;"&gt;&lt;a href="http://www.cartransportquotes.com/"&gt;Car Shipping&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&amp;nbsp;I can't seem to get the above to look right, so just remember to indent the &lt;em&gt;rm&lt;/em&gt; with a tab.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;make package/clean&lt;/li&gt;&lt;ul&gt;&lt;li&gt;cleans all packages, not always required&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;make target/clean&lt;/li&gt;&lt;ul&gt;&lt;li&gt;?&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;for specific packages, e.g. courtesy of frop&lt;/li&gt;&lt;ul&gt;&lt;li&gt;...well, if there's a new version of madwifi (from svn)... 'make package/madwifi-clean'&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;make target/install&lt;/li&gt;&lt;ul&gt;&lt;li&gt;rebuilds install image (and kernel too?)&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;make (any command) world&lt;/li&gt;&lt;ul&gt;&lt;li&gt;runs that command, and recompile (same as "make (command); make" (i think))&lt;/li&gt;&lt;li&gt;confirmed - yes, &lt;strong&gt;make &lt;/strong&gt;takes multiple targets on the command line.  Be careful when you type commands - if you miss a "-" and type &lt;em&gt;make package/&lt;strong&gt;jpeg clean&lt;/strong&gt;&lt;/em&gt; instead of &lt;em&gt;make package/&lt;strong&gt;jpeg-clean&lt;/strong&gt;&lt;/em&gt; it'll delete everything as it does the &lt;em&gt;clean&lt;/em&gt; after a &lt;em&gt;make package/jpeg&lt;/em&gt;.  MUCH DIFFERENT!&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-1813533956799602164?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/1813533956799602164/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/07/openwrt-make-targets.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/1813533956799602164'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/1813533956799602164'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/07/openwrt-make-targets.html' title='openwrt make targets'/><author><name>Tiebing</name><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-9797590.post-559239795991651226</id><published>2011-07-14T11:10:00.000-07:00</published><updated>2011-07-14T11:10:21.468-07:00</updated><title type='text'>sqlite 3 string to integer conversion, similar to C function atoi</title><content type='html'>In sqlite3, if you have a column defined as string, but you want to use it as integer when doing comparison, you can do the following to convert it.&lt;br /&gt;&lt;br /&gt;CAST(&lt;i&gt;expr&lt;/i&gt; AS &lt;i&gt;type&lt;/i&gt;)&lt;br /&gt;&lt;br /&gt;For example: you have a column named "version", and you stored value "11" in it. Now you can convert that to integer by doing:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Select * from mytable where CAST(version as integer)&amp;gt;=11;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Hope this helps you.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-559239795991651226?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/559239795991651226/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/07/sqlite-3-string-to-integer-conversion.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/559239795991651226'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/559239795991651226'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/07/sqlite-3-string-to-integer-conversion.html' title='sqlite 3 string to integer conversion, similar to C function atoi'/><author><name>Tiebing</name><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-9797590.post-3038015447151487213</id><published>2011-07-12T11:22:00.000-07:00</published><updated>2011-07-12T11:22:10.874-07:00</updated><title type='text'>Windows 2003, XP, recursive taking file and folders ownership and permissions</title><content type='html'>I found that the security tab on the file properties did not work for me when taking ownership and setting permission for a full directories with multiple sub directories. The follow method did the trick:&lt;br /&gt;&lt;br /&gt;1. Download fileacl&lt;br /&gt;2. Run: &amp;nbsp;cd&amp;nbsp;C:\Program Files\fileacl&lt;br /&gt;3. fileacl "My directory" /s myusername:RWD /FILES /SUB&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-3038015447151487213?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/3038015447151487213/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/07/windows-2003-xp-recursive-taking-file.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/3038015447151487213'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/3038015447151487213'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/07/windows-2003-xp-recursive-taking-file.html' title='Windows 2003, XP, recursive taking file and folders ownership and permissions'/><author><name>Tiebing</name><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-9797590.post-7810383519044707500</id><published>2011-07-01T12:31:00.000-07:00</published><updated>2011-07-01T12:31:57.857-07:00</updated><title type='text'>Reliable UDP Library</title><content type='html'>enet&lt;br /&gt;UDT&lt;br /&gt;&lt;a href="http://stackoverflow.com/questions/107668/what-do-you-use-when-you-need-reliable-udp"&gt;http://stackoverflow.com/questions/107668/what-do-you-use-when-you-need-reliable-udp&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-7810383519044707500?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/7810383519044707500/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/07/reliable-udp-library.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/7810383519044707500'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/7810383519044707500'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/07/reliable-udp-library.html' title='Reliable UDP Library'/><author><name>Tiebing</name><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-9797590.post-4091468036292915436</id><published>2011-07-01T10:11:00.000-07:00</published><updated>2011-07-01T10:53:05.554-07:00</updated><title type='text'>P2P NAT HOLE PUNCHING UDP</title><content type='html'>One of the best articles describing udp hole punching&lt;br /&gt;&lt;br /&gt;&lt;a href="http://pdos.csail.mit.edu/~baford/nat/draft-ford-natp2p-00.txt"&gt;http://pdos.csail.mit.edu/~baford/nat/draft-ford-natp2p-00.txt&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;There is another article that goes into details on how to predict port on symmetrical NAT. &lt;a href="http://tools.ietf.org/id/draft-takeda-symmetric-nat-traversal-00.txt"&gt;Here is the article/IETF DRAFT&amp;nbsp;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;Internet Draft                                                   B. Ford&lt;br /&gt;Document: draft-ford-natp2p-00.txt                                M.I.T.&lt;br /&gt;Expires: October 2003                                         April 2003&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   Network Address Translation and Peer-to-Peer Applications (NATP2P)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Status of this Memo&lt;br /&gt;&lt;br /&gt;   This document is an Internet-Draft and is subject to all provisions&lt;br /&gt;   of Section 10 of RFC2026.  Internet-Drafts are working documents of&lt;br /&gt;   the Internet Engineering Task Force (IETF), its areas, and its&lt;br /&gt;   working groups.  Note that other groups may also distribute working&lt;br /&gt;   documents as Internet-Drafts.&lt;br /&gt;&lt;br /&gt;   Internet-Drafts are draft documents valid for a maximum of six months&lt;br /&gt;   and may be updated, replaced, or obsoleted by other documents at any&lt;br /&gt;   time.  It is inappropriate to use Internet- Drafts as reference&lt;br /&gt;   material or to cite them other than as "work in progress."&lt;br /&gt;&lt;br /&gt;   The list of current Internet-Drafts can be accessed at&lt;br /&gt;   http://www.ietf.org/1id-abstracts.html&lt;br /&gt;&lt;br /&gt;   The list of Internet-Draft Shadow Directories can be accessed at&lt;br /&gt;   http://www.ietf.org/shadow.html&lt;br /&gt;&lt;br /&gt;   Distribution of this document is unlimited.&lt;br /&gt;&lt;br /&gt;Copyright Notice&lt;br /&gt;&lt;br /&gt;   Copyright (C) The Internet Society (2003).  All Rights Reserved.&lt;br /&gt;&lt;br /&gt;Abstract&lt;br /&gt;&lt;br /&gt;   This document describes and recommends methods by which peer-to-peer&lt;br /&gt;   (P2P) applications can operate efficiently in the presence of Network&lt;br /&gt;   Address Translation (NAT).  This document also provides&lt;br /&gt;   recommendations for the design of network address translators, in&lt;br /&gt;   order for them to support P2P applications effectively without&lt;br /&gt;   compromising security or performance.  This memo focuses on the&lt;br /&gt;   interaction of P2P with NAT in the absence of any special proxy,&lt;br /&gt;   gateway, or relaying protocols.  While not intending to preclude the&lt;br /&gt;   use of such protocols, the goal of this memo is to enable P2P&lt;br /&gt;   applications to function automatically without specific knowledge of&lt;br /&gt;   the type, location, or configuration of the NAT.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Ford                                                            [Page 1]&lt;br /&gt; &lt;br /&gt;draft-ford-natp2p-00.txt                                      April 2003&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1. Introduction&lt;br /&gt;&lt;br /&gt;   The ubiquitous deployment of Network Address Translation (NAT) on the&lt;br /&gt;   Internet has provided an effective if hopefully temporary means of&lt;br /&gt;   working around the ongoing depletion of the IP address space.  At the&lt;br /&gt;   same time, however, the asymmetric addressing and connectivity&lt;br /&gt;   regimes established by NAT and firewall systems have created unique&lt;br /&gt;   problems for peer-to-peer (P2P) applications and protocols, such as&lt;br /&gt;   teleconferencing and multiplayer on-line gaming.  This document&lt;br /&gt;   discusses these issues and how they can be addressed.  Familiarity is&lt;br /&gt;   assumed with NAT terminology and conventions, as specified in [NAT-&lt;br /&gt;   TRAD] and [NAT-TERM].  As used throughout this document, the term&lt;br /&gt;   "NAT" refers to "Traditional NAT" in both of its standard variants:&lt;br /&gt;   namely Basic NAT, in which only IP addresses are translated, as well&lt;br /&gt;   as Network Address/Port Translation (NAPT), where both IP addresses&lt;br /&gt;   and transport-level port numbers are translated.  In general, this&lt;br /&gt;   document always assumes NAPT as the standard "worst-case" scenario.&lt;br /&gt;&lt;br /&gt;   In the traditional client/server paradigm, for which current NAT and&lt;br /&gt;   firewall mechanisms are primarily designed, network communication&lt;br /&gt;   typically operates in terms of sessions that originate in a privately&lt;br /&gt;   addressed network behind a network address translator, and are&lt;br /&gt;   directed to a well-connected public server with a stable IP address&lt;br /&gt;   and DNS mapping.  The client, or originator, of these connections&lt;br /&gt;   often does not have its own routable IP address on the public&lt;br /&gt;   Internet, but instead must share a single public IP address with a&lt;br /&gt;   number of other hosts on the same private network using the NAT as a&lt;br /&gt;   multiplexor.  The lack of a stable, dedicated public IP address is&lt;br /&gt;   not a problem for most client software such as web browsers, because&lt;br /&gt;   the client only needs to be addressable for the duration of a&lt;br /&gt;   particular session.&lt;br /&gt;&lt;br /&gt;   In the peer-to-peer paradigm, however, Internet hosts that would&lt;br /&gt;   normally be considered to be "clients" need to establish&lt;br /&gt;   communication sessions directly with each other.  In this case, both&lt;br /&gt;   the initiator and responder in a communication session might lie&lt;br /&gt;   behind a NAT/Firewall, without any permanent IP address or other form&lt;br /&gt;   of public network presence.  A common on-line gaming architecture,&lt;br /&gt;   for example, is for the participating application hosts to contact a&lt;br /&gt;   well-known server for initialization and administration purposes, but&lt;br /&gt;   then to establish direct connections with each other for fast and&lt;br /&gt;   efficient propagation of updates during gameplay.  Similarly, a file&lt;br /&gt;   sharing application might contact a well-known server for resource&lt;br /&gt;   discovery or searching purposes, but establish direct connections&lt;br /&gt;   with peer hosts for data transfer.  NAT creates a problem for peer-&lt;br /&gt;   to-peer connections because unless the NAT is specially configured,&lt;br /&gt;   hosts behind the NAT have no consistent, permanently usable ports to&lt;br /&gt;   which incoming TCP or UDP connections from "the Internet at large"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Ford                                                            [Page 2]&lt;br /&gt; &lt;br /&gt;draft-ford-natp2p-00.txt                                      April 2003&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   can be directed.  Firewall functionality, which is typically but not&lt;br /&gt;   always bundled with NAT, creates a similar problem because firewalls&lt;br /&gt;   are generally designed as one-way filters: sessions initiated inside&lt;br /&gt;   the protected network are allowed, but attempts by external hosts on&lt;br /&gt;   the Internet at large to initiate communication sessions with hosts&lt;br /&gt;   inside the firewall are blocked.  RFC 3235 [NAT-APPL] briefly&lt;br /&gt;   addresses this issue, but does not offer any general solutions that&lt;br /&gt;   do not compromise security; filling that gap is the purpose of this&lt;br /&gt;   document.&lt;br /&gt;&lt;br /&gt;2. Techniques for P2P Communication with NAT&lt;br /&gt;&lt;br /&gt;   This section describes in detail the currently known techniques for&lt;br /&gt;   implementing peer-to-peer communication in the presence of NAT, from&lt;br /&gt;   the perspective of the application or protocol designer.&lt;br /&gt;&lt;br /&gt;2.1. Relaying&lt;br /&gt;&lt;br /&gt;   The most reliable, but least efficient, method of implementing peer-&lt;br /&gt;   to-peer communication in the presence of NAT is to make the peer-to-&lt;br /&gt;   peer communication look to the network like client/server&lt;br /&gt;   communication.  For example, suppose two client hosts, A and B, have&lt;br /&gt;   each initiated TCP or UDP connections with a well-known server S&lt;br /&gt;   having a permanent IP address.  Clients A and B both reside on&lt;br /&gt;   privately addressed networks behind network address translators,&lt;br /&gt;   however, and neither of them have control over a public IP address or&lt;br /&gt;   permanently stable TCP or UDP port to which incoming connections can&lt;br /&gt;   be directed.&lt;br /&gt;&lt;br /&gt;                                Server S&lt;br /&gt;                                   |&lt;br /&gt;                                   |&lt;br /&gt;            +----------------------+----------------------+&lt;br /&gt;            |                                             |&lt;br /&gt;          NAT A                                         NAT B&lt;br /&gt;            |                                             |&lt;br /&gt;            |                                             |&lt;br /&gt;         Client A                                      Client B&lt;br /&gt;&lt;br /&gt;   Instead of attempting to establish a direct TCP or UDP connection&lt;br /&gt;   between clients A and B, the two clients can simply use the server S&lt;br /&gt;   to relay messages between them.  For example, to send a message to&lt;br /&gt;   client B, client A simply sends the message to server S along its&lt;br /&gt;   already-established client/server connection, and server S then sends&lt;br /&gt;   the message on to client B using its existing client/server&lt;br /&gt;   connection with B.  This method has the advantage that it will always&lt;br /&gt;   work as long as both clients have connectivity to the server.  Its&lt;br /&gt;   obvious disadvantages are that it consumes the server's processing&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Ford                                                            [Page 3]&lt;br /&gt; &lt;br /&gt;draft-ford-natp2p-00.txt                                      April 2003&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   power and network bandwidth unnecessarily, and communication latency&lt;br /&gt;   between the two clients is likely to be increased even if the server&lt;br /&gt;   is well-connected.&lt;br /&gt;&lt;br /&gt;2.2. Connection Reversal&lt;br /&gt;&lt;br /&gt;   The second technique works if only one of the clients is behind a&lt;br /&gt;   NAT.  For example, suppose client A is behind a NAT but client B is&lt;br /&gt;   not, as in the following diagram:&lt;br /&gt;&lt;br /&gt;                                Server S&lt;br /&gt;                            18.181.0.31:1235&lt;br /&gt;                                   |&lt;br /&gt;                                   |&lt;br /&gt;            +----------------------+----------------------+&lt;br /&gt;            |                                             |&lt;br /&gt;          NAT A                                           |&lt;br /&gt;    155.99.25.11:62000                                    |&lt;br /&gt;            |                                             |&lt;br /&gt;            |                                             |&lt;br /&gt;         Client A                                      Client B&lt;br /&gt;      10.0.0.1:1234                               138.76.29.7:1234&lt;br /&gt;&lt;br /&gt;   Client A has private IP address 10.0.0.1, and the application is&lt;br /&gt;   using TCP port 1234.  This client has established a connection with&lt;br /&gt;   server S at public IP address 18.181.0.31 and port 1235.  NAT A has&lt;br /&gt;   assigned TCP port 62000, at its own public IP address 155.99.25.11,&lt;br /&gt;   to serve as the temporary public endpoint address for A's session&lt;br /&gt;   with S: therefore, server S believes that client A is at IP address&lt;br /&gt;   155.99.25.11 using port 62000.  Client B, however, has its own&lt;br /&gt;   permanent IP address, 138.76.29.7, and the peer-to-peer application&lt;br /&gt;   on B is accepting TCP connections at port 1234.&lt;br /&gt;&lt;br /&gt;   Now suppose client B would like to initiate a peer-to-peer&lt;br /&gt;   communication session with client A.  B might first attempt to&lt;br /&gt;   contact client A either at the address client A believes itself to&lt;br /&gt;   have, namely 10.0.0.1:1234, or at the address of A as observed by&lt;br /&gt;   server S, namely 155.99.25.11:62000.  In either case, however, the&lt;br /&gt;   connection will fail.  In the first case, traffic directed to IP&lt;br /&gt;   address 10.0.0.1 will simply be dropped by the network because&lt;br /&gt;   10.0.0.1 is not a publicly routable IP address.  In the second case,&lt;br /&gt;   the TCP SYN request from B will arrive at NAT A directed to port&lt;br /&gt;   62000, but NAT A will typically reject the connection request with a&lt;br /&gt;   RST packet because only outgoing connections are allowed.&lt;br /&gt;&lt;br /&gt;   After attempting and failing to establish a direct connection to A,&lt;br /&gt;   client B can use server S to relay a request to client A to initiate&lt;br /&gt;   a "reversed" connection to client B.  Client A, upon receiving this&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Ford                                                            [Page 4]&lt;br /&gt; &lt;br /&gt;draft-ford-natp2p-00.txt                                      April 2003&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   relayed request through S, opens a TCP connection to client B at B's&lt;br /&gt;   public IP address and port number.  NAT A allows the connection to&lt;br /&gt;   proceed because it is originating inside the firewall, and client B&lt;br /&gt;   can receive the connection because it is not behind a NAT.&lt;br /&gt;&lt;br /&gt;   A variety of current peer-to-peer systems implement this technique.&lt;br /&gt;   Its main limitation, of course, is that it only works as long as only&lt;br /&gt;   one of the communicating peers is behind a NAT: if both peers are&lt;br /&gt;   behind NATs, then the method fails.  Because connection reversal is&lt;br /&gt;   not a general solution to the problem, it is NOT recommended as a&lt;br /&gt;   primary strategy.  Applications may choose to attempt connection&lt;br /&gt;   reversal, but should be table to fall back automatically on another&lt;br /&gt;   mechanism such as relaying if neither a "forward" nor a "reversed"&lt;br /&gt;   connection can be established.&lt;br /&gt;&lt;br /&gt;2.3. UDP Hole Punching&lt;br /&gt;&lt;br /&gt;   The third technique, and the one of primary interest in this memo, is&lt;br /&gt;   sometimes known as "UDP Hole Punching."  UDP hole punching relies on&lt;br /&gt;   well-established NAT conventions to allow appropriately designed&lt;br /&gt;   peer-to-peer applications to "punch holes" through NATs and firewalls&lt;br /&gt;   and establish direct connectivity with each other, even when both&lt;br /&gt;   communicating hosts may lie behind a NAT.  This technique was&lt;br /&gt;   mentioned briefly in section 5.1 of RFC 3027 [NAT-PROT] and has been&lt;br /&gt;   informally described elsewhere on the Internet [KEGEL].  As the name&lt;br /&gt;   implies, unfortunately, this technique works reliably only with UDP.&lt;br /&gt;&lt;br /&gt;   We will consider two specific scenarios, and how applications can be&lt;br /&gt;   designed to handle both of them gracefully.  In the first situation,&lt;br /&gt;   representing the common case, two clients desiring direct peer-to-&lt;br /&gt;   peer communication reside behind different NATs.  In the second, the&lt;br /&gt;   two clients actually reside behind the same NAT, but do not&lt;br /&gt;   necessarily know that they do.&lt;br /&gt;&lt;br /&gt;2.3.1. Clients Behind Different NATs&lt;br /&gt;&lt;br /&gt;   Suppose clients A and B both have private IP addresses and lie behind&lt;br /&gt;   different network address translators.  The peer-to-peer application&lt;br /&gt;   running on clients A and B and on server S each use UDP port 1234.  A&lt;br /&gt;   and B have each initiated UDP communication sessions with server S,&lt;br /&gt;   causing NAT A to assign its own public UDP port 62000 for A's session&lt;br /&gt;   with S, and causing NAT B to assign its port 31000 to B's session&lt;br /&gt;   with S, respectively.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Ford                                                            [Page 5]&lt;br /&gt; &lt;br /&gt;draft-ford-natp2p-00.txt                                      April 2003&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                                Server S&lt;br /&gt;                            18.181.0.31:1234&lt;br /&gt;                                   |&lt;br /&gt;                                   |&lt;br /&gt;            +----------------------+----------------------+&lt;br /&gt;            |                                             |&lt;br /&gt;          NAT A                                         NAT B&lt;br /&gt;    155.99.25.11:62000                            138.76.29.7:31000&lt;br /&gt;            |                                             |&lt;br /&gt;            |                                             |&lt;br /&gt;         Client A                                      Client B&lt;br /&gt;      10.0.0.1:1234                                 10.1.1.3:1234&lt;br /&gt;&lt;br /&gt;   Now suppose that client A wants to establish a UDP communication&lt;br /&gt;   session directly with client B.  If A simply starts sending UDP&lt;br /&gt;   requests to B's public address, 138.76.29.7:31000, then NAT B will&lt;br /&gt;   typically discard these incoming messages because the source address&lt;br /&gt;   and port number does not match those of S, with which the original&lt;br /&gt;   outgoing session was established.  Similarly, if B simply starts&lt;br /&gt;   sending UDP requests to A's public address, then NAT A will discard&lt;br /&gt;   these messages.&lt;br /&gt;&lt;br /&gt;   Suppose A starts sending UDP requests to B's public address, however,&lt;br /&gt;   and simultaneously relays a request through server S to B, asking B&lt;br /&gt;   to start sending UDP requests to A's public address.  A's outgoing&lt;br /&gt;   messages directed to B's public address (138.76.29.7:31000) will&lt;br /&gt;   cause NAT A to open up a new communication session between A's&lt;br /&gt;   private address and B's public address.  At the same time, B's&lt;br /&gt;   messages to A's public address (155.99.25.11:62000) will cause NAT B&lt;br /&gt;   to open up a new communication session between B's private address&lt;br /&gt;   and A's public address.  Once the new UDP sessions have been opened&lt;br /&gt;   up in each direction, client A and B can communicate with each other&lt;br /&gt;   directly without further reference to or burden on the "introduction"&lt;br /&gt;   server S.&lt;br /&gt;&lt;br /&gt;   The UDP hole punching technique has several useful properties.  Once&lt;br /&gt;   a direct peer-to-peer UDP connection has been established between two&lt;br /&gt;   NATted clients, either party on that connection can in turn take over&lt;br /&gt;   the role of "introducer" and help the other party establish peer-to-&lt;br /&gt;   peer connections with additional peers, minimizing the load on the&lt;br /&gt;   initial introduction server S.  The application does not need to&lt;br /&gt;   attempt to detect explicitly what kind of NAT it is behind, if any&lt;br /&gt;   [STUN], since the procedure above will establish peer-to-peer&lt;br /&gt;   communication channels equally well if either or both clients do not&lt;br /&gt;   happen to be behind a NAT.  The hole punching technique even works&lt;br /&gt;   automatically under "Twice NAT", where one or both clients are&lt;br /&gt;   removed from the public Internet via two or more levels of address&lt;br /&gt;   translation.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Ford                                                            [Page 6]&lt;br /&gt; &lt;br /&gt;draft-ford-natp2p-00.txt                                      April 2003&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2.3.2. Clients Behind the Same NAT&lt;br /&gt;&lt;br /&gt;   Now consider the scenario in which the two clients (probably&lt;br /&gt;   unknowingly) happen to reside behind the same NAT, and are therefore&lt;br /&gt;   located in the same private IP address space.  Client A has&lt;br /&gt;   established a UDP session with server S, to which the common NAT has&lt;br /&gt;   assigned public port number 62000.  Client B has similarly&lt;br /&gt;   established a session with S, to which the NAT has assigned public&lt;br /&gt;   port number 62001.&lt;br /&gt;&lt;br /&gt;                                Server S&lt;br /&gt;                            18.181.0.31:1234&lt;br /&gt;                                   |&lt;br /&gt;                                   |&lt;br /&gt;                                  NAT&lt;br /&gt;                         A-S 155.99.25.11:62000&lt;br /&gt;                         B-S 155.99.25.11:62001&lt;br /&gt;                                   |&lt;br /&gt;            +----------------------+----------------------+&lt;br /&gt;            |                                             |&lt;br /&gt;         Client A                                      Client B&lt;br /&gt;      10.0.0.1:1234                                 10.1.1.3:1234&lt;br /&gt;&lt;br /&gt;   Suppose that A and B use the UDP hole punching technique as outlined&lt;br /&gt;   above to establish a communication channel using server S as an&lt;br /&gt;   introducer.  Then A and B will learn each other's public IP addresses&lt;br /&gt;   and port numbers as observed by server S, and start sending each&lt;br /&gt;   other messages at those public addresses.  The two clients will be&lt;br /&gt;   able to communicate with each other this way as long as the NAT&lt;br /&gt;   allows hosts on the internal network to open translated UDP sessions&lt;br /&gt;   with other internal hosts and not just with external hosts.  For&lt;br /&gt;   example, when A sends a UDP packet to B's public address, the packet&lt;br /&gt;   initially has a source IP address and port number of 10.0.0.1:124 and&lt;br /&gt;   a destination of 155.99.25.11:62001.  The NAT receives this packet,&lt;br /&gt;   translates it to have a source of 155.99.25.11:62000 (A's public&lt;br /&gt;   address) and a destination of 10.1.1.3:1234, and then forwards it on&lt;br /&gt;   to B.  Even if supported by the NAT, this translation and forwarding&lt;br /&gt;   step is obviously unnecessary in this situation, and is likely to add&lt;br /&gt;   latency to the dialog between A and B as well as burdening the NAT.&lt;br /&gt;&lt;br /&gt;   The solution to this problem is straightforward, however.  When A and&lt;br /&gt;   B initially exchange address information through server S, they&lt;br /&gt;   should include their own IP addresses and port numbers as "observed"&lt;br /&gt;   by themselves, as well as their addresses as observed by S.  The&lt;br /&gt;   clients then simultaneously start sending packets to each other at&lt;br /&gt;   each of the alternative addresses they know about, and use the first&lt;br /&gt;   address that leads to successful communication.  If the two clients&lt;br /&gt;   are behind the same NAT, then the packets directed to their private&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Ford                                                            [Page 7]&lt;br /&gt; &lt;br /&gt;draft-ford-natp2p-00.txt                                      April 2003&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   addresses are likely to arrive first, resulting in a direct&lt;br /&gt;   communication channel not involving the NAT.  If the two clients are&lt;br /&gt;   behind different NATs, then the packets directed to their private&lt;br /&gt;   addresses will fail to reach each other at all, but the clients will&lt;br /&gt;   hopefully establish connectivity using their respective public&lt;br /&gt;   addresses.  It is important that these packets be authenticated in&lt;br /&gt;   some way, however, since in the case of different NATs it is entirely&lt;br /&gt;   possible for A's messages to B's private address to reach some other,&lt;br /&gt;   unrelated node on A's private network, or vice versa.&lt;br /&gt;&lt;br /&gt;2.3.3. Consistent Port Mappings&lt;br /&gt;&lt;br /&gt;   The hole punching technique has one main caveat: it works only if&lt;br /&gt;   each of the NATs maintains a single, consistent mapping from a given&lt;br /&gt;   (private IP address, private UDP port) pair to a translated (public&lt;br /&gt;   IP address, public UDP port) pair, for as long as that UDP port is in&lt;br /&gt;   use.  For a given UDP port on the private network, the NAT must&lt;br /&gt;   ensure that the internal port is always mapped to the same public UDP&lt;br /&gt;   port on the globally addressable Internet, even if communication&lt;br /&gt;   occurs between that internal UDP port and multiple distinct external&lt;br /&gt;   destinations on the Internet.  In particular, the NAT must not just&lt;br /&gt;   naively allocate and assign a new public UDP port for each new&lt;br /&gt;   session initiated from within the firewall boundary, where a&lt;br /&gt;   "session" is defined by the addresses and port numbers of both&lt;br /&gt;   communicating endpoints.  Assigning a new public port for each new&lt;br /&gt;   session makes it impossible for a UDP application to reuse an&lt;br /&gt;   already-established (public IP address, public UDP port) mapping for&lt;br /&gt;   communication with different external destinations.&lt;br /&gt;&lt;br /&gt;   While RFC 3022 [NAT-TRAD] suggests and explicitly allows NATs to&lt;br /&gt;   maintain a single mapping from a (private IP address, private port)&lt;br /&gt;   pair to a (public IP address, public port) pair, it unfortunately&lt;br /&gt;   does not mandate this behavior.  Therefore, while many NATs implement&lt;br /&gt;   the desirable behavior and therefore allow direct UDP-based P2P&lt;br /&gt;   connections using the hole punching technique, other NATs currently&lt;br /&gt;   do not support the technique.  Since this is the most efficient known&lt;br /&gt;   method of establishing direct peer-to-peer communication between two&lt;br /&gt;   nodes that are both behind NATs, and it works with a wide variety of&lt;br /&gt;   existing NATs, it is recommended that applications use this technique&lt;br /&gt;   if efficient peer-to-peer communication is required, but be prepared&lt;br /&gt;   to fall back on simple relaying when direct communication cannot be&lt;br /&gt;   established.&lt;br /&gt;&lt;br /&gt;2.4. UDP Port Number Prediction&lt;br /&gt;&lt;br /&gt;   A variant of the UDP hole punching technique discussed above exists&lt;br /&gt;   that allows peer-to-peer UDP sessions to be created in the presence&lt;br /&gt;   of some NATs that do not maintain a consistent mapping between&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Ford                                                            [Page 8]&lt;br /&gt; &lt;br /&gt;draft-ford-natp2p-00.txt                                      April 2003&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   private and public UDP ports.  This method, sometimes called the&lt;br /&gt;   "N+1" technique [BIDIR], works if public port numbers selected by the&lt;br /&gt;   NAT are not held constant across all sessions originating at a given&lt;br /&gt;   private IP address and port, but are nevertheless predictable.&lt;br /&gt;   Consider again the situation in which two clients, A and B, each&lt;br /&gt;   behind a separate NAT, have each established UDP connections with a&lt;br /&gt;   permanently addressable server S:&lt;br /&gt;&lt;br /&gt;                                  Server S&lt;br /&gt;                              18.181.0.31:1234&lt;br /&gt;                                     |&lt;br /&gt;                                     |&lt;br /&gt;              +----------------------+----------------------+&lt;br /&gt;              |                                             |&lt;br /&gt;            NAT A                                         NAT B&lt;br /&gt;   A-S 155.99.25.11:62000                        B-S 138.76.29.7:31000&lt;br /&gt;              |                                             |&lt;br /&gt;              |                                             |&lt;br /&gt;           Client A                                      Client B&lt;br /&gt;        10.0.0.1:1234                                 10.1.1.3:1234&lt;br /&gt;&lt;br /&gt;   NAT A has assigned its own UDP port 62000 to the communication&lt;br /&gt;   session between A and S, and NAT B has assigned its port 31000 to the&lt;br /&gt;   session between B and S.  By communicating through server S, A and B&lt;br /&gt;   learn each other's public IP addresses and port numbers as observed&lt;br /&gt;   by S.  Client A now starts sending UDP messages to port 31001 at&lt;br /&gt;   address 138.76.29.7 (note the port number increment), and client B&lt;br /&gt;   simultaneously starts sending messages to port 62001 at address&lt;br /&gt;   155.99.25.11.  If NATs A and B assign port numbers to new sessions&lt;br /&gt;   sequentially, and if not much time has passed since the A-S and B-S&lt;br /&gt;   sessions were initiated, then a working bidirectional communication&lt;br /&gt;   channel between A and B should result.  A's messages to B cause NAT A&lt;br /&gt;   to open up a new session, to which NAT A will (hopefully) assign&lt;br /&gt;   public port number 62001, because 62001 is next in sequence after the&lt;br /&gt;   port number 62000 it previously assigned to the session between A and&lt;br /&gt;   S.  Similarly, B's messages to A will cause NAT B to open a new&lt;br /&gt;   session, to which it will (hopefully) assign port number 31001.  If&lt;br /&gt;   both clients have correctly guessed the port numbers each NAT assigns&lt;br /&gt;   to the new sessions, then a bidirectional UDP communication channel&lt;br /&gt;   will have been established as shown below.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Ford                                                            [Page 9]&lt;br /&gt; &lt;br /&gt;draft-ford-natp2p-00.txt                                      April 2003&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                                  Server S&lt;br /&gt;                              18.181.0.31:1234&lt;br /&gt;                                     |&lt;br /&gt;                                     |&lt;br /&gt;              +----------------------+----------------------+&lt;br /&gt;              |                                             |&lt;br /&gt;            NAT A                                         NAT B&lt;br /&gt;   A-S 155.99.25.11:62000                        B-S 138.76.29.7:31000&lt;br /&gt;   A-B 155.99.25.11:62001                        B-A 138.76.29.7:31001&lt;br /&gt;              |                                             |&lt;br /&gt;              |                                             |&lt;br /&gt;           Client A                                      Client B&lt;br /&gt;        10.0.0.1:1234                                 10.1.1.3:1234&lt;br /&gt;&lt;br /&gt;   Obviously there are many things that can cause this trick to fail.&lt;br /&gt;   If the predicted port number at either NAT already happens to be in&lt;br /&gt;   use by an unrelated session, then the NAT will skip over that port&lt;br /&gt;   number and the connection attempt will fail.  If either NAT sometimes&lt;br /&gt;   or always chooses port numbers non-sequentially, then the trick will&lt;br /&gt;   fail.  If a different client behind NAT A (or B respectively) opens&lt;br /&gt;   up a new outgoing UDP connection to any external destination after A&lt;br /&gt;   (B) establishes its connection with S but before sending its first&lt;br /&gt;   message to B (A), then the unrelated client will inadvertently&lt;br /&gt;   "steal" the desired port number.  This trick is therefore much less&lt;br /&gt;   likely to work when either NAT involved is under load.  For all of&lt;br /&gt;   these reasons, it is NOT recommended that new applications implement&lt;br /&gt;   this trick; it is described here for purely for historical and&lt;br /&gt;   informational purposes.&lt;br /&gt;&lt;br /&gt;2.5. Simultaneous TCP Connection Initiation&lt;br /&gt;&lt;br /&gt;   There is a method that can be used in some cases to establish direct&lt;br /&gt;   peer-to-peer TCP connections between a pair of nodes that are both&lt;br /&gt;   behind NATs.  Most TCP sessions start with one endpoint sending a SYN&lt;br /&gt;   packet, to which the other party responds with a SYN-ACK packet.  It&lt;br /&gt;   is possible and legal, however, for two endpoints to start a TCP&lt;br /&gt;   session by simultaneously sending each other SYN packets, to which&lt;br /&gt;   each party subsequently responds with a separate ACK.  This procedure&lt;br /&gt;   is known as a "simultaneous open."&lt;br /&gt;&lt;br /&gt;   If a NAT receives a TCP SYN packet from outside the private network&lt;br /&gt;   attempting to initiate an incoming TCP connection, the NAT will&lt;br /&gt;   normally reject the connection attempt by sending back a TCP RST&lt;br /&gt;   (connection reset) packet.  If, however, the SYN packet arrives with&lt;br /&gt;   source and destination addresses and port numbers that correspond to&lt;br /&gt;   a TCP session that the NAT believes is already active, then the NAT&lt;br /&gt;   will allow the packet to pass through.  In particular, if the NAT has&lt;br /&gt;   just recently seen and transmitted an outgoing SYN packet with the&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Ford                                                           [Page 10]&lt;br /&gt; &lt;br /&gt;draft-ford-natp2p-00.txt                                      April 2003&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   same addresses and port numbers, then it will consider the session&lt;br /&gt;   active and allow the incoming SYN through.  If clients A and B can&lt;br /&gt;   each correctly predict the public port number that its respective NAT&lt;br /&gt;   will assign the next outgoing TCP connection, and if each client&lt;br /&gt;   initiates an outgoing TCP connection with the other client timed so&lt;br /&gt;   that each client's outgoing SYN passes through its local NAT before&lt;br /&gt;   either SYN reaches the opposite NAT, then a working peer-to-peer TCP&lt;br /&gt;   connection will result.&lt;br /&gt;&lt;br /&gt;   Unfortunately, this trick is even more fragile and timing-sensitive&lt;br /&gt;   than the UDP port number prediction trick described above.  First,&lt;br /&gt;   all the same things can go wrong with each side's attempt to predict&lt;br /&gt;   the public port numbers the NATs will assign to the new sessions.  In&lt;br /&gt;   addition, if either client's SYN arrives at the opposite NAT too&lt;br /&gt;   quickly, then the NAT will reject the SYN with a RST packet, causing&lt;br /&gt;   the local NAT in turn to close the new session.  Finally, even though&lt;br /&gt;   support for simultaneous open is technically a mandatory part of the&lt;br /&gt;   TCP specification [TCP], it is not implemented correctly or at all in&lt;br /&gt;   many common operating systems.  For this reason, this trick is&lt;br /&gt;   likewise mentioned here only for historical interest; it is NOT&lt;br /&gt;   recommended for use by applications.  Applications that require&lt;br /&gt;   efficient, direct peer-to-peer communication should use UDP.&lt;br /&gt;&lt;br /&gt;3. NAT Design Guidelines&lt;br /&gt;&lt;br /&gt;   This section discusses considerations for the design of network&lt;br /&gt;   address translators, as they affect peer-to-peer applications.&lt;br /&gt;&lt;br /&gt;3.1. Maintaining Consistent Public/Private Mappings for UDP Ports&lt;br /&gt;&lt;br /&gt;   The primary and most important recommendation of this document for&lt;br /&gt;   NAT designers is that the NAT maintain a consistent and stable&lt;br /&gt;   mapping between a given (internal IP address, internal UDP port) pair&lt;br /&gt;   and a corresponding (public IP address, public UDP port) pair for as&lt;br /&gt;   long as any active sessions exist using that mapping.  The NAT may&lt;br /&gt;   filter incoming traffic on a per-session basis, by examining both the&lt;br /&gt;   source and destination IP addresses and port numbers in each packet.&lt;br /&gt;   When a node on the private network starts sending outgoing packets to&lt;br /&gt;   a new external destination, however, while using the same source IP&lt;br /&gt;   address and UDP port as an existing translated UDP session, the NAT&lt;br /&gt;   should ensure that the new UDP session is given the same public IP&lt;br /&gt;   address and UDP port numbers as the existing session.&lt;br /&gt;&lt;br /&gt;   One method of implementing this behavior, meant to be only&lt;br /&gt;   illustrative and not prescriptive, is outlined here.  The "critical-&lt;br /&gt;   path" processing performed by a NAT on a packet flowing in either&lt;br /&gt;   direction typically involves extracting the source and destination IP&lt;br /&gt;   addresses from the IP header, and the source and destination TCP/UDP&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Ford                                                           [Page 11]&lt;br /&gt; &lt;br /&gt;draft-ford-natp2p-00.txt                                      April 2003&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   port numbers from the TCP/UDP header, and using these four values to&lt;br /&gt;   index into a table of active sessions.  When a packet is received for&lt;br /&gt;   which no entry is found in the session table, the NAT must decide&lt;br /&gt;   whether or not and how to establish a new session, and this is where&lt;br /&gt;   the typical "outgoing sessions only" firewall policy comes into&lt;br /&gt;   effect.&lt;br /&gt;&lt;br /&gt;   If the unknown packet was received from the public network, then it&lt;br /&gt;   is usually dropped (or perhaps rejected with a RST in the case of&lt;br /&gt;   TCP).  If a UDP packet for an unknown session arrives from the&lt;br /&gt;   private network, however, and the NAT is configured in the typical&lt;br /&gt;   way to allow outgoing UDP sessions, the then NAT looks up the&lt;br /&gt;   packet's (source IP address, source UDP port) in a second internal&lt;br /&gt;   table: a "mapping table."  For a given (private IP address, private&lt;br /&gt;   UDP port) on the internal network, the NAT stores in the mapping&lt;br /&gt;   table the corresponding (public IP address, public UDP port) it has&lt;br /&gt;   assigned to represent that private endpoint.  If a mapping already&lt;br /&gt;   exists, the NAT simply uses the existing mapping when constructing&lt;br /&gt;   the new session.  If no such entry is present in the mapping table,&lt;br /&gt;   then the NAT allocates a new public UDP port from its pool and&lt;br /&gt;   creates a new mapping table entry along with the new session.  The&lt;br /&gt;   NAT also maintains with each entry in the mapping table a list or&lt;br /&gt;   count of the active sessions using that mapping, so that it can&lt;br /&gt;   reassign the public UDP port to other purposes once all of the&lt;br /&gt;   outstanding sessions for the mapping are deemed inactive.&lt;br /&gt;&lt;br /&gt;3.1.1. Preserving Port Numbers&lt;br /&gt;&lt;br /&gt;   Some NATs, when establishing a new UDP session, attempt to assign the&lt;br /&gt;   same public port number as the corresponding private port number, if&lt;br /&gt;   that port number happens to be available.  For example, if client A&lt;br /&gt;   at address 10.0.0.1 initiates an outgoing UDP session with a datagram&lt;br /&gt;   from port number 1234, and the NAT's public port number 1234 happens&lt;br /&gt;   to be available, then the NAT uses port number 1234 at the NAT's&lt;br /&gt;   public IP address as the translated endpoint address for the session.&lt;br /&gt;   This behavior might be beneficial to some legacy UDP applications&lt;br /&gt;   that expect to communicate only using specific UDP port numbers, but&lt;br /&gt;   it is not recommended that applications depend on this behavior since&lt;br /&gt;   it is only possible for a NAT to preserve the port number if at most&lt;br /&gt;   one node on the internal network is using that port number.&lt;br /&gt;&lt;br /&gt;   In addition, a NAT should NOT try to preserve the port number in a&lt;br /&gt;   new session if doing so would conflict with the goal of maintaining a&lt;br /&gt;   consistent mapping between public and private endpoint addresses.&lt;br /&gt;   For example, suppose client A at internal port 1234 has established a&lt;br /&gt;   session with external server S, and NAT A has assigned public port&lt;br /&gt;   62000 to this session because port number 1234 on the NAT was not&lt;br /&gt;   available at the time.  Now suppose port number 1234 on the NAT&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Ford                                                           [Page 12]&lt;br /&gt; &lt;br /&gt;draft-ford-natp2p-00.txt                                      April 2003&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   subsequently becomes available, and while the session between A and S&lt;br /&gt;   is still active, client A initiates a new session from its same&lt;br /&gt;   internal port (1234) to a different external node B.  In this case,&lt;br /&gt;   because an active mapping has already been established between client&lt;br /&gt;   A's port 1234 and the NAT's public port 62000, this mapping should be&lt;br /&gt;   maintained and the new session should also use port 62000 as the&lt;br /&gt;   public port corresponding to client A's port 1234.  The NAT should&lt;br /&gt;   NOT assign public port 1234 to this new session just because port&lt;br /&gt;   1234 has become available: that behavior would not be likely to&lt;br /&gt;   benefit the application in any way since the application has already&lt;br /&gt;   been operating with a translated port number, and it would break any&lt;br /&gt;   attempts the application might make to establish peer-to-peer&lt;br /&gt;   connections using the UDP hole punching technique.&lt;br /&gt;&lt;br /&gt;3.2. Maintaining Consistent Public/Private Mappings for TCP Ports&lt;br /&gt;&lt;br /&gt;   For consistency with the behavior of UDP translation, it is suggested&lt;br /&gt;   that NATs also maintain a consistent mapping between private and&lt;br /&gt;   public (IP address, TCP port number) pairs for TCP connections, in&lt;br /&gt;   the same way as described above for UDP.  Maintaining consistent&lt;br /&gt;   mappings for TCP ports facilitates the operation of the simultaneous&lt;br /&gt;   TCP open technique, which although not recommended in general for&lt;br /&gt;   peer-to-peer applications, may be useful in controlled situations&lt;br /&gt;   when the two endpoints are sufficiently well synchronized.&lt;br /&gt;   Maintaining TCP endpoint mappings consistently may also increase the&lt;br /&gt;   NAT's compatibility with other applications that initiate multiple&lt;br /&gt;   TCP connections from the same source port.&lt;br /&gt;&lt;br /&gt;3.3. Proxy Protocols&lt;br /&gt;&lt;br /&gt;   Besides adopting the above recommendations to make a NAT's basic&lt;br /&gt;   "transparent-mode" operation as peer-to-peer friendly as possible, it&lt;br /&gt;   is helpful for NATs also to support proxy protocols that allow&lt;br /&gt;   applications to request an explicitly managed presence on the public&lt;br /&gt;   side of the NAT.  Unfortunately, several alternative protocols have&lt;br /&gt;   been proposed with varying characteristics [SOCKS, RSIP, MIDCOM,&lt;br /&gt;   UPNP], and as of this writing none of them have achieved clear&lt;br /&gt;   acceptance or dominance in the Internet community.  Furthermore, it&lt;br /&gt;   is not clear yet how well these protocols will work in the&lt;br /&gt;   increasingly common "Twice NAT" situation where clients are located&lt;br /&gt;   behind multiple levels of NAT, especially if the NATs are from&lt;br /&gt;   different vendors, support different features and policies, and are&lt;br /&gt;   under different administrative domains.  (In the common case, one is&lt;br /&gt;   owned and managed by the ISP and the other by the end user.)  For&lt;br /&gt;   these reasons, this document makes no attempt to explore this issue&lt;br /&gt;   in detail or to recommend specific proxy protocols for NATs to&lt;br /&gt;   implement.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Ford                                                           [Page 13]&lt;br /&gt; &lt;br /&gt;draft-ford-natp2p-00.txt                                      April 2003&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;4. Security Considerations&lt;br /&gt;&lt;br /&gt;   Using the UDP hole punching technique in peer-to-peer applications&lt;br /&gt;   and supporting it in NATs should not create any new security issues.&lt;br /&gt;   In particular, the technique does not require a NAT firewall to be&lt;br /&gt;   "promiscuous" in any way about acceping incoming UDP traffic.  As&lt;br /&gt;   long as outgoing UDP sessions are enabled and the firewall maintains&lt;br /&gt;   consistent mappings between internal and external UDP ports, the&lt;br /&gt;   firewall can still filter out all incoming UDP packets except those&lt;br /&gt;   with (source IP, source port, destination IP, destination port)&lt;br /&gt;   tuples that exactly match those of active sessions initiated from&lt;br /&gt;   within the enclave.  Filtering incoming traffic aggressively while&lt;br /&gt;   maintaining consistent mappings thus allows a firewall to be "peer-&lt;br /&gt;   to-peer friendly" without compromising the standard firewall security&lt;br /&gt;   principle of rejecting all unsolicited incoming traffic.&lt;br /&gt;&lt;br /&gt;   It might be argued that maintaining a consistent internal/external&lt;br /&gt;   port mapping can "leak" some information to the outside about the&lt;br /&gt;   applications on the internal network, particularly about the&lt;br /&gt;   relationships between different UDP sessions that cross the firewall&lt;br /&gt;   boundary.  If the security requirements are so critical that such a&lt;br /&gt;   subtle information channel is of concern, however, then the firewall&lt;br /&gt;   almost certainly should not be configured to allow unrestricted&lt;br /&gt;   outgoing UDP traffic in the first place.  Controlling information&lt;br /&gt;   flow to this degree generally requires that the firewall only allow&lt;br /&gt;   communication only via tightly-controllable application-level&lt;br /&gt;   gateways, in which case the firewall can either implement the proper&lt;br /&gt;   peer-to-peer communication behavior itself or disallow it entirely.&lt;br /&gt;&lt;br /&gt;References&lt;br /&gt;&lt;br /&gt;[BIDIR]    Peer-to-Peer Working Group, NAT/Firewall Working Committee,&lt;br /&gt;           "Bidirectional Peer-to-Peer Communication with Interposing&lt;br /&gt;           Firewalls and NATs", August 2001.&lt;br /&gt;           http://www.peer-to-peerwg.org/tech/nat/&lt;br /&gt;&lt;br /&gt;[KEGEL]    Dan Kegel, "NAT and Peer-to-Peer Networking", July 1999.&lt;br /&gt;           http://www.alumni.caltech.edu/~dank/peer-nat.html&lt;br /&gt;&lt;br /&gt;[MIDCOM]   P. Srisuresh, J. Kuthan, J. Rosenberg, A. Molitor, and&lt;br /&gt;           A. Rayhan, "Middlebox communication architecture and&lt;br /&gt;           framework", RFC 3303, August 2002.&lt;br /&gt;&lt;br /&gt;[NAT-APPL] D. Senie, "Network Address Translator (NAT)-Friendly&lt;br /&gt;           Application Design Guidelines", RFC 3235, January 2002.&lt;br /&gt;&lt;br /&gt;[NAT-PROT] M. Holdrege and P. Srisuresh, "Protocol Complications&lt;br /&gt;           with the IP Network Address Translator", RFC 3027,&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Ford                                                           [Page 14]&lt;br /&gt; &lt;br /&gt;draft-ford-natp2p-00.txt                                      April 2003&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;           January 2001.&lt;br /&gt;&lt;br /&gt;[NAT-TERM] P. Srisuresh and M. Holdrege, "IP Network Address&lt;br /&gt;           Translator (NAT) Terminology and Considerations", RFC&lt;br /&gt;           2663, August 1999.&lt;br /&gt;&lt;br /&gt;[NAT-TRAD] P. Srisuresh and K. Egevang, "Traditional IP Network&lt;br /&gt;           Address Translator (Traditional NAT)", RFC 3022,&lt;br /&gt;           January 2001.&lt;br /&gt;&lt;br /&gt;[RSIP]     M. Borella, J. Lo, D. Grabelsky, and G. Montenegro,&lt;br /&gt;           "Realm Specific IP: Framework", RFC 3102, October 2001.&lt;br /&gt;&lt;br /&gt;[SOCKS]    M. Leech, M. Ganis, Y. Lee, R. Kuris, D. Koblas, and&lt;br /&gt;           L. Jones, "OCKS Protocol Version 5", RFC 1928, March 1996.&lt;br /&gt;&lt;br /&gt;[STUN]     J. Rosenberg, J. Weinberger, C. Huitema, and R. Mahy,&lt;br /&gt;           "STUN - Simple Traversal of User Datagram Protocol (UDP)&lt;br /&gt;           Through Network Address Translators (NATs)", RFC 3489,&lt;br /&gt;           March 2003.&lt;br /&gt;&lt;br /&gt;[TCP]      "Transmission Control Protocol", RFC 793, September 1981.&lt;br /&gt;&lt;br /&gt;[UPNP]     UPnP Forum, "Internet Gateway Device (IGD) Standardized&lt;br /&gt;           Device Control Protocol V 1.0", November 2001.&lt;br /&gt;           http://www.upnp.org/standardizeddcps/igd.asp&lt;br /&gt;&lt;br /&gt;Author's Address&lt;br /&gt;&lt;br /&gt;   Bryan Ford&lt;br /&gt;   Laboratory for Computer Science&lt;br /&gt;   Massachusetts Institute of Technology&lt;br /&gt;   77 Massachusetts Ave.&lt;br /&gt;   Cambridge, MA 02139&lt;br /&gt;&lt;br /&gt;   Phone: (617) 253-5261&lt;br /&gt;   E-mail: baford@mit.edu&lt;br /&gt;   Web: http://www.brynosaurus.com/&lt;br /&gt;&lt;br /&gt;Full Copyright Statement&lt;br /&gt;&lt;br /&gt;   Copyright (C) The Internet Society (2003).  All Rights Reserved.&lt;br /&gt;&lt;br /&gt;   This document and translations of it may be copied and furnished to&lt;br /&gt;   others, and derivative works that comment on or otherwise explain it&lt;br /&gt;   or assist in its implementation may be prepared, copied, published&lt;br /&gt;   and distributed, in whole or in part, without restriction of any&lt;br /&gt;   kind, provided that the above copyright notice and this paragraph are&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Ford                                                           [Page 15]&lt;br /&gt; &lt;br /&gt;draft-ford-natp2p-00.txt                                      April 2003&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   included on all such copies and derivative works.  However, this&lt;br /&gt;   document itself may not be modified in any way, such as by removing&lt;br /&gt;   the copyright notice or references to the Internet Society or other&lt;br /&gt;   Internet organizations, except as needed for the purpose of&lt;br /&gt;   developing Internet standards in which case the procedures for&lt;br /&gt;   copyrights defined in the Internet Standards process must be&lt;br /&gt;   followed, or as required to translate it into languages other than&lt;br /&gt;   English.&lt;br /&gt;&lt;br /&gt;   The limited permissions granted above are perpetual and will not be&lt;br /&gt;   revoked by the Internet Society or its successors or assigns.&lt;br /&gt;&lt;br /&gt;   This document and the information contained herein is provided on an&lt;br /&gt;   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING&lt;br /&gt;   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING&lt;br /&gt;   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION&lt;br /&gt;   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF&lt;br /&gt;   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Ford                                                           [Page 16]&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/9797590-4091468036292915436?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/4091468036292915436/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/07/p2p-nat-hole-punching-udp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/4091468036292915436'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/4091468036292915436'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/07/p2p-nat-hole-punching-udp.html' title='P2P NAT HOLE PUNCHING UDP'/><author><name>Tiebing</name><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-9797590.post-1409055541626543620</id><published>2011-06-29T14:46:00.000-07:00</published><updated>2011-06-29T14:46:13.870-07:00</updated><title type='text'>Windows CE c# .net compact framework webException "the response did not contain an end of entity mark"</title><content type='html'>This problem usually occurs on the Compact Framework of .Net.&lt;br /&gt;&lt;br /&gt;Just setting the HTTP ProtocolVersion of the WebRequest to version 1.0 fixed my problem:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;request.ProtocolVersion = System.Net.HttpVersion.Version10;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;I found this solution &lt;a href="http://www.spidy.de/blog/2010/06/30/webexception-trouble-with-net-compact-framework/#more-118"&gt;at this blog&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-1409055541626543620?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/1409055541626543620/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/06/windows-ce-c-net-compact-framework.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/1409055541626543620'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/1409055541626543620'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/06/windows-ce-c-net-compact-framework.html' title='Windows CE c# .net compact framework webException &quot;the response did not contain an end of entity mark&quot;'/><author><name>Tiebing</name><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-9797590.post-5138896063212139912</id><published>2011-06-29T14:27:00.000-07:00</published><updated>2011-06-29T14:27:30.372-07:00</updated><title type='text'>Windows CE c# .Net  An error message cannot be displayed because an optional resource assembly containing it cannot be found.</title><content type='html'>Copy this cab file to your CE device, double-click to install it on your CE device,and now you should have the detailed debug messages now.&lt;br /&gt;&lt;br /&gt;If anyone is still having this issue the cab file you are looking for, for CF2 is actually in &lt;br /&gt;"C:\Program Files\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\Diagnostics"&lt;br /&gt;I  am running WM5 with messaing and security pack and the cab required was  System_SR_ENU.CAB and not the System_SR_ENU_wm.CAB version&lt;br /&gt;&lt;br /&gt;&lt;a href="http://stackoverflow.com/questions/960163/an-error-message-cannot-be-displayed-because-an-optional-resource-assembly-contai"&gt;There is also a stack overflow question with the same answer&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-5138896063212139912?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/5138896063212139912/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/06/windows-ce-c-net-error-message-cannot.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/5138896063212139912'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/5138896063212139912'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/06/windows-ce-c-net-error-message-cannot.html' title='Windows CE c# .Net  An error message cannot be displayed because an optional resource assembly containing it cannot be found.'/><author><name>Tiebing</name><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-9797590.post-8130578607329242124</id><published>2011-06-27T09:28:00.000-07:00</published><updated>2011-07-14T11:10:49.265-07:00</updated><title type='text'>popular free http proxy software</title><content type='html'>1. Privoxy, block ads&lt;br /&gt;2. polipo, fast light-weight proxy&lt;br /&gt;3. squid, heavy-duty enterprise proxy&lt;br /&gt;4. tinyproxy&lt;br /&gt;&lt;br /&gt;All are Free and Open Source software&lt;br /&gt;&lt;br /&gt;I use tinyproxy most of the time, and it works great.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-8130578607329242124?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/8130578607329242124/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/06/popular-free-http-proxy-software.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/8130578607329242124'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/8130578607329242124'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/06/popular-free-http-proxy-software.html' title='popular free http proxy software'/><author><name>Tiebing</name><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-9797590.post-9021852241014198501</id><published>2011-06-20T18:16:00.001-07:00</published><updated>2011-06-20T18:17:06.663-07:00</updated><title type='text'>How to use curl to upload a file</title><content type='html'>curl -F "myfile=@testfile.exe" http://123.45.5.6/test/upload.php&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-9021852241014198501?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/9021852241014198501/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/06/how-to-use-curl-to-upload-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/9021852241014198501'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/9021852241014198501'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/06/how-to-use-curl-to-upload-file.html' title='How to use curl to upload a file'/><author><name>Tiebing</name><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-9797590.post-2283399092948982290</id><published>2011-06-17T10:49:00.000-07:00</published><updated>2011-06-17T10:49:35.103-07:00</updated><title type='text'>A fairly new comparison of openswan and strongswan</title><content type='html'>&lt;h1 class="blog-entry-title"&gt;&lt;a href="http://pariahzero.net/Blog/files/e7d5abf84a96640d5cd70dd0dfb3d200-71.html"&gt;Openswan vs strongSwan&lt;/a&gt;&lt;/h1&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;From the beginning of my VPN project, I knew about &lt;a href="http://www.strongswan.org/" rel="self" title="strongSwan"&gt;strongSwan&lt;/a&gt;... but I stuck to &lt;a href="http://www.openswan.org/" rel="self" title="Openswan"&gt;Openswan&lt;/a&gt; because that’s what is covered in the &lt;a href="https://www.packtpub.com/openswan/book" rel="self" title="Openswan book"&gt;Openswan book I bought and read&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;After  perusing the strongSwan website for a few minutes, one thing became  apparent:  the strongSwan project has superior documentation. The  comparison isn’t even close; most of the Openswan documentation hasn’t  been updated in years; it often refers to Openswan 3.0 - a branch on  which development has stopped for at least 3 years, if its &lt;a href="http://git.openswan.org/cgi-bin/gitweb.cgi?p=openswan.git/.git;a=shortlog;h=refs/heads/v3.0" rel="self"&gt;git repository&lt;/a&gt; is accurate.&lt;br /&gt;&lt;br /&gt;Additionally, when I looked at features, a few trends emerged:&lt;br /&gt;&lt;ul class="disc"&gt;&lt;li&gt;Openswan moved in the direction of the networking industry&lt;/li&gt;&lt;/ul&gt;&lt;ul class="disc"&gt;&lt;li&gt;&lt;ul class="(null)"&gt;&lt;li&gt;And as a result, supports aggressive mode (which the Openswan devs ask you not to use).&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;ul class="(null)"&gt;&lt;li&gt;Openswan supports the legacy KLIPS IPsec kernel stack.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul class="disc"&gt;&lt;li&gt;strongSwan is interested in authentication and security:&lt;/li&gt;&lt;/ul&gt;&lt;ul class="disc"&gt;&lt;li&gt;&lt;ul class="(null)"&gt;&lt;li&gt;No surprise, given its originator provided the x.509 patch.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul class="disc"&gt;&lt;li&gt;&lt;ul class="(null)"&gt;&lt;li&gt;&lt;ul class="(null)"&gt;&lt;li&gt;strongSwan has better support for authentication mechanisms in general&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;ul class="(null)"&gt;&lt;li&gt;&lt;ul class="(null)"&gt;&lt;li&gt;Supports EAP methods, including EAP-RADIUS&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;ul class="(null)"&gt;&lt;li&gt;&lt;ul class="(null)"&gt;&lt;li&gt;PKCS#11 smart cards&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul class="disc"&gt;&lt;li&gt;strongSwan only supports KLIPS on 2.4 linux kernels; if you’re running 2.6, they use the in-kernel NETKEY IPsec stack.&lt;/li&gt;&lt;li&gt;strongSwan also supports the new IKEv2 standard (and interoperates well with other IKEv2 implementations.&lt;/li&gt;&lt;/ul&gt;&lt;ul class="disc"&gt;&lt;li&gt;&lt;ul class="(null)"&gt;&lt;li&gt;IKEv2 allows for automatic IP address assignment, DNS assignment, and routing.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;ul class="(null)"&gt;&lt;li&gt;IKEv2 is in its infancy in Openswan.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul class="disc"&gt;&lt;li&gt;strongSwan aupports Mobility and Multihomed IKEv2 (also known as MOBIKE)&lt;/li&gt;&lt;li&gt;strongSwan supports additional ciphers, such as TwoFish, and elliptic curve crypto.&lt;/li&gt;&lt;li&gt;strongSwan is modular (vs. Openswan’s monolithic nature)&lt;/li&gt;&lt;li&gt;strongSwan  also has IP address pools/assignment with IKEv1, which is not offered by Openswan.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;With  the data available to me, strongSwan looks like the clear winner. About  the only thing I’ve heard about that Openswan does that strongSwan  doesn’t are:&lt;br /&gt;&lt;ul class="disc"&gt;&lt;li&gt;KLIPS/MAST on 2.6 kernels&lt;/li&gt;&lt;/ul&gt;&lt;ul class="disc"&gt;&lt;li&gt;&lt;ul class="(null)"&gt;&lt;li&gt;This  allows (with a patched &amp;amp; recompiled kernel) some NAT mapping that  doesn’t work well with the NETKEY stack. Cases where NAT clients have  the same “internal” IP address as the server, or each other have  problems with NETKEY currently.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul class="disc"&gt;&lt;li&gt;IKEv1 Aggressive mode:  Which is something that even the Openswan developers suggest you avoid if at all possible.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-2283399092948982290?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/2283399092948982290/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/06/fairly-new-comparison-of-openswan-and.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/2283399092948982290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/2283399092948982290'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/06/fairly-new-comparison-of-openswan-and.html' title='A fairly new comparison of openswan and strongswan'/><author><name>Tiebing</name><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-9797590.post-3748654346021045634</id><published>2011-06-10T11:46:00.000-07:00</published><updated>2011-06-20T11:05:07.673-07:00</updated><title type='text'>Cross compile wget on Linux for Windows</title><content type='html'>GNU wget does not release binary on Windows, and it is not very straight-forward to compile for Windows, but it works great on Windows. I just compiled wget 1.12 for Windows. Please &lt;a href="http://www.advistatech.com/software/wget-1.12.exe"&gt;DOWNLOAD IT HERE&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I did this on Debian 5.0, and I have the following mingw package installed (not https supported, shouldn't be hard to add if you want to compile the openssl):&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;dpkg -l | grep -i mingw&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;ii &amp;nbsp;mingw32 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4.2.1.dfsg-1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Minimalist GNU win32 (cross) compiler&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;ii &amp;nbsp;mingw32-binutils &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2.18.50-20080109-1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Minimalist GNU win32 (cross) binutils&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;ii &amp;nbsp;mingw32-runtime &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3.13-1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Minimalist GNU win32 (cross) runtime&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This is how to compile wget for Windows on a Linux host using the MingW32 for Linux tool chain&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;1. download the gnu wget source at&amp;nbsp;&lt;a href="http://www.gnu.org/software/wget/"&gt;http://www.gnu.org/software/wget/&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;2. tar zxvf wget-1.12.tgz;&amp;nbsp;&amp;nbsp;cd wget-1.12;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;3.&amp;nbsp;./configure CC=i586-mingw32msvc-gcc AR=i586-mingw32msvc-ar RANLIB=i586-mingw32msvc-ranlib&amp;nbsp;--disable-ipv6 --host=mingw32&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;4. change "src/config.h" to add&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;#define WINDOWS 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;#define INHIBIT_WRAP 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;and comment out these two lines:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//#define HAVE_SYMLINK 1&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//#define&amp;nbsp;HAVE_USLEEP 1&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;4.1 comment out "src/host.c" line 67&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//extern int h_errno;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;5. vi src/Makefile, add "mswindows.o" to the end of the "am_wget_OBJECTS" assignment&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;6. search for "LIBS =", and append "-l ws2_32 -s"&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;7. Make&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;The wget.exe file is located in src/wget.exe&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;Enjoy!&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-3748654346021045634?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/3748654346021045634/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/06/cross-compile-wget-on-linux-for-windows.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/3748654346021045634'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/3748654346021045634'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/06/cross-compile-wget-on-linux-for-windows.html' title='Cross compile wget on Linux for Windows'/><author><name>Tiebing</name><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>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9797590.post-159294035533975734</id><published>2011-06-08T16:46:00.001-07:00</published><updated>2011-06-08T16:46:48.434-07:00</updated><title type='text'>vsftpd config file</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;anonymous_enable=YES&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;listen_port=34567&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;anon_root=/tmp/ftproot&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;run_as_launching_user=YES&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;pasv_promiscuous=YES&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;write_enable=YES&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;local_umask=022&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;anon_upload_enable=YES&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;dirmessage_enable=YES&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;xferlog_enable=NO&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;connect_from_port_20=YES&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;listen=YES&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-159294035533975734?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/159294035533975734/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/06/vsftpd-config-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/159294035533975734'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/159294035533975734'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/06/vsftpd-config-file.html' title='vsftpd config file'/><author><name>Tiebing</name><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-9797590.post-7864289335044292573</id><published>2011-06-07T18:00:00.000-07:00</published><updated>2011-06-07T18:00:45.918-07:00</updated><title type='text'>persistent ssh tunnel</title><content type='html'>&lt;h1&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://nemesis2.qx.net/pages/MyEnTunnel"&gt;MyEnTunnel&lt;/a&gt;&lt;/span&gt;&lt;/h1&gt;&lt;h1&gt;&lt;span style="font-size: small;"&gt;Work really well. It retries to connect after the ssh session is disconnected.&lt;/span&gt; &lt;/h1&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-7864289335044292573?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/7864289335044292573/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/06/persistent-ssh-tunnel.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/7864289335044292573'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/7864289335044292573'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/06/persistent-ssh-tunnel.html' title='persistent ssh tunnel'/><author><name>Tiebing</name><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-9797590.post-893311987067233679</id><published>2011-06-03T09:58:00.000-07:00</published><updated>2011-06-03T09:58:03.013-07:00</updated><title type='text'>A good blog about using Windows CE platform builder</title><content type='html'>&lt;a href="http://geekswithblogs.net/BruceEitman/archive/2008/06/06/platform-builder-summary-of-building-windows-ce.aspx"&gt;http://geekswithblogs.net/BruceEitman/archive/2008/06/06/platform-builder-summary-of-building-windows-ce.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1 class="post-title"&gt;&lt;a href="http://geekswithblogs.net/BruceEitman/archive/2008/06/06/platform-builder-summary-of-building-windows-ce.aspx" id="viewpost_ascx_TitleUrl" title="Title of this entry."&gt;Platform Builder: Summary of Building Windows CE&lt;/a&gt;&lt;/h1&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-893311987067233679?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/893311987067233679/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/06/good-blog-about-using-windows-ce.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/893311987067233679'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/893311987067233679'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/06/good-blog-about-using-windows-ce.html' title='A good blog about using Windows CE platform builder'/><author><name>Tiebing</name><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-9797590.post-1916056055030653405</id><published>2011-06-02T13:27:00.000-07:00</published><updated>2011-06-02T13:29:31.569-07:00</updated><title type='text'>Windows CE static IP registry setting</title><content type='html'>&lt;blockquote&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: xx-small;"&gt;; Enable static IP address for &lt;span style="font-weight: bold;"&gt;VMINI1&lt;/span&gt;&lt;br /&gt;[HKEY_LOCAL_MACHINE\Comm\&lt;span style="font-weight: bold;"&gt;VMINI1&lt;/span&gt;\Parms\Tcpip]&lt;br /&gt;"EnableDHCP"=dword:0   ; Disable the DHCP/ enable static IP&lt;br /&gt;"IPAddress"="192.168.1.3"&lt;br /&gt;"SubnetMask"="255.255.255.0"&lt;/span&gt;&lt;/blockquote&gt;&lt;span style="font-style: italic;"&gt;Note : VMINI1 is the correct key path to point to the registry settings used by this driver.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;VMINI is the adapter name&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;source: &lt;a href="http://nicolasbesson.blogspot.com/2007/11/static-ip-address-for-kitl-vmini.html"&gt;http://nicolasbesson.blogspot.com/2007/11/static-ip-address-for-kitl-vmini.html &lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt; &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-1916056055030653405?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/1916056055030653405/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/06/windows-ce-static-ip-registry-setting.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/1916056055030653405'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/1916056055030653405'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/06/windows-ce-static-ip-registry-setting.html' title='Windows CE static IP registry setting'/><author><name>Tiebing</name><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-9797590.post-2639924489534005950</id><published>2011-05-31T16:23:00.000-07:00</published><updated>2011-05-31T16:23:20.915-07:00</updated><title type='text'>hostapd madwifi in ap mode</title><content type='html'>&lt;div class="comment"&gt;If you are using hostapd, and hostpad is showing the following error:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: xx-small;"&gt;ioctl[IEEE80211_IOCTL_DELKEY]: Invalid argument&lt;br /&gt;ioctl[IEEE80211_IOCTL_SETMLME]: Invalid argument&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Try to add : &lt;br /&gt;&lt;pre class="wiki"&gt;wme_enabled=0&lt;br /&gt;&lt;/pre&gt;in hostapd.conf&lt;br /&gt;&lt;br /&gt;This is documented in &lt;a href="http://madwifi-project.org/ticket/1561"&gt;http://madwifi-project.org/ticket/1561&lt;/a&gt; and it worked for me. &lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-2639924489534005950?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/2639924489534005950/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/05/hostapd-madwifi-in-ap-mode.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/2639924489534005950'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/2639924489534005950'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/05/hostapd-madwifi-in-ap-mode.html' title='hostapd madwifi in ap mode'/><author><name>Tiebing</name><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-9797590.post-6709304156478150060</id><published>2011-05-25T15:11:00.000-07:00</published><updated>2011-05-25T15:46:42.172-07:00</updated><title type='text'>udp port forward</title><content type='html'>------&lt;br /&gt;Option 1: user-application based udp port forwarding &lt;br /&gt;&lt;br /&gt;Ivan Tikhonov wrote a simple udp_redirect.c program to do just this. I like it.&lt;br /&gt;&lt;br /&gt;The link: &lt;a href="http://brokestream.com/udp_redirect.html"&gt;http://brokestream.com/udp_redirect.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;-------------&lt;br /&gt;&lt;br /&gt;Option 2 is to use iptables.&lt;br /&gt;&lt;br /&gt;You will need to set the middle computer (Linux) to&lt;br /&gt;1. NAT&lt;br /&gt;2. port forward to the local computer&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;iptables -t nat -A POSTROUTING -j MASQUERADE -o eth0&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;iptables -t nat -A PREROUTING -p udp -i eth0 --dport 161&amp;nbsp; -j DNAT --to 192.168.1.10&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Then set the local computer's default gateway to the middle computer:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;route add default gw 192.168.1.100&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;------------&lt;br /&gt;If you are looking for TCP port forwarding, I use and recommend the open source program &lt;b&gt;rinetd&lt;/b&gt;. It works on both Windows and Linux, and supports multiple TCP connections, and is very stable. The link: &lt;a href="http://www.boutell.com/rinetd/"&gt;http://www.boutell.com/rinetd/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-6709304156478150060?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/6709304156478150060/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/05/udp-port-forward.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/6709304156478150060'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/6709304156478150060'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/05/udp-port-forward.html' title='udp port forward'/><author><name>Tiebing</name><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-9797590.post-2013390103536094322</id><published>2011-05-25T12:43:00.001-07:00</published><updated>2011-05-25T12:43:26.188-07:00</updated><title type='text'>php internal server error</title><content type='html'>&lt;code&gt;&lt;span class="html"&gt;If you just see a blank page instead of an  error reporting and you have no server access so you can't edit php  configuration files like php.ini try this:&lt;br /&gt;&lt;br /&gt;- create a new file in which you include the faulty script:&lt;br /&gt;&lt;br /&gt;&lt;span class="default"&gt;&amp;lt;?php&lt;br /&gt;&amp;nbsp;error_reporting&lt;/span&gt;&lt;span class="keyword"&gt;(&lt;/span&gt;&lt;span class="default"&gt;E_ALL&lt;/span&gt;&lt;span class="keyword"&gt;);&lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="default"&gt;ini_set&lt;/span&gt;&lt;span class="keyword"&gt;(&lt;/span&gt;&lt;span class="string"&gt;"display_errors"&lt;/span&gt;&lt;span class="keyword"&gt;, &lt;/span&gt;&lt;span class="default"&gt;1&lt;/span&gt;&lt;span class="keyword"&gt;);&lt;br /&gt;&amp;nbsp;include(&lt;/span&gt;&lt;span class="string"&gt;"file_with_errors.php"&lt;/span&gt;&lt;span class="keyword"&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span class="default"&gt;?&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;- execute this file instead of the faulty script file &lt;br /&gt;&lt;br /&gt;now errors of your faulty script should be reported.&lt;br /&gt;this works fine with me. hope it solves your problem as well!&lt;/span&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-2013390103536094322?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/2013390103536094322/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/05/php-internal-server-error.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/2013390103536094322'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/2013390103536094322'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/05/php-internal-server-error.html' title='php internal server error'/><author><name>Tiebing</name><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-9797590.post-3234393953443541417</id><published>2011-05-20T14:07:00.000-07:00</published><updated>2011-07-27T14:36:08.900-07:00</updated><title type='text'>Ubuntu Host, Windows 7 Guest, Raw disk, Virtual Box</title><content type='html'>&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;Command in Ubuntu to create the win7 virtual machine using the raw disk Windows 7 partition that comes with the Dell computer.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt; &lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt; &lt;b&gt;This is tested on Virtual Box 4.0.4&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;Make sure you run everything as root&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;Make sure you use "IDE controller" type ICH6, otherwise the win7 will blue screen (BSOD)&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;This is based on the following blogs:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;a href="http://www.rajatarya.com/website/taming-windows-virtualbox-vm"&gt;http://www.rajatarya.com/website/taming-windows-virtualbox-vm&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;a href="http://www.researchut.com/site/virtualbox-native-partition"&gt;http://www.researchut.com/site/virtualbox-native-partition&lt;/a&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;First install Virtualbox. I found it easier to install it using the "all platform" exectuable. Make sure you also download and install the Oracle Extension Package, which is installed using this command:&lt;br /&gt;&amp;nbsp;&lt;span class="Apple-style-span" style="font-family: monospace;"&gt;VBoxManage           extpack install Extention_file_name&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: monospace;"&gt;Then do the following commands: make sure you are root, and you are at "/root".&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;----------------&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;VBoxManage createvm --name win7 --ostype Windows7_64 --register&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;VBoxManage modifyvm "win7" --memory 1024 --acpi on --boot1 disk --nic1 nat&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;VBoxManage storagectl "win7" --name "IDE Controller"&amp;nbsp;&amp;nbsp; --add ide --controller ICH6&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;VBoxManage internalcommands createrawvmdk -filename /root/win7.vmdk -rawdisk /dev/sda -partitions 1,2,3 -mbr /root/vm.mbr -relative&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;VBoxManage storageattach win7 --storagectl "IDE Controller"&amp;nbsp; --port 0 --device 0 --type hdd --medium /root/win7.vmdk&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: xx-small;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: xx-small;"&gt;&lt;b&gt;------&lt;/b&gt; Other useful commands------------&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: xx-small;"&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;vboxmanage unregistervm win7 --delete&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;VBoxManage storageattach win7 --storagectl "IDE Controller"&amp;nbsp; --port 0 --device 1 --type dvddrive --medium "/root/Windows 7 64-bit Repair Disc.iso"&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;VBoxManage storageattach win7 --storagectl "IDE Controller"&amp;nbsp; --port 0 --device 1 --type dvddrive --medium /opt/VirtualBox/additions/VBoxGuestAdditions.iso&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: xx-small;"&gt;vboxmanage controlvm win7 reset&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: xx-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: xx-small;"&gt;----If you still cannot boot your Windows 7, try to use the Windows 7 Rescue image to fix it. Use the above "vboxmanage" command to attach the repair disk ISO file and hit F12 when vbox boots to boot from CD, let it fixes it and then boot to regular Win7&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-3234393953443541417?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/3234393953443541417/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/05/ubuntu-host-windows-7-guest-raw-disk.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/3234393953443541417'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/3234393953443541417'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/05/ubuntu-host-windows-7-guest-raw-disk.html' title='Ubuntu Host, Windows 7 Guest, Raw disk, Virtual Box'/><author><name>Tiebing</name><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-9797590.post-6444085609194728473</id><published>2011-05-19T14:51:00.001-07:00</published><updated>2011-05-19T14:51:48.940-07:00</updated><title type='text'>boot Windows in Virtualbox</title><content type='html'>Use Xmount + Opengates, for MAC users, use openjobs&lt;br /&gt;&lt;br /&gt;&lt;a href="https://www.pinguin.lu/index.php"&gt;https://www.pinguin.lu/index.php&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-6444085609194728473?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/6444085609194728473/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/05/boot-windows-in-virtualbox.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/6444085609194728473'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/6444085609194728473'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/05/boot-windows-in-virtualbox.html' title='boot Windows in Virtualbox'/><author><name>Tiebing</name><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-9797590.post-4830238471877096690</id><published>2011-05-18T18:27:00.000-07:00</published><updated>2011-05-18T18:27:12.048-07:00</updated><title type='text'>Headless Virtualbox on Ubuntu 10.04 LTS</title><content type='html'>&lt;a href="http://tuxnetworks.blogspot.com/2010/05/howto-virtualbox-31-headless-on-lucid.html"&gt;http://tuxnetworks.blogspot.com/2010/05/howto-virtualbox-31-headless-on-lucid.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;That's it, Virtualbox should be installed and ready to go.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Now we can move on to creating a virtual machine&lt;/span&gt;&lt;br /&gt;Create a machine named "io"&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;pre&gt;VBoxManage createvm -name io --ostype Ubuntu -register&lt;/pre&gt;&lt;br /&gt;Configure it with a nic bridged to eth0, 256Mb RAM, enable acpi and set to boot from DVD&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;pre&gt;VBoxManage modifyvm io --memory 256 --pae on --acpi on --boot1 dvd --nic1 bridged --bridgeadapter1 eth0&lt;/pre&gt;&lt;br /&gt;Create a virtual IDE controller&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;pre&gt;VBoxManage storagectl io --name IDE0 --add ide&lt;/pre&gt;&lt;br /&gt;Create a virtual HDD&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;pre&gt;VBoxManage createvdi -filename ~/.VirtualBox/Machines/io/sda.vdi -size 48000 -register&lt;/pre&gt;&lt;br /&gt;Attach the virtual HDD&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;pre&gt;VBoxManage storageattach io --storagectl IDE0 --port 0 --device 0 --type hdd --medium ~/.VirtualBox/Machines/io/sda.vdi&lt;/pre&gt;&lt;br /&gt;Create and attach a virtual DVD drive to the controller and insert the DVD image &lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;pre&gt;VBoxManage storageattach io --storagectl IDE0 --port 1 --device 0 --type dvddrive --medium /store/archive/ISO/ubuntu-10.04-server-i386.iso&lt;/pre&gt;&lt;br /&gt;The  default vrdp port for machines is 3389, however, if you intend to run  more than one guest then each one will need to listen on a different  port. I use the 3xxx range with the xxx being the last octet of the  machines IP address. For example, 192.168.0.1 would be 3001.&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;pre&gt;VBoxManage modifyvm io --vrdpport 3001&lt;/pre&gt;&lt;br /&gt;And thats it, your machine has been created. Time to start it up and give it a test drive!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Using the virtual machine&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Start the machine&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;pre&gt;nohup VBoxHeadless -startvm io &amp;amp;&lt;/pre&gt;&lt;br /&gt;On  a GUI workstation, establish a remote desktop connection to the  machine. In my case, the host server is called "jupiter" so I type;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;pre&gt;rdesktop -a 8 jupiter:3001&lt;/pre&gt;&lt;br /&gt;After you have installed the OS, you need to tell the machine to boot from the hdd.&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;pre&gt;VBoxManage modifyvm io --boot1 disk&lt;/pre&gt;&lt;br /&gt;You can also deregister the dvd image if you don't intend to use it again.&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;pre&gt;VBoxManage unregisterimage dvd /store/archive/ISO/ubuntu-10.04-server-i386.iso&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Here are some other useful commands;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;pre&gt;VBoxManage showvminfo io&lt;br /&gt;VBoxManage list hdds&lt;br /&gt;VBoxManage list runningvms&lt;br /&gt;VBoxManage controlvm io poweroff&lt;br /&gt;VBoxManage unregistervm io --delete&lt;br /&gt;VBoxManage controlvm io savestate&lt;br /&gt;VBoxManage closemedium disk UUID&lt;br /&gt;VBoxManage modifyhd UUID --type immutable&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-4830238471877096690?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/4830238471877096690/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/05/headless-virtualbox-on-ubuntu-1004-lts.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/4830238471877096690'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/4830238471877096690'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/05/headless-virtualbox-on-ubuntu-1004-lts.html' title='Headless Virtualbox on Ubuntu 10.04 LTS'/><author><name>Tiebing</name><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-9797590.post-7206914336005937767</id><published>2011-05-17T13:26:00.000-07:00</published><updated>2011-05-17T13:26:52.968-07:00</updated><title type='text'>Linux Command Line FTP/HTTP segemented download accelartor software</title><content type='html'>&lt;ol&gt;&lt;li&gt;&lt;h3 class="entry-title"&gt;aria2c&lt;/h3&gt;&lt;/li&gt;&lt;li&gt;&lt;h3 class="entry-title"&gt;axel&lt;/h3&gt;&lt;/li&gt;&lt;li&gt;&lt;h3 class="entry-title"&gt;lftp (use the "pget" command of lftp)&lt;/h3&gt;&lt;h3 class="entry-title"&gt;&amp;nbsp;&lt;/h3&gt;&lt;h3 class="entry-title"&gt;ari2c and axel supports FTP, HTTP and HTTPS, while lftp supports more protocols such as FTPS, SFTP, etc. &lt;/h3&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/9797590-7206914336005937767?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/7206914336005937767/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/05/linux-command-line-ftphttp-segemented.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/7206914336005937767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/7206914336005937767'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/05/linux-command-line-ftphttp-segemented.html' title='Linux Command Line FTP/HTTP segemented download accelartor software'/><author><name>Tiebing</name><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-9797590.post-1783837943903780326</id><published>2011-05-16T16:03:00.000-07:00</published><updated>2011-05-16T16:03:10.106-07:00</updated><title type='text'>/etc/hosts not working?</title><content type='html'>If you have a Linux machine and your /etc/hosts is not working, make sure you have a file called&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;/etc/nsswitch.conf&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;b&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;with the following content:&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/b&gt;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;passwd:         files&lt;br /&gt;group:          files&lt;br /&gt;hosts:          files dns&lt;br /&gt;networks:       files dns&lt;br /&gt;services:       files&lt;br /&gt;protocols:      files&lt;br /&gt;netmasks:       files&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/9797590-1783837943903780326?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/1783837943903780326/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/05/etchosts-not-working.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/1783837943903780326'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/1783837943903780326'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/05/etchosts-not-working.html' title='/etc/hosts not working?'/><author><name>Tiebing</name><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-9797590.post-4798807171919273060</id><published>2011-05-13T15:25:00.001-07:00</published><updated>2011-05-16T15:00:22.584-07:00</updated><title type='text'>Windows CE 5.0 QFE download</title><content type='html'>Microsoft has moved on to Windows CE 7 (Compact 7) and revamped their download site so that all the windows CE 5.0 downloads cannot be located anymore.&lt;br /&gt;&lt;br /&gt;To patch your platform builder 5.0 to the latest, download the "rollup" files from here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.microsoft.com/windowsembedded/en-us/downloads/download-windows-embedded-ce-5.aspx"&gt;http://www.microsoft.com/windowsembedded/en-us/downloads/download-windows-embedded-ce-5.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Once you installed any QFE, you will have a application called CEQFECHECK.exe&amp;nbsp; under C:\WINDOWS\system32\ceqfecheck. This application checks which QFE you have installed and did not install. Check it out.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-4798807171919273060?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/4798807171919273060/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/05/windows-ce-50-qfe-download.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/4798807171919273060'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/4798807171919273060'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/05/windows-ce-50-qfe-download.html' title='Windows CE 5.0 QFE download'/><author><name>Tiebing</name><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-9797590.post-4924941031649042198</id><published>2011-05-05T10:03:00.000-07:00</published><updated>2011-05-05T10:03:26.893-07:00</updated><title type='text'>Linux Network Interface statistics</title><content type='html'>&lt;a href="http://stackoverflow.com/questions/596590/how-can-i-get-the-current-network-interface-throughput-statistics-on-linux-unix"&gt;http://stackoverflow.com/questions/596590/how-can-i-get-the-current-network-interface-throughput-statistics-on-linux-unix&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Tools include:&lt;br /&gt;&lt;br /&gt;1. bwm-ng&lt;br /&gt;2. iftop&lt;br /&gt;3. iptraf&lt;br /&gt;4. sar&lt;br /&gt;5. dstat&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-4924941031649042198?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/4924941031649042198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/05/linux-network-interface-statistics.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/4924941031649042198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/4924941031649042198'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/05/linux-network-interface-statistics.html' title='Linux Network Interface statistics'/><author><name>Tiebing</name><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-9797590.post-8469029613487922166</id><published>2011-04-18T18:13:00.001-07:00</published><updated>2011-04-18T18:13:34.814-07:00</updated><title type='text'>jQuery TableSorter "o is undefined" problem</title><content type='html'>If you use jQuery TableSorter and see the "o is undefined" problem, it is the probably the case that you are using "&amp;lt;td&amp;gt;" inside the &amp;lt;thead&amp;gt; section instead of &amp;lt;th&amp;gt;. Use &amp;lt;th&amp;gt; and you will be good.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-8469029613487922166?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/8469029613487922166/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/04/jquery-tablesorter-o-is-undefined.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/8469029613487922166'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/8469029613487922166'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/04/jquery-tablesorter-o-is-undefined.html' title='jQuery TableSorter &quot;o is undefined&quot; problem'/><author><name>Tiebing</name><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-9797590.post-6267081710392964826</id><published>2011-03-17T18:11:00.000-07:00</published><updated>2011-03-17T18:11:13.409-07:00</updated><title type='text'>sqlite pdo write lock problem solved</title><content type='html'>When using PHP and PDO to access an sqlite dababase, and when you do a "select *" using the $handle-&amp;gt;query($sqlcmd), you must use "foreach" to read all the select results before you can issue the next "query" or "exec" call. Otherwise, the database will be locked.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-6267081710392964826?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/6267081710392964826/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/03/sqlite-pdo-write-lock-problem-solved.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/6267081710392964826'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/6267081710392964826'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/03/sqlite-pdo-write-lock-problem-solved.html' title='sqlite pdo write lock problem solved'/><author><name>Tiebing</name><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-9797590.post-2888033278351052935</id><published>2011-03-04T11:23:00.003-08:00</published><updated>2011-03-04T11:23:28.810-08:00</updated><title type='text'>Win32 applications GUI vs Console</title><content type='html'>&lt;a href="http://comsci.liu.edu/%7Emurali/win32gui/Win32Apps.htm"&gt;This web page&lt;/a&gt; explains well the difference between a WIN32 GUI app vs. Console app.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-2888033278351052935?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/2888033278351052935/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/03/win32-applications-gui-vs-console.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/2888033278351052935'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/2888033278351052935'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/03/win32-applications-gui-vs-console.html' title='Win32 applications GUI vs Console'/><author><name>Tiebing</name><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-9797590.post-1397950144928893839</id><published>2011-03-03T13:54:00.000-08:00</published><updated>2011-03-03T13:54:38.353-08:00</updated><title type='text'>php header redirect IE issue</title><content type='html'>In web development, a HTTP POST is often processed on the server ending with a header("Location:page.php") call, so that user can refresh their page without re-posting. This usually works well.&lt;br /&gt;&lt;br /&gt;The only issue is IE. After posting or file upload, using the PHP header() call won't work with IE, although it works with Firefox. You will have to use the HTML direct instead.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-1397950144928893839?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/1397950144928893839/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/03/php-header-redirect-ie-issue.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/1397950144928893839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/1397950144928893839'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/03/php-header-redirect-ie-issue.html' title='php header redirect IE issue'/><author><name>Tiebing</name><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-9797590.post-2100303188472910562</id><published>2011-02-09T18:05:00.000-08:00</published><updated>2011-02-09T18:05:49.887-08:00</updated><title type='text'>Windows CE ssh server and client</title><content type='html'>Windows CE development is not as fun as Linux because of the lack of open source tools. However, once I am able to make ssh server and client running on it, it becomes better. Here is how to get ssh server and client running on windows CE 5 (ARM based):&lt;br /&gt;&lt;br /&gt;1. Download CESSH at &lt;a href="http://www.codeplex.com/wikipage?projectname=CESSH"&gt;http://www.codeplex.com/wikipage?projectname=CESSH&lt;/a&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Download sshd_config at &lt;a href="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=CESSH&amp;amp;DownloadId=3561"&gt;http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=CESSH&amp;amp;DownloadId=3561&lt;/a&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Download file &lt;a href="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=CESSH&amp;amp;DownloadId=3562"&gt;http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=CESSH&amp;amp;DownloadId=3562&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2. copy the files to your windows CE device, suppose "\ssh"&lt;br /&gt;3. mkdir "\Hard Disk"&lt;br /&gt;4. copy sshd_config "\Hard Disk"&lt;br /&gt;5. mkdir "\NandFlash"&lt;br /&gt;6. mkdir "\NandFlash\ssh"&lt;br /&gt;7. copy ssh_host_dsa_key to "\NandFlash\ssh"&lt;br /&gt;8.&amp;nbsp; run "adduser.exe root rootpass" to add the user "root" with password "rootpass"&lt;br /&gt;9. copy SocketToFile.DLL to \windows&lt;br /&gt;10. run "sshd.exe"&amp;nbsp; &lt;br /&gt;&lt;br /&gt;To test it, get pocketputty&lt;br /&gt;&amp;nbsp;(&lt;a href="http://www.pocketputty.net/download.html"&gt;http://www.pocketputty.net/download.html&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If make this work over ActiveSync, use the remote port tunnel in putty.&lt;br /&gt;&lt;br /&gt;Another great tool to have is netcat for CE: &lt;a href="http://www.dr-bischoff.de/wince/Andreas_WINCE_stuff.html#netcat"&gt;http://www.dr-bischoff.de/wince/Andreas_WINCE_stuff.html#netcat&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Hope this helps.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-2100303188472910562?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/2100303188472910562/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/02/windows-ce-ssh-server-and-client.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/2100303188472910562'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/2100303188472910562'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/02/windows-ce-ssh-server-and-client.html' title='Windows CE ssh server and client'/><author><name>Tiebing</name><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-9797590.post-1846573506608988936</id><published>2011-02-04T07:02:00.000-08:00</published><updated>2011-02-04T07:03:47.151-08:00</updated><title type='text'>Slick board and XML/SWF charts</title><content type='html'>&lt;a href="http://www.maani.us/slickboard/"&gt;SlickBoard&lt;/a&gt; and &lt;a href="http://www.maani.us/xml_charts/index.php"&gt;XML/SWF&lt;/a&gt; charts seem like very great products. Let me know if you have used it.&lt;br /&gt;&lt;br /&gt;And also the google visualization tools which give you access to google finance like charts &lt;a href="http://www.blogger.com/%28http://code.google.com/apis/visualization/documentation/gallery/annotatedtimeline.html%29"&gt;(http://code.google.com/apis/visualization/documentation/gallery/annotatedtimeline.html)&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-1846573506608988936?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/1846573506608988936/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/02/slick-board-and-xmlswf-charts.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/1846573506608988936'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/1846573506608988936'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/02/slick-board-and-xmlswf-charts.html' title='Slick board and XML/SWF charts'/><author><name>Tiebing</name><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-9797590.post-2903585999452722602</id><published>2011-01-28T06:48:00.001-08:00</published><updated>2011-01-28T06:49:42.962-08:00</updated><title type='text'>Free php web stat analyzer</title><content type='html'>1. &lt;a href="http://www.tracewatch.com/"&gt;TraceWatch&lt;/a&gt;&lt;br /&gt;2. &lt;a href="http://www.bbclone.de/"&gt;BBClone&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Both GPL and Free.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-2903585999452722602?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/2903585999452722602/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/01/free-php-web-stat-analyzer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/2903585999452722602'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/2903585999452722602'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/01/free-php-web-stat-analyzer.html' title='Free php web stat analyzer'/><author><name>Tiebing</name><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-9797590.post-8241559525799474820</id><published>2011-01-27T17:36:00.000-08:00</published><updated>2011-01-27T17:36:33.262-08:00</updated><title type='text'>git, cgit and mini_httpd</title><content type='html'>&amp;nbsp;git allows very easy local installation. We need a easy way to view the local git repository. mini_httpd is a great local web server to use, and git web app can either be "gitweb" or "cgit".&lt;br /&gt;&lt;br /&gt;I tried "gitweb" but couldn't get it to see my projects. But I got "cgit" to work well. Here is how:&lt;br /&gt;&lt;br /&gt;1. download and compile cgit. very simple, just follow the README file.&lt;br /&gt;2. change cgit Makefile, "CGIT_CONFIG = /yourpath/cgitrc", then "touch cgit.c" and "make" again. We do this because by default cgitrc is located at /etc/ and we want it local.&lt;br /&gt;3. Create your cgitrc file from the example file. I use something like this:&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;pre&gt;cache-size=0&lt;br /&gt;css=/cgit.css&lt;br /&gt;enable-index-links=1&lt;br /&gt;enable-log-filecount=1&lt;br /&gt;enable-log-linecount=1&lt;br /&gt;max-stats=quarter&lt;br /&gt;root-title=My git repository&lt;br /&gt;root-desc=Tracking my project development&lt;br /&gt;root-readme=about.html&lt;br /&gt;snapshots=tar.gz&lt;br /&gt;mimetype.git=image/git&lt;br /&gt;mimetype.html=text/html&lt;br /&gt;mimetype.jpg=image/jpeg&lt;br /&gt;mimetype.jpeg=image/jpeg&lt;br /&gt;mimetype.pdf=application/pdf&lt;br /&gt;mimetype.png=image/png&lt;br /&gt;mimetype.svg=image/svg+xml&lt;br /&gt;repo.url=linux&lt;br /&gt;repo.path=/opt/gittest/.git&lt;br /&gt;repo.desc=My project&lt;br /&gt;repo.owner=me@me.com&lt;br /&gt;repo.readme=info/web/about.html&lt;br /&gt;repo.snapshots=tar.gz&lt;br /&gt;repo.enable-log-linecount=0&lt;br /&gt;repo.max-stats=month&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;4. start minihttpd and your are in business. :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-8241559525799474820?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/8241559525799474820/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/01/git-cgit-and-minihttpd.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/8241559525799474820'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/8241559525799474820'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/01/git-cgit-and-minihttpd.html' title='git, cgit and mini_httpd'/><author><name>Tiebing</name><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-9797590.post-795495933116138539</id><published>2011-01-26T15:36:00.001-08:00</published><updated>2011-01-26T15:36:36.943-08:00</updated><title type='text'>Vim non greedy regular expression search</title><content type='html'>&lt;pre&gt;* (0 or more) greedy matching&lt;br /&gt;\+ (1 or more) greedy matching&lt;br /&gt;\{-} (0 or more) non-greedy matching&lt;br /&gt;\{-n,} (at least n) non-greedy matching&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;a href="http://blog.vinceliu.com/2008/02/non-greedy-regular-expression-matching.html"&gt;http://blog.vinceliu.com/2008/02/non-greedy-regular-expression-matching.html&lt;/a&gt; &lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-795495933116138539?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/795495933116138539/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/01/vim-non-greedy-regular-expression.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/795495933116138539'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/795495933116138539'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/01/vim-non-greedy-regular-expression.html' title='Vim non greedy regular expression search'/><author><name>Tiebing</name><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-9797590.post-7767217745774605341</id><published>2011-01-26T12:09:00.000-08:00</published><updated>2011-01-26T12:09:03.838-08:00</updated><title type='text'>CSS Positioning explained</title><content type='html'>&lt;a href="http://www.barelyfitz.com/screencast/html-training/css/positioning/"&gt;http://www.barelyfitz.com/screencast/html-training/css/positioning/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Simple truth:&lt;br /&gt;&lt;br /&gt;1. Use positon:relative in the outer box and then positoin:absolute in the inner box. This is very effective.&lt;br /&gt;&lt;br /&gt;2. When using position:absolute with background image, make sure you explicitly specify "width" and "height", otherwise it won't work.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-7767217745774605341?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/7767217745774605341/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/01/css-positioning-explained.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/7767217745774605341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/7767217745774605341'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/01/css-positioning-explained.html' title='CSS Positioning explained'/><author><name>Tiebing</name><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-9797590.post-1064841798530419239</id><published>2011-01-26T09:29:00.000-08:00</published><updated>2011-01-26T09:29:07.449-08:00</updated><title type='text'>CSS and box shadow (blurred shadow)</title><content type='html'>All major browsers except IE (IE9 may support it) supports the CSS3 box shadow. So you need the javascript to do some tricks for IE. Here is the link. &lt;a href="http://www.hintzmann.dk/testcenter/js/jquery/boxshadow/"&gt;http://www.hintzmann.dk/testcenter/js/jquery/boxshadow/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-1064841798530419239?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/1064841798530419239/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/01/css-and-box-shadow-blurred-shadow.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/1064841798530419239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/1064841798530419239'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/01/css-and-box-shadow-blurred-shadow.html' title='CSS and box shadow (blurred shadow)'/><author><name>Tiebing</name><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-9797590.post-8200211383566335704</id><published>2011-01-24T16:28:00.000-08:00</published><updated>2011-01-24T16:29:44.929-08:00</updated><title type='text'>Use Linux to control power outlet via USB</title><content type='html'>Much of information on this page is based the &lt;a href="http://www.gniibe.org/ac-power-by-usb/ac-power-control.html"&gt;web page at here &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;1. buy EcoStrip , and Linksys USB2HUB4 USB 2.0 hub. This hub supports power control. Internally it uses NEC chipset.&lt;br /&gt;&lt;br /&gt;2.&lt;a href="http://www.gniibe.org/software/hub-ctrl.c"&gt; Download hub-ctrl.c&lt;/a&gt;, OR &lt;a href="http://www.advistatech.com/software/hub-ctrl-20060120.c"&gt;download it at this site&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;3. Use lsusb utilities with -v option, you can inspect 'Hub Descriptor', such like: &lt;br /&gt;&lt;pre&gt;Hub Descriptor:&lt;br /&gt;   [...]&lt;br /&gt;     wHubCharacteristic 0x0089&lt;br /&gt;       Per-port power switching&lt;br /&gt;       Per-port overcurrent protection&lt;br /&gt;       Port indicators&lt;br /&gt;   [...]&lt;/pre&gt;&lt;br /&gt;4.compile hub-ctrl.c with -lusb (you need to install libusb-dev if you don't have it)&lt;br /&gt;&lt;br /&gt;5. run "sudo ./hub-ctrl" to list the possible hub that supports power control&lt;br /&gt;&lt;pre&gt;Bus 002 Device 003: ID 0409:0058 NEC Corp. HighSpeed Hub&lt;br /&gt;Bus 002 Device 002: ID 8087:0020&lt;br /&gt;Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub&lt;br /&gt;Bus 001 Device 002: ID 8087:0020&lt;br /&gt;Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;6.From above, you can see that my Linksys hub is located at Bus 2 Device 3. So I use the following command to turn the ecoStrip (which is plugged into the Linksys Hub port 1) power off:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;sudo ./hub-ctrl -b 2 -d 3 -P 1&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;And the following command to turn it on&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;sudo ./hub-ctrl -b 2 -d 3 -P 1 -p 1&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/9797590-8200211383566335704?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/8200211383566335704/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/01/use-linux-to-control-outlet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/8200211383566335704'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/8200211383566335704'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/01/use-linux-to-control-outlet.html' title='Use Linux to control power outlet via USB'/><author><name>Tiebing</name><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-9797590.post-4242635681749777948</id><published>2011-01-21T06:53:00.001-08:00</published><updated>2011-01-21T06:53:49.467-08:00</updated><title type='text'>transfer or populate sqlite table to another table</title><content type='html'>INSERT INTO TABLE2 (COL1, COL2, COL3) SELECT COL1, COL4, COL7 FROM TABLE1&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-4242635681749777948?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/4242635681749777948/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/01/transfer-or-populate-sqlite-table-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/4242635681749777948'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/4242635681749777948'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/01/transfer-or-populate-sqlite-table-to.html' title='transfer or populate sqlite table to another table'/><author><name>Tiebing</name><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-9797590.post-7699408552958514099</id><published>2011-01-19T17:25:00.000-08:00</published><updated>2011-01-19T17:25:05.187-08:00</updated><title type='text'>Use PHP to receive email</title><content type='html'>I use "sendmail". Other MTA should be similar.&lt;br /&gt;&lt;br /&gt;1. Supposed you want php to receive emails destined to "support@example.com". Go to /etc/aliases and add a line:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; support: "|/usr/local/bin/getemail.php"&lt;br /&gt;&lt;br /&gt;2. restart sendmail&lt;br /&gt;3. go to /etc/smrsh, and create two symbolic link files:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;ln -s /usr/bin/php php&lt;br /&gt;&amp;nbsp;ln -s /usr/local/bin/getemail.php getemail.php&lt;br /&gt;&lt;br /&gt;These symbolic links basically tells sendmail you know these programs are safe for it to run&lt;br /&gt;&lt;br /&gt;4. create your php script. A simple php script looks like this. Of course you should add your logic to it.&lt;br /&gt;&lt;code&gt;&lt;pre&gt;$fd = fopen("php://stdin", "r");&lt;br /&gt;$email = "";&lt;br /&gt;while (!feof($fd)) {&lt;br /&gt;         $email .= fread($fd, 1024);&lt;br /&gt;}&lt;br /&gt;fclose($fd);&lt;br /&gt;&lt;br /&gt;file_put_contents("/tmp/email.txt",$email);&lt;br /&gt;die();&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-7699408552958514099?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/7699408552958514099/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/01/use-php-to-receive-email.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/7699408552958514099'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/7699408552958514099'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/01/use-php-to-receive-email.html' title='Use PHP to receive email'/><author><name>Tiebing</name><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-9797590.post-5868348849640518712</id><published>2011-01-18T15:12:00.000-08:00</published><updated>2011-01-18T15:12:52.474-08:00</updated><title type='text'>See which file is preventing you from mount read-only</title><content type='html'>&lt;div style="font-family: Verdana,sans-serif;"&gt;In embedded systems, you can make your entire root file system read only (therefore preventing flash corruption) by doing:&lt;/div&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;mount -o remount,ro /&lt;/span&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Helvetica Neue&amp;quot;,Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;But sometimes this fails, because some files are being open as "writable". We need to find a way to identify these processes. lsof comes to rescue.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;lsof +D / | awk $4~/w$/{print}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;This commands list all open files recursively then uses an one-line awk script to find the lines that have files open for write.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;lsof is a really good friend. :-)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-5868348849640518712?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/5868348849640518712/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/01/see-which-file-is-preventing-you-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/5868348849640518712'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/5868348849640518712'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/01/see-which-file-is-preventing-you-from.html' title='See which file is preventing you from mount read-only'/><author><name>Tiebing</name><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-9797590.post-3823975824230355390</id><published>2011-01-11T07:35:00.000-08:00</published><updated>2011-01-13T14:35:15.813-08:00</updated><title type='text'>PHP PDF import and modification</title><content type='html'>There is a php library that allows importing a page from an existing PDF file, and then write data/graph on top of it. This essentially allows one to modify a pdf file.&lt;br /&gt;&lt;br /&gt;The library is called &lt;a href="http://www.setasign.de/products/pdf-php-solutions/fpdi/about/"&gt;FPDI (http://www.setasign.de/products/pdf-php-solutions/fpdi/about/)&lt;/a&gt;. It uses the basic PDF library FPDF, or TCPDF (which is a fork of FPDF).&lt;br /&gt;&lt;br /&gt;Seems useful. haven't tried it yet.&lt;br /&gt;&lt;br /&gt;More: tried it yesterday and it works beautifully!! Use GSview32 to find the exact x/y of the place where you want to insert text/graph.&lt;br /&gt;&lt;br /&gt;Another gem found.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-3823975824230355390?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/3823975824230355390/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/01/php-pdf-import-and-modification.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/3823975824230355390'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/3823975824230355390'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/01/php-pdf-import-and-modification.html' title='PHP PDF import and modification'/><author><name>Tiebing</name><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-9797590.post-4516277794730820385</id><published>2011-01-10T07:20:00.001-08:00</published><updated>2011-01-10T07:20:46.709-08:00</updated><title type='text'>https, TLS, SSL and multiple hosts</title><content type='html'>http://en.wikipedia.org/wiki/Server_Name_Indication&lt;br /&gt;&lt;br /&gt;Unfortunately Windows XP with IE does not support this.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-4516277794730820385?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/4516277794730820385/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/01/https-tls-ssl-and-multiple-hosts.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/4516277794730820385'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/4516277794730820385'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/01/https-tls-ssl-and-multiple-hosts.html' title='https, TLS, SSL and multiple hosts'/><author><name>Tiebing</name><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-9797590.post-8330041225701408048</id><published>2011-01-05T15:00:00.000-08:00</published><updated>2011-01-05T15:00:46.348-08:00</updated><title type='text'>best free screencast software</title><content type='html'>This is on Windows.&lt;br /&gt;&lt;br /&gt;It looks like BB Flashback Express (free) may be the best. &lt;a href="http://www.lacodecamp.com/FAQ/Speakers/RecordYourSession/WhyBlueberry/tabid/270/Default.aspx"&gt;Here is why one organization chooses to use it. &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;ActivePresenter Free Edition looks good too. Any one has experiences on using it?&lt;br /&gt;&lt;br /&gt;Any other free screencast software you recommend? I've tried Camstudio, but I am still looking. :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-8330041225701408048?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/8330041225701408048/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2011/01/best-free-screencast-software.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/8330041225701408048'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/8330041225701408048'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2011/01/best-free-screencast-software.html' title='best free screencast software'/><author><name>Tiebing</name><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-9797590.post-4391026814031438451</id><published>2010-12-28T09:49:00.000-08:00</published><updated>2010-12-28T09:54:08.461-08:00</updated><title type='text'>Use sqlite3 with codeigniter</title><content type='html'>Codeigniter is a small, fast, and well-documented web framework. However, currently (as of version 1.7.3), only sqlite2 is supported. I made codeigniter 1.7.3 work with sqlite3, including the scaffolding feature, which I really like.&lt;br /&gt;&lt;br /&gt;Here is how to make codeigniter 1.7.3 work with sqlite3:&lt;br /&gt;&lt;br /&gt;1. Download the php-based sqlite3 PDO driver for codeigniter. This driver is based on the driver in the &lt;a href="http://codeigniter.com/wiki/PDO_SQLite3/"&gt;codeigniter wiki&lt;/a&gt;, but fixed up so it works with v1.7.3 and with scaffolding.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.advistatech.com/software/pdo.zip"&gt;Download the sqlite3 PDO driver (based on the wiki driver 0.2)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2. Edit system/database/DB_driver.php,&amp;nbsp; around line 831, add the 4 lines below starting with '+'.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;foreach($query-&amp;gt;result_array() as $row)&lt;br /&gt;{&lt;br /&gt;if (isset($row['COLUMN_NAME']))&lt;br /&gt;{&lt;br /&gt;$retval[] = $row['COLUMN_NAME'];&lt;br /&gt;}&lt;br /&gt;+            else if ($this-&amp;gt;platform()=="pdo")&lt;br /&gt;+            {&lt;br /&gt;+                $retval[] = next($row);&lt;br /&gt;+            }&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;$retval[] = current($row);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;3. Create directory /pdo in /database/drivers and copy to this directory&lt;br /&gt;&amp;nbsp;  driver *.php files&lt;br /&gt;4. Create SQLite3 database file, and put it to any directory.&lt;br /&gt;&amp;nbsp;  My database file is [APPPATH]/db/base.db&lt;br /&gt;5. In application database config [APPPATH]/config/database.php&amp;nbsp;  set next settings:&lt;br /&gt;&lt;div class="codeblock"&gt;&lt;code&gt;&lt;span style="color: black;"&gt; &lt;span style="color: #0000bb;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="color: black;"&gt;&lt;span style="color: #0000bb;"&gt;$db[&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;'default'&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;][&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;'hostname'&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;]&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;''&lt;/span&gt;&lt;span style="color: #007700;"&gt;;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="color: black;"&gt;&lt;span style="color: #0000bb;"&gt;$db[&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;'default'&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;][&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;'username'&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;]&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;''&lt;/span&gt;&lt;span style="color: #007700;"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="color: black;"&gt;&lt;span style="color: #0000bb;"&gt;$db[&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;'default'&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;][&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;'password'&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;]&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;''&lt;/span&gt;&lt;span style="color: #007700;"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="color: black;"&gt;&lt;span style="color: #0000bb;"&gt;$db[&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;'default'&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;][&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;'database'&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;]&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;'sqlite:'&lt;/span&gt;&lt;span style="color: #007700;"&gt;.&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;APPPATH&lt;/span&gt;&lt;span style="color: #007700;"&gt;.&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;'db/base.db'&lt;/span&gt;&lt;span style="color: #007700;"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="color: black;"&gt;&lt;span style="color: #0000bb;"&gt;$db[&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;'default'&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;][&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;'dbdriver'&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;]&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;'pdo'&lt;/span&gt;&lt;span style="color: #007700;"&gt;;&amp;nbsp;&lt;/span&gt; &lt;/span&gt; &lt;/code&gt;&lt;/div&gt;&lt;br /&gt;Enjoy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-4391026814031438451?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/4391026814031438451/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2010/12/use-sqlite3-with-codeignitor.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/4391026814031438451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/4391026814031438451'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2010/12/use-sqlite3-with-codeignitor.html' title='Use sqlite3 with codeigniter'/><author><name>Tiebing</name><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-9797590.post-5894729934226446168</id><published>2010-12-27T12:19:00.001-08:00</published><updated>2010-12-27T12:19:46.802-08:00</updated><title type='text'>vimdiff ignoring white space</title><content type='html'>I had been searching for a way to ignore white spaces while using vimdiff. Unfortunately, &lt;tt&gt;vimdiff -h&lt;/tt&gt; yields the generic Vim help. I finally found that including the following line in vimrc solves the problem. &lt;br /&gt;&lt;pre&gt;set diffopt+=iwhite&lt;/pre&gt;From the command line: &lt;br /&gt;&lt;pre&gt;vimdiff -c 'set diffopt+=iwhite' ...&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-5894729934226446168?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/5894729934226446168/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2010/12/vimdiff-ignoring-white-space.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/5894729934226446168'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/5894729934226446168'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2010/12/vimdiff-ignoring-white-space.html' title='vimdiff ignoring white space'/><author><name>Tiebing</name><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-9797590.post-8326038471914716361</id><published>2010-12-22T11:31:00.001-08:00</published><updated>2010-12-22T11:31:11.247-08:00</updated><title type='text'>codeignitor removes index.php</title><content type='html'>&lt;div class="post"&gt;Ok, try &lt;br /&gt;&lt;div class="codeblock"&gt;&lt;code&gt;&lt;span style="color: black;"&gt; &lt;span style="color: #007700;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;IfModule&amp;nbsp;mod_rewrite&lt;/span&gt;&lt;span style="color: #007700;"&gt;.&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;c&lt;/span&gt;&lt;span style="color: #007700;"&gt;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;RewriteEngine&amp;nbsp;On&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;RewriteBase&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;/&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;RewriteCond&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;%&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;{REQUEST_FILENAME}&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;!-&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;f&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;RewriteCond&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;%&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;{REQUEST_FILENAME}&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;!-&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;d&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;RewriteRule&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;^(.*)$&amp;nbsp;/&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;index&lt;/span&gt;&lt;span style="color: #007700;"&gt;.&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;php&lt;/span&gt;&lt;span style="color: #007700;"&gt;?/$&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;1&amp;nbsp;[L]&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;&amp;lt;--&amp;nbsp;do&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;not&amp;nbsp;forget&amp;nbsp;the&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;?&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;after&amp;nbsp;index&lt;/span&gt;&lt;span style="color: #007700;"&gt;.&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;php&lt;/span&gt;&lt;span style="color: #007700;"&gt;!&lt;br /&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;IfModule&lt;/span&gt;&lt;span style="color: #007700;"&gt;&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;IfModule&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;!&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;mod_rewrite&lt;/span&gt;&lt;span style="color: #007700;"&gt;.&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;c&lt;/span&gt;&lt;span style="color: #007700;"&gt;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #ff8000;"&gt;#&amp;nbsp;If&amp;nbsp;we&amp;nbsp;don't&amp;nbsp;have&amp;nbsp;mod_rewrite&amp;nbsp;installed,&amp;nbsp;all&amp;nbsp;404's&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;can&amp;nbsp;be&amp;nbsp;sent&amp;nbsp;to&amp;nbsp;index.php,&amp;nbsp;and&amp;nbsp;everything&amp;nbsp;works&amp;nbsp;as&amp;nbsp;normal.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;ErrorDocument&amp;nbsp;404&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;/&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;index&lt;/span&gt;&lt;span style="color: #007700;"&gt;.&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;php&lt;/span&gt;&lt;span style="color: #007700;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;IfModule&lt;/span&gt;&lt;span style="color: #007700;"&gt;&amp;gt;&amp;nbsp;&lt;/span&gt; &lt;/span&gt; &lt;/code&gt;&lt;/div&gt;in config.php set &lt;br /&gt;&lt;div class="codeblock"&gt;&lt;code&gt;&lt;span style="color: black;"&gt; &lt;span style="color: #0000bb;"&gt;$config[&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;'index_page'&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;]&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;""&lt;/span&gt;&lt;span style="color: #007700;"&gt;;&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;$config[&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;'uri_protocol'&lt;/span&gt;&lt;span style="color: #0000bb;"&gt;]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #007700;"&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style="color: #dd0000;"&gt;"AUTO"&lt;/span&gt;&lt;span style="color: #007700;"&gt;;&amp;nbsp;&lt;/span&gt; &lt;/span&gt; &lt;/code&gt;&lt;/div&gt;With this htaccess index.php-hiding works for me with PHP4 and PHP5 running PHP as a CGI &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-8326038471914716361?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/8326038471914716361/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2010/12/codeignitor-removes-indexphp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/8326038471914716361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/8326038471914716361'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2010/12/codeignitor-removes-indexphp.html' title='codeignitor removes index.php'/><author><name>Tiebing</name><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-9797590.post-4822951500200200800</id><published>2010-12-22T10:25:00.000-08:00</published><updated>2010-12-22T10:25:26.707-08:00</updated><title type='text'>Corss Compile tcpdump for linux/mips</title><content type='html'>1. download libpcap (I use version 1.1.1 at the time of post) and tcpdump (v4.1.1 as of time of post)&lt;br /&gt;&lt;br /&gt;2. unzip both directory under the same directory, such as download/libpcap-1.1.1 and download/tcpdump-4.1.1&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Build libpcap:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;3. cd libpcap-1.1.1 ;&lt;br /&gt;&lt;br /&gt;4. vi configure; search for "linux version", and remove the entire section of "case" under "linux)" until "do we have the wireless extensions". This is so that ./configure does not try to detect linux (and fail). Our linux is fine.&lt;br /&gt;&lt;br /&gt;5. CC=/YOUR-CROSS-COMPILER-PATH/mips-openwrt-linux-gcc ./configure --host=mips-linux&amp;nbsp; --with-pcap=linux&lt;br /&gt;6.&amp;nbsp; make. after make is successful, you'll have a libpcap.a&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Build tcpdump:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;7. cd ../tcpdump-4.1.1&lt;br /&gt;&lt;br /&gt;8 .vi configure; earch for "linux version", and remove the entire section of "case" under "linux*)" until ";; \n *)".&lt;br /&gt;&lt;br /&gt;9. CC=/YOUR-CROSS-COMPILER-PATH/mips-openwrt-linux-gcc ./configure --host=mips-linux&amp;nbsp; --with-pcap=linux&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;10. vi Makefile; search for /usr/include and remove them; the Makefile by mistake include including files in the host system. Remove them.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;11. make. you can strip the final tcpdump if you like. all done.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-4822951500200200800?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/4822951500200200800/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2010/12/corss-compile-tcpdump-for-linuxmips.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/4822951500200200800'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/4822951500200200800'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2010/12/corss-compile-tcpdump-for-linuxmips.html' title='Corss Compile tcpdump for linux/mips'/><author><name>Tiebing</name><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>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9797590.post-7559794618389587053</id><published>2010-12-17T10:07:00.000-08:00</published><updated>2010-12-17T12:07:16.244-08:00</updated><title type='text'>How to cross compile tinyproxy for mips</title><content type='html'>tinyproxy version: 1.8.2&lt;br /&gt;&lt;br /&gt;1. Change the configure file to comment the section containing "Check for asciidoc" until all the way to "ac_config_files=" (not including). Also Remove the lines that test "HAVE_A2X_TRUE".&lt;br /&gt;&lt;br /&gt;2. CC=/home/tzhang/filter/trunk/toolchain_bin/mips-openwrt-linux-gcc ./configure --host=mips-linux --enable-filter --disable-upstream --disable-reverse --enable-transparent --disable-regexcheck&lt;br /&gt;&lt;br /&gt;3. modify config.h: search for "rpl_", and comment the two lines that contains rpl_malloc and rpl_remalloc. Use /* */ syntax to comment out.&lt;br /&gt;&lt;br /&gt;4. vi src/Makefile, search for "LDFLAGS", and append " -s" to it (to strip the final binary)&lt;br /&gt;&lt;br /&gt;5. Chanage Makefile to only build src. Find SUBDIRS , comment out all other directories other than "src".&lt;br /&gt;&lt;br /&gt;6. Make. find the binary at src/tinyproxy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-7559794618389587053?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/7559794618389587053/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2010/12/how-to-cross-compile-tinyproxy-for-mips.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/7559794618389587053'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/7559794618389587053'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2010/12/how-to-cross-compile-tinyproxy-for-mips.html' title='How to cross compile tinyproxy for mips'/><author><name>Tiebing</name><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-9797590.post-7121841664633987077</id><published>2010-12-17T06:48:00.001-08:00</published><updated>2010-12-17T06:48:08.471-08:00</updated><title type='text'>The two important articles to read to understand Windows7/Vista Arp behavior</title><content type='html'>&lt;a href="http://blogs.technet.com/b/networking/archive/2009/03/30/tcp-ip-networking-from-the-wire-up.aspx"&gt;http://blogs.technet.com/b/networking/archive/2009/03/30/tcp-ip-networking-from-the-wire-up.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://support.microsoft.com/kb/949589"&gt;http://support.microsoft.com/kb/949589&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-7121841664633987077?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/7121841664633987077/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2010/12/two-important-articles-to-read-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/7121841664633987077'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/7121841664633987077'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2010/12/two-important-articles-to-read-to.html' title='The two important articles to read to understand Windows7/Vista Arp behavior'/><author><name>Tiebing</name><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-9797590.post-88269673522786236</id><published>2010-12-16T07:12:00.001-08:00</published><updated>2010-12-16T07:12:40.660-08:00</updated><title type='text'>bfilter</title><content type='html'>A web proxy filter that blocks ads, achieves effects like Firfox AdBlock Plus.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://bfilter.sourceforge.net/"&gt;http://Bfilter.sourceforge.net&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-88269673522786236?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/88269673522786236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2010/12/bfilter.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/88269673522786236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/88269673522786236'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2010/12/bfilter.html' title='bfilter'/><author><name>Tiebing</name><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-9797590.post-6186515167912771763</id><published>2010-12-15T12:15:00.000-08:00</published><updated>2010-12-15T12:15:15.499-08:00</updated><title type='text'>vim global command</title><content type='html'>&lt;a href="http://www.networkcomputing.com/unixworld/tutorial/009/009.part3.html"&gt;http://www.networkcomputing.com/unixworld/tutorial/009/009.part3.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;syntax: g/stuff-to-search/[range]EX command&lt;br /&gt;&lt;br /&gt;example:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;strong&gt;&lt;strong&gt;global /^/ + delete&lt;/strong&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre&gt;&lt;strong&gt;&lt;strong&gt;:g/blah/d  , this deletes all lines containging 'blah'&lt;/strong&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre&gt;&lt;strong&gt;&lt;strong&gt;:g/blah/ ,+ delete , this deletes all lines and next lines that containing 'blah'&lt;/strong&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre&gt;&lt;strong&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre&gt;&lt;strong&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre&gt;&lt;strong&gt;&lt;strong&gt;&lt;span style="font-family: &amp;quot;Helvetica Neue&amp;quot;,Arial,Helvetica,sans-serif; font-size: small; font-weight: normal;"&gt;See more at &lt;a href="http://vimdoc.sourceforge.net/htmldoc/cmdline.html#Command-line"&gt;http://vimdoc.sourceforge.net/htmldoc/cmdline.html#Command-line&lt;/a&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/strong&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-6186515167912771763?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/6186515167912771763/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2010/12/vim-global-command.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/6186515167912771763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/6186515167912771763'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2010/12/vim-global-command.html' title='vim global command'/><author><name>Tiebing</name><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-9797590.post-8926944962500406924</id><published>2010-12-14T12:47:00.001-08:00</published><updated>2010-12-14T12:47:57.889-08:00</updated><title type='text'>Git Data Transport Commands</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_bXmKcndxC8I/TQfX6stx8yI/AAAAAAAAACg/QQ1-wHPiWyY/s1600/git-transport.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_bXmKcndxC8I/TQfX6stx8yI/AAAAAAAAACg/QQ1-wHPiWyY/s1600/git-transport.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-8926944962500406924?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/8926944962500406924/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2010/12/git-data-transport-commands.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/8926944962500406924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/8926944962500406924'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2010/12/git-data-transport-commands.html' title='Git Data Transport Commands'/><author><name>Tiebing</name><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://4.bp.blogspot.com/_bXmKcndxC8I/TQfX6stx8yI/AAAAAAAAACg/QQ1-wHPiWyY/s72-c/git-transport.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9797590.post-7393346485621794108</id><published>2010-12-11T05:01:00.001-08:00</published><updated>2010-12-11T05:01:27.349-08:00</updated><title type='text'>iptables SO_ORIGINAL_DST</title><content type='html'>this option in socket call can let you retrieve the original IP and port number of a redirected TCP session. Brilliant.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-7393346485621794108?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/7393346485621794108/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2010/12/iptables-sooriginaldst.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/7393346485621794108'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/7393346485621794108'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2010/12/iptables-sooriginaldst.html' title='iptables SO_ORIGINAL_DST'/><author><name>Tiebing</name><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-9797590.post-4709124152984635205</id><published>2010-12-09T04:51:00.001-08:00</published><updated>2010-12-09T05:10:12.206-08:00</updated><title type='text'>Git Get Started</title><content type='html'>&lt;b&gt;Getting Started&lt;/b&gt;&lt;br /&gt;Let's say you have a development project in the directory devproject.  Let's start using Git to manage this project.&lt;br /&gt;First off install Git.  In Debian and Ubuntu we just need to do "aptitude install git"&lt;br /&gt;&lt;div class="geshifilter"&gt;&lt;pre class="geshifilter-text"&gt;cd devproject&lt;br /&gt;git init&lt;br /&gt;git add .&lt;br /&gt;git commit -m "My first commit"&lt;/pre&gt;&lt;/div&gt;At this point you have all the benefits of a local version control  system but no one can see your work.  To make it available to other  people we'll need to install a remote repository on your server.  At  home, I only allow people to access my code through SSH so that's the  method I am going to talk about here.&lt;br /&gt;&lt;div class="geshifilter"&gt;&lt;pre class="geshifilter-text"&gt;ssh alex&lt;br /&gt;mkdir -p /var/git/devproject.git&lt;br /&gt;cd /var/git/devproject.git&lt;br /&gt;git --bare init&lt;br /&gt;exit&lt;/pre&gt;&lt;/div&gt;Your remote Git server is now configured so let's set up our local repository to talk to the remote repository&lt;br /&gt;&lt;div class="geshifilter"&gt;&lt;pre class="geshifilter-text"&gt;cd devproject&lt;br /&gt;git remote add origin ssh://alex/var/git/devproject.git&lt;/pre&gt;&lt;/div&gt;We can now push our changes to that repository:&lt;br /&gt;&lt;div class="geshifilter"&gt;&lt;pre class="geshifilter-text"&gt;git push origin master&lt;/pre&gt;&lt;pre class="geshifilter-text"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="geshifilter-text"&gt;git clone: clone from a remote a new local repository&lt;/pre&gt;&lt;pre class="geshifilter-text"&gt;git fetch: update the local "remote" directory&lt;/pre&gt;&lt;pre class="geshifilter-text"&gt;git pull: = git fetch + git merge&lt;/pre&gt;&lt;pre class="geshifilter-text"&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-4709124152984635205?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/4709124152984635205/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2010/12/git-get-started.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/4709124152984635205'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/4709124152984635205'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2010/12/git-get-started.html' title='Git Get Started'/><author><name>Tiebing</name><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-9797590.post-6332043709415533234</id><published>2010-12-08T06:05:00.000-08:00</published><updated>2010-12-08T06:20:13.890-08:00</updated><title type='text'>Compile Openssl for Linux MIPS</title><content type='html'>1. Grab openssl source 1.0.c&lt;br /&gt;2. Grab the Linux-MIPS patch at &lt;a href="http://svn.cross-lfs.org/svn/repos/patches/openssl/openssl-0.9.8k-mips_support-1.patch"&gt;http://svn.cross-lfs.org/svn/repos/patches/openssl/openssl-0.9.8k-mips_support-1.patch&lt;/a&gt;&lt;br /&gt;3. apply the patch: the patch basically just add a few lines to the Configure file. you can do that manually if you want.&lt;br /&gt;4. CC=YOUR-MIPS-CC ./configure linux-mips&amp;nbsp; (add "shared" if you want to build shared library)&lt;br /&gt;5. make&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-6332043709415533234?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/6332043709415533234/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2010/12/compile-openssl-for-linux-mips.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/6332043709415533234'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/6332043709415533234'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2010/12/compile-openssl-for-linux-mips.html' title='Compile Openssl for Linux MIPS'/><author><name>Tiebing</name><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-9797590.post-4391707007235455696</id><published>2010-12-07T18:06:00.001-08:00</published><updated>2010-12-07T18:06:48.511-08:00</updated><title type='text'>Increase VNC Speed (tightvnc)</title><content type='html'>&lt;ul&gt;&lt;li class="step" id="jsArticleStep2"&gt;&lt;div&gt;If you  select the "Low-bandwidth connection" option under "Connection profile" a  lot of the default options will be changed. You will notice &lt;b&gt;a drastic  increase in performance &lt;/b&gt;from that allowance. &lt;br /&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="step" id="jsArticleStep3"&gt;             &lt;span class="stepNumber"&gt;&lt;/span&gt;                          &lt;div&gt;              If you want to tweak the  connection further, click the "Options" button to see what is under the  hood. Choose the &lt;b&gt;"Tight" encoding option&lt;/b&gt; to use TightVNC's  compression. &lt;b&gt;Select "Use 8-bit color" &lt;/b&gt;to reduce the number of colors and  therefore increase speed. Below that, &lt;b&gt;slide the compression bar down to  its fastest point&lt;/b&gt; to make major changes on performance. Keep in mind  that this will also affect the image quality.&lt;br /&gt;&lt;/div&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/9797590-4391707007235455696?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/4391707007235455696/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2010/12/increase-vnc-speed-tightvnc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/4391707007235455696'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/4391707007235455696'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2010/12/increase-vnc-speed-tightvnc.html' title='Increase VNC Speed (tightvnc)'/><author><name>Tiebing</name><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-9797590.post-288936550280489448</id><published>2010-12-06T12:37:00.000-08:00</published><updated>2010-12-06T12:37:49.766-08:00</updated><title type='text'>rSync for Windows</title><content type='html'>1. Download the zipfile for &lt;a href="http://www.aboutmyip.com/AboutMyXApp/DeltaCopyDownloadRaw.jsp"&gt;DelteCopy (Without Installer)&lt;/a&gt;&lt;br /&gt;2. Unzip it. It includes rsync.exe for Windows&lt;br /&gt;3. copy deltecd.conf to rsyncd.conf&lt;br /&gt;4. run it as a daemon: rsync --daemon --no-detach --config=\PATH\rsyncd.conf&lt;br /&gt;5. if that works, it will open a port on 873 (make sure you firewall is off).&lt;br /&gt;6. to make it permanent, you can use "srvany" to install it as a service.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.brentnorris.net/rsyncntdoc.html"&gt;More detailed instructions can be found at HERE.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-288936550280489448?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/288936550280489448/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2010/12/rsync-for-windows.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/288936550280489448'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/288936550280489448'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2010/12/rsync-for-windows.html' title='rSync for Windows'/><author><name>Tiebing</name><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-9797590.post-4531479479817557600</id><published>2010-12-06T10:41:00.001-08:00</published><updated>2010-12-06T10:41:38.859-08:00</updated><title type='text'>Edit Motion Jpeg on Windows</title><content type='html'>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=&lt;br /&gt;Background:&lt;br /&gt;Digital Still Cameras for the last couple of years have been able to  record video. The cameras put the video (and usually PCM aka RAW audio)  in either Quicktime (MOV) or AVI containers.&lt;br /&gt;&lt;br /&gt;The video codec is usually Motion JPEG (FourCC:MJPG) because the chip in  the camera usually makes JPG and making Motion JPEG is a trivial  extension since MJPEG is close to sequential JPEGs.&lt;br /&gt;&lt;br /&gt;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=&lt;br /&gt;Technical hurdle on the PC:&lt;br /&gt;To be able to play video or audio you need to have a de-compressor to  understand the container (eg MOV, AVI) AND a de-compressor for each  stream in the container.&lt;br /&gt;Container examples:  "MOV" –QuickTime Movie, "AVI" – Windows’ implementation of the “RIFF” format.&lt;br /&gt;video examples:  "M2V" -mpeg2 video, "MJPG" - Motion JPEG.&lt;br /&gt;audio example: "PCM" - raw audio, "AC3" - Dolby Digital audio.&lt;br /&gt;&lt;br /&gt;The algorithm is either built into the tool (eg MOV decode in QuickTime, Adobe &amp;amp; free tools like &lt;a class="contentlink" href="http://www.videohelp.com/tools/MPlayer" rel="nofollow" target="_blank"&gt;MPlayer&lt;/a&gt; etc) OR it has to be present as installed component on the PC.&lt;br /&gt;&lt;br /&gt;On Windows there are TWO sorts of CODECs. The original "Video For Windows" (VfW) and DirectShow.&lt;br /&gt;Editing tools (in general) ONLY work with VfW codecs.&lt;br /&gt;&lt;br /&gt;Windows XP, Vista and Win7 all ship with DirectShow MJPEG codecs, but not VfW ….so easy to watch but you can’t EDIT.&lt;br /&gt;&lt;br /&gt;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=&lt;br /&gt;The problem:&lt;br /&gt;So you have these MOV[ MJPEG + PCM ] or AVI[ MJPEG + PCM ] files and  want to edit them to do something as simple as put them on a DVD for mom  to see the new baby.&lt;br /&gt;&lt;br /&gt;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=&lt;br /&gt;The solution:&lt;br /&gt;You can buy a VfW Motion JPEG decoder (eg &lt;a class="contentlink" href="http://www.morgan-multimedia.com/M-JPEG2000/index.htm" rel="nofollow" target="_blank"&gt;http://www.morgan-multimedia.com/M-JPEG2000/index.htm&lt;/a&gt; )&lt;br /&gt;OR you can get it in freeware.&lt;br /&gt;&lt;br /&gt;&lt;a class="contentlink" href="http://www.videohelp.com/tools/ffdshow" rel="nofollow" target="_blank"&gt;FFDshow&lt;/a&gt; ( &lt;a class="contentlink" href="http://sourceforge.net/projects/ffdshow/" rel="nofollow" target="_blank"&gt;http://sourceforge.net/projects/ffdshow/&lt;/a&gt; ) uses the libavcodec library developed in the &lt;a class="contentlink" href="http://www.videohelp.com/tools/ffmpeg" rel="nofollow" target="_blank"&gt;FFmpeg&lt;/a&gt; Movie Player ( &lt;a class="contentlink" href="http://ffmpeg.org/" rel="nofollow" target="_blank"&gt;http://ffmpeg.org/&lt;/a&gt;  ) open-source effort. The libavcodec library has TONS of codecs. It is  better known for its MPEG4, Xvid, DivX but it also has a lot of others.  One of those “others” is MJPG. &lt;br /&gt;&lt;br /&gt;The FFDshow project takes that decode (and in some cases encode too)  capability and presents them as VfW (as well as DirectShow) codecs!&lt;br /&gt;&lt;br /&gt;Viola, you now have the ability to understand MJPEG in video editing tools. (and tons of other codecs if you enable them).&lt;br /&gt;&lt;br /&gt;The only thing you need to do after installation is go to the Start  Menu’s “FFDShow VFW Configuration” and under the “Decoder” tab’s  “Codecs” (at the top). Then on the right side scroll down to MJPEG and  change it from “disabled” to “libavcodec”.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" border="0" src="http://forum.videohelp.com/images/guides/p1997840/ffdshow%20video%20for%20windows%20codec%20properties%208192009%2042423%20pm.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=&lt;br /&gt;An Aside:&lt;br /&gt;This will become more and more important in the years to come because  motion films are shot and delivered to digital cinemas as “2k”, “4k” or  “8k”  ( &lt;a class="contentlink" href="http://en.wikipedia.org/wiki/Digital_cinema" rel="nofollow" target="_blank"&gt;http://en.wikipedia.org/wiki/Digital_cinema&lt;/a&gt; ) in MOTION JPEG2000 ( &lt;a class="contentlink" href="http://en.wikipedia.org/wiki/JPEG_2000#Motion_JPEG_2000" rel="nofollow" target="_blank"&gt;http://en.wikipedia.org/wiki/JPEG_2000#Motion_JPEG_2000&lt;/a&gt; ) . It’s only so long before INDIE film makers and then pro-sumers want to edit in these resolutions.&lt;br /&gt;&lt;br /&gt;‘thanks for reading.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;[EDIT - LeChineur had problems with this solution. Instead of you  having to read this entire thread I'm putting an edit here to summarize  the problem]&lt;/i&gt;&lt;br /&gt;In the end it came down to this. LeChineur's FFDshow install didn't work. In summary:&lt;br /&gt;&lt;br /&gt;&lt;div class="bbcode_container"&gt;  &lt;div class="bbcode_quote"&gt;   &lt;div class="quote_container"&gt;             &lt;div class="bbcode_postedby"&gt;      Originally Posted by &lt;strong&gt;LeChineur&lt;/strong&gt;           &lt;/div&gt;&lt;div class="message"&gt;This got me thinking.  So I checked and I  indeed did not have the ff_vfw.dll on my system.  So I uninstalled the  version 3.054 of FFDShow (dated 08/04/2009) which was installed on my  system, downloaded and installed version 3.052 (dated 08/03/2009) and  voila, I then had the ff_vfw.dll.  &lt;br /&gt;&lt;br /&gt;That solved the problem.  PP now plays the video clip fine, as well as  all the other "AVI" (MJPEG) clips from my Canon camera.  Incredible!&lt;br /&gt;&lt;br /&gt;So rallymax, your original post was in fact correct.  Why the version of  FFDShow that I first downloaded didn't install the correct dll the  first time is still a mystery, but whatever...&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-4531479479817557600?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/4531479479817557600/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2010/12/edit-motion-jpeg-on-windows.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/4531479479817557600'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/4531479479817557600'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2010/12/edit-motion-jpeg-on-windows.html' title='Edit Motion Jpeg on Windows'/><author><name>Tiebing</name><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-9797590.post-6005548120328866543</id><published>2010-12-04T15:29:00.000-08:00</published><updated>2010-12-04T15:29:18.701-08:00</updated><title type='text'>use .htaccess to protect your web folder</title><content type='html'>&lt;h2&gt;Generate the &lt;code&gt;password file&lt;/code&gt;&lt;/h2&gt;htpasswd -c .htpasswd fred   &lt;br /&gt;&lt;div style="margin-top: 20px;"&gt;(where &lt;kbd&gt;fred&lt;/kbd&gt; is the username you want to use). You'll be prompted to enter and retype your password, then the &lt;code class="filename"&gt;.htpasswd&lt;/code&gt; file will be created for you.&lt;/div&gt;&lt;div style="margin-top: 20px;"&gt;&lt;br /&gt;&lt;/div&gt;Next, upload this file to your website. Make sure you place it  outside the Web root of your site if possible, as you don't want just  anyone to be able to view the file! For example, place it above your &lt;code class="filename"&gt;public_html&lt;/code&gt; or &lt;code class="filename"&gt;htdocs&lt;/code&gt; folder. (Having said this, Apache is often set up by default to block web-based access to files beginning with &lt;code class="filename"&gt;.ht&lt;/code&gt;. Better safe than sorry though!)&lt;br /&gt;If you can't place your &lt;code class="filename"&gt;.htpasswd&lt;/code&gt; file outside your Web root, name it something that's not easily guessable - for example, &lt;code class="filename"&gt;.htxuymwp&lt;/code&gt; - so that people won't be able to find it easily. (In addition, it helps to start the filename with &lt;code class="filename"&gt;.ht&lt;/code&gt;; as mentioned earlier, Apache usually blocks access to files starting with &lt;code class="filename"&gt;.ht&lt;/code&gt;.)&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Creating the &lt;code&gt;.htaccess&lt;/code&gt; file&lt;/h2&gt;&lt;h3&gt;Protecting a folder&lt;/h3&gt;To password protect a folder on your site, you need to put the following code in your &lt;code class="filename"&gt;.htaccess&lt;/code&gt; file:&lt;br /&gt;&lt;pre class="code"&gt;&lt;code&gt;&lt;br /&gt;AuthUserFile &lt;var&gt;/full/path/to/.htpasswd&lt;/var&gt;&lt;br /&gt;AuthType Basic&lt;br /&gt;AuthName "My Secret Folder"&lt;br /&gt;Require valid-user&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;var&gt;/full/path/to/.htpasswd&lt;/var&gt; should be the full path to the &lt;code class="filename"&gt;.htpasswd&lt;/code&gt; file that you uploaded earlier. The full path is the path to the file from the Web server's volume root - for example, &lt;code class="filename"&gt;/home/username/.htpasswd&lt;/code&gt; or &lt;code class="filename"&gt;C:\wwwroot\username\.htpasswd&lt;/code&gt;. (If you're not sure of the full path to your site or home directory, ask your Web hosting company for this info.)&lt;br /&gt;The above &lt;code class="filename"&gt;.htaccess&lt;/code&gt; file will password  protect all files in the folder that it is placed in, and all  sub-folders under that folder too. So if you wanted to password protect  your entire site, you would place the &lt;code class="filename"&gt;.htaccess&lt;/code&gt; file in your Web root folder.&lt;br /&gt;&lt;h3&gt;Protecting a file&lt;/h3&gt;To password protect just a single file in a folder, use the following &lt;code class="filename"&gt;.htaccess&lt;/code&gt; file:&lt;br /&gt;&lt;pre class="code"&gt;&lt;code&gt;&lt;br /&gt;AuthUserFile /full/path/to/.htpasswd&lt;br /&gt;AuthType Basic&lt;br /&gt;AuthName "My Secret Page"&lt;br /&gt;&lt;br /&gt;&amp;lt;Files "mypage.html"&amp;gt;&lt;br /&gt;  Require valid-user&lt;br /&gt;&amp;lt;/Files&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;This will password protect just the &lt;code class="filename"&gt;mypage.html&lt;/code&gt; file in the folder where you put the &lt;code class="filename"&gt;.htaccess&lt;/code&gt; file.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-6005548120328866543?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/6005548120328866543/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2010/12/use-htaccess-to-protect-your-web-folder.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/6005548120328866543'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/6005548120328866543'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2010/12/use-htaccess-to-protect-your-web-folder.html' title='use .htaccess to protect your web folder'/><author><name>Tiebing</name><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-9797590.post-427112336972229672</id><published>2010-12-03T16:52:00.001-08:00</published><updated>2010-12-03T16:52:47.791-08:00</updated><title type='text'>Export Audio from Windows Movie Maker</title><content type='html'>In Windows Movie Maker....&lt;br /&gt;To save only the audio track of a video clip...&lt;br /&gt;drag the video to the "Audio/Music" track.&lt;br /&gt;Then go to...File &amp;gt; Publish Movie and you'll get options&lt;br /&gt;for audio quality and save it to a wma audio file.&lt;br /&gt;&lt;br /&gt;This will result in a .wma audio file. Be sure&lt;br /&gt;to drag the clip all the way to the left on the&lt;br /&gt;timeline or you will have dead air at the&lt;br /&gt;beginning.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-427112336972229672?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/427112336972229672/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2010/12/export-audio-from-windows-movie-maker.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/427112336972229672'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/427112336972229672'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2010/12/export-audio-from-windows-movie-maker.html' title='Export Audio from Windows Movie Maker'/><author><name>Tiebing</name><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-9797590.post-1009801471094054987</id><published>2010-12-03T05:10:00.001-08:00</published><updated>2010-12-03T05:10:55.882-08:00</updated><title type='text'>an IM proxy</title><content type='html'>&lt;a href="http://www.imspector.org/w"&gt;http://www.imspector.org/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-1009801471094054987?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/1009801471094054987/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2010/12/im-proxy.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/1009801471094054987'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/1009801471094054987'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2010/12/im-proxy.html' title='an IM proxy'/><author><name>Tiebing</name><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-9797590.post-7639037615401029238</id><published>2010-12-01T14:30:00.000-08:00</published><updated>2011-01-27T11:22:35.987-08:00</updated><title type='text'>How to turn a Windows application into Windows Service</title><content type='html'>&lt;a href="http://www.tacktech.com/display.cfm?ttid=197"&gt;http://www.tacktech.com/display.cfm?ttid=197&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The Windows NT/2000 Resource Kit provides two utilities that allow you  to create a Windows user-defined service for Windows applications and  some 16-bit applications (but not for batch files). &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Whats needed for Windows NT/2000&lt;/b&gt;:&lt;br /&gt;&lt;b&gt;Instrsrv.exe&lt;/b&gt; installs and removes system services from Windows NT/2000&lt;br /&gt;&lt;b&gt;Srvany.exe&lt;/b&gt; allows any Windows application to run as a service.&lt;br /&gt;You can download both files here &lt;a href="http://www.advistatech.com/software/srvany.zip"&gt;srvany.zip&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;This zip includes three files. The two you need srvany.exe and  instsrv.exe to install the services and also srvany.wri which documents  everything you can do with the program.&lt;br /&gt;&lt;b&gt;Note:&lt;/b&gt; Make sure the Services Manager is closed while running the DOS commands. &lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;You will need to put these files in a directory called &lt;b&gt;reskit&lt;/b&gt; At a MS-DOS command prompt(Start | Run | "cmd.exe"), type the following command:&lt;br /&gt;&amp;lt;path&amp;gt;\reskit\INSTSRV.EXE "&lt;i&gt;Service Name&lt;/i&gt;" &amp;lt;path&amp;gt;\reskit\SRVANY.EXE&lt;br /&gt;This creates the service in the Services manager and the registry keys to setup what program to run.&lt;br /&gt;&lt;br /&gt;&lt;img alt="http:www.tacktech.com/" src="http://www.tacktech.com/images/articles/197/addsrv.gif" /&gt; &lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;Next open regedit.exe &lt;b&gt;Start | run | regedit.exe&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;img alt="http:www.tacktech.com/" src="http://www.tacktech.com/images/articles/197/regedit.gif" /&gt; &lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;Next navigate to this registry key.&lt;br /&gt;&lt;b&gt;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\&lt;i&gt;service name&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;img alt="http:www.tacktech.com/" src="http://www.tacktech.com/images/articles/197/key.gif" /&gt; &lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;From the Edit menu, click Add Key and name it &lt;b&gt;Parameters&lt;/b&gt;&lt;br /&gt;Next from the Edit menu, click Add Value and type this information.&lt;br /&gt;&lt;b&gt;Value Name: Application&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Data Type : REG_SZ&lt;/b&gt;&lt;br /&gt;&lt;b&gt;String : &amp;lt;path&amp;gt;\&amp;lt;application.ext&amp;gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;img alt="http:www.tacktech.com/" src="http://www.tacktech.com/images/articles/197/addkey.gif" /&gt; &lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;Now you can start your service from the Service Manager&lt;br /&gt;&lt;br /&gt;&lt;img alt="http:www.tacktech.com/" src="http://www.tacktech.com/images/articles/197/srvmgr.gif" /&gt; &lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;With this same program you can remove the service also. Just run this command from command prompt.&lt;br /&gt;&lt;b&gt;&amp;lt;path&amp;gt;\reskit\INSTSRV.EXE &lt;i&gt;"Service Name"&lt;/i&gt; REMOVE&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-7639037615401029238?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/7639037615401029238/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2010/12/how-to-turn-windows-application-into.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/7639037615401029238'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/7639037615401029238'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2010/12/how-to-turn-windows-application-into.html' title='How to turn a Windows application into Windows Service'/><author><name>Tiebing</name><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-9797590.post-7048980617874690749</id><published>2010-11-30T13:24:00.001-08:00</published><updated>2010-11-30T13:24:40.583-08:00</updated><title type='text'>Free online screen sharing website</title><content type='html'>&lt;a href="http://www.mikogo.com/"&gt;http://www.mikogo.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If you couple this with freeconference.com, you've got a free webcast solution. :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-7048980617874690749?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/7048980617874690749/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2010/11/free-online-screen-sharing-website.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/7048980617874690749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/7048980617874690749'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2010/11/free-online-screen-sharing-website.html' title='Free online screen sharing website'/><author><name>Tiebing</name><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-9797590.post-5101196371815702379</id><published>2010-11-30T10:57:00.001-08:00</published><updated>2010-11-30T10:57:48.732-08:00</updated><title type='text'>To map a list of addresses</title><content type='html'>If you have a list of addresses you want to map, you can use &lt;a href="http://www.google.com/fusiontables/Home"&gt;Google Fusion Tables&lt;/a&gt;. Just import your EXCEL file and tell it which column is address, it will do the rest. Great product.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9797590-5101196371815702379?l=tiebing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tiebing.blogspot.com/feeds/5101196371815702379/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tiebing.blogspot.com/2010/11/to-map-list-of-addresses.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/5101196371815702379'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9797590/posts/default/5101196371815702379'/><link rel='alternate' type='text/html' href='http://tiebing.blogspot.com/2010/11/to-map-list-of-addresses.html' title='To map a list of addresses'/><author><name>Tiebing</name><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></feed>
