<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: pcap-sharp RC1</title>
	<atom:link href="http://www.chrishowie.com/2007/03/23/pcap-sharp-rc1/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.chrishowie.com/2007/03/23/pcap-sharp-rc1/</link>
	<description>Trading social skills for technical prowess since 1994</description>
	<pubDate>Tue, 06 Jan 2009 00:57:23 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Chris</title>
		<link>http://www.chrishowie.com/2007/03/23/pcap-sharp-rc1/comment-page-1/#comment-6437</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Mon, 04 Feb 2008 03:13:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.chrishowie.com/2007/03/23/pcap-sharp-rc1/#comment-6437</guid>
		<description>winpcap is the Windows port of libpcap.  They should have the same API and ABI.

sharp-pcap is another project that wraps libpcap.  It was a bit heavy for what I wanted to do, so I wrote a lighter wrapper.  Note that mine does not fully wrap libpcap -- specifically the parts that depend on host platform structures, like sockaddr_t.

As for ARP, you may want to have a look at a few classes I wrote as part of an experimental C# packet parsing library.  Take a look at the classes in https://layla.chrishowie.com/svn/SharpNet/SharpNet/ and have a look at https://layla.chrishowie.com/svn/SharpNet/SharpStack/ for an unfinished proof-of-concept library that implements a network interface in C#.  In its current state it does full ARP processing and replies to ICMP echo requests.</description>
		<content:encoded><![CDATA[<p>winpcap is the Windows port of libpcap.  They should have the same API and ABI.</p>
<p>sharp-pcap is another project that wraps libpcap.  It was a bit heavy for what I wanted to do, so I wrote a lighter wrapper.  Note that mine does not fully wrap libpcap &#8212; specifically the parts that depend on host platform structures, like sockaddr_t.</p>
<p>As for ARP, you may want to have a look at a few classes I wrote as part of an experimental C# packet parsing library.  Take a look at the classes in <a href="https://layla.chrishowie.com/svn/SharpNet/SharpNet/" rel="nofollow">https://layla.chrishowie.com/svn/SharpNet/SharpNet/</a> and have a look at <a href="https://layla.chrishowie.com/svn/SharpNet/SharpStack/" rel="nofollow">https://layla.chrishowie.com/svn/SharpNet/SharpStack/</a> for an unfinished proof-of-concept library that implements a network interface in C#.  In its current state it does full ARP processing and replies to ICMP echo requests.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Austin</title>
		<link>http://www.chrishowie.com/2007/03/23/pcap-sharp-rc1/comment-page-1/#comment-6414</link>
		<dc:creator>Austin</dc:creator>
		<pubDate>Sat, 02 Feb 2008 20:07:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.chrishowie.com/2007/03/23/pcap-sharp-rc1/#comment-6414</guid>
		<description>I am curious... I am looking to write a small sniffer app (.net) and I need some library help with the network layer... I am seeing your project here and I wonder if you might help me understand how libpcap differs from winpcap and how your product is different than another I have seen sharp-pcap.  

I dont need a lot of power all I am doing is needing to 1. listen for arp packets on teh segment I am on... and 2 send out an arp packet for a given IP so I can get the mac.

Could you comment on this perhaps?
Thanks</description>
		<content:encoded><![CDATA[<p>I am curious&#8230; I am looking to write a small sniffer app (.net) and I need some library help with the network layer&#8230; I am seeing your project here and I wonder if you might help me understand how libpcap differs from winpcap and how your product is different than another I have seen sharp-pcap.  </p>
<p>I dont need a lot of power all I am doing is needing to 1. listen for arp packets on teh segment I am on&#8230; and 2 send out an arp packet for a given IP so I can get the mac.</p>
<p>Could you comment on this perhaps?<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.chrishowie.com/2007/03/23/pcap-sharp-rc1/comment-page-1/#comment-5183</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Wed, 05 Dec 2007 03:40:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.chrishowie.com/2007/03/23/pcap-sharp-rc1/#comment-5183</guid>
		<description>Currently you cannot.  There are libpcap functions to do this but they use system structures like sockaddr_t to represent IP addresses, and I don't want to get that platform-specific.  I could use a glue library to do the dirty work but I wanted something simple and 100% managed, so I didn't go that route.</description>
		<content:encoded><![CDATA[<p>Currently you cannot.  There are libpcap functions to do this but they use system structures like sockaddr_t to represent IP addresses, and I don&#8217;t want to get that platform-specific.  I could use a glue library to do the dirty work but I wanted something simple and 100% managed, so I didn&#8217;t go that route.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://www.chrishowie.com/2007/03/23/pcap-sharp-rc1/comment-page-1/#comment-5170</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Tue, 04 Dec 2007 22:47:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.chrishowie.com/2007/03/23/pcap-sharp-rc1/#comment-5170</guid>
		<description>Ok thanks for the help. And thanks for distributing the lib.

Last question I promise ;) 

IList devices = Pcap.FindAllDevices();
foreach (InterfaceDefinition dev in devices)
{
	MessageBox.Show(dev.Name);
}

I'm using the above code to list available interfaces but how can I lookup the ip address for each interface?</description>
		<content:encoded><![CDATA[<p>Ok thanks for the help. And thanks for distributing the lib.</p>
<p>Last question I promise <img src='http://www.chrishowie.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>IList devices = Pcap.FindAllDevices();<br />
foreach (InterfaceDefinition dev in devices)<br />
{<br />
	MessageBox.Show(dev.Name);<br />
}</p>
<p>I&#8217;m using the above code to list available interfaces but how can I lookup the ip address for each interface?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.chrishowie.com/2007/03/23/pcap-sharp-rc1/comment-page-1/#comment-5168</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Tue, 04 Dec 2007 22:41:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.chrishowie.com/2007/03/23/pcap-sharp-rc1/#comment-5168</guid>
		<description>Either require the -dev package or use a config dllmap to remap it to some specific version number.  ABI-compatible libraries are supposed to have compatible old versions symlinked to a newer one, so you might dllmap it to libpcap.so.0.8 since that is the version I developed against.  If a breaking change comes out then that symlink should not point to the ABI-incompatible library, and in fact should not exist, so your application will fail (as it should).</description>
		<content:encoded><![CDATA[<p>Either require the -dev package or use a config dllmap to remap it to some specific version number.  ABI-compatible libraries are supposed to have compatible old versions symlinked to a newer one, so you might dllmap it to libpcap.so.0.8 since that is the version I developed against.  If a breaking change comes out then that symlink should not point to the ABI-incompatible library, and in fact should not exist, so your application will fail (as it should).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://www.chrishowie.com/2007/03/23/pcap-sharp-rc1/comment-page-1/#comment-5166</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Tue, 04 Dec 2007 22:11:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.chrishowie.com/2007/03/23/pcap-sharp-rc1/#comment-5166</guid>
		<description>Ah! That worked a treat, thanks Chris. Does this mean that pcap-dev will be necessary for end-users to run the app?</description>
		<content:encoded><![CDATA[<p>Ah! That worked a treat, thanks Chris. Does this mean that pcap-dev will be necessary for end-users to run the app?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.chrishowie.com/2007/03/23/pcap-sharp-rc1/comment-page-1/#comment-5160</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Tue, 04 Dec 2007 18:39:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.chrishowie.com/2007/03/23/pcap-sharp-rc1/#comment-5160</guid>
		<description>This means either the pcap or pcap-dev packages aren't installed for your particular platform.  pcap-dev often provides a symlink from libpcap.so to some particular version of libpcap, like libpcap.so.0.9.8 on my box.  You can solve this any number of ways:

* Symlink libpcap.so to a versioned libpcap library.
* Do the same, but put the symlink in your application directory.
* Create a pcap-sharp.dll.config file.  See http://www.mono-project.com/DllMap for information on doing this.</description>
		<content:encoded><![CDATA[<p>This means either the pcap or pcap-dev packages aren&#8217;t installed for your particular platform.  pcap-dev often provides a symlink from libpcap.so to some particular version of libpcap, like libpcap.so.0.9.8 on my box.  You can solve this any number of ways:</p>
<p>* Symlink libpcap.so to a versioned libpcap library.<br />
* Do the same, but put the symlink in your application directory.<br />
* Create a pcap-sharp.dll.config file.  See <a href="http://www.mono-project.com/DllMap" rel="nofollow">http://www.mono-project.com/DllMap</a> for information on doing this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://www.chrishowie.com/2007/03/23/pcap-sharp-rc1/comment-page-1/#comment-5152</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Tue, 04 Dec 2007 15:27:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.chrishowie.com/2007/03/23/pcap-sharp-rc1/#comment-5152</guid>
		<description>Hey There Chris,

Thanks for pcap-sharp - it seems to be exactly what I need. I am having some trouble using it though. I am working on Mono in Linux and I can compile a project with it but when I try to run the resulting binary, I always get an error like this:

System.DllNotFoundException: libpcap.so
  at (wrapper managed-to-native) PcapSharp.PcapCall:pcap_findalldevs (intptr&#38;,System.Text.StringBuilder)
  at PcapSharp.Pcap.FindAllDevices () [0x00000] 
[..snip..]

Can you suggest why this might be happening or how I can fix it? 

Thanks,

Mark.</description>
		<content:encoded><![CDATA[<p>Hey There Chris,</p>
<p>Thanks for pcap-sharp - it seems to be exactly what I need. I am having some trouble using it though. I am working on Mono in Linux and I can compile a project with it but when I try to run the resulting binary, I always get an error like this:</p>
<p>System.DllNotFoundException: libpcap.so<br />
  at (wrapper managed-to-native) PcapSharp.PcapCall:pcap_findalldevs (intptr&amp;,System.Text.StringBuilder)<br />
  at PcapSharp.Pcap.FindAllDevices () [0x00000]<br />
[..snip..]</p>
<p>Can you suggest why this might be happening or how I can fix it? </p>
<p>Thanks,</p>
<p>Mark.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
