<div dir="ltr">Hi Ionut,<div><br></div><div style>I chose pcap because it was easier than if I had to extract the information from a raw</div><div style>packet. For libnet I don&#39;t have a real good motivation. I&#39;ll try to send packets using raw sockets</div>
<div style>and for receiving I&#39;ll keep pcap. Seems a good solution?</div><div style><br></div><div style>Mihaela</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/5/17 Ionut Nicu <span dir="ltr">&lt;<a href="mailto:ionut.nicu@mindbit.ro" target="_blank">ionut.nicu@mindbit.ro</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Mihaela,<br>
<br>
Why use libnet and not just the standard socket API? Is there a reason<br>
for using libnet instead of just using send()/recv()?<br>
<br>
Ionut.<br>
<div><div class="h5"><br>
On Thu, 2013-05-16 at 00:17 +0300, Mihaela Alexandra Martinas wrote:<br>
&gt; Hello,<br>
&gt;<br>
&gt;<br>
&gt; I started implementing the raw_sockets and I use libnet for sending<br>
&gt; the packets.<br>
&gt; When I integrated the implementation with cdp I faced a problem at<br>
&gt; compile time.<br>
&gt;<br>
&gt;<br>
&gt; In file included from /usr/include/libnet.h:83,<br>
&gt;                  from ../switch/raw_socket.h:23,<br>
&gt;                  from cdpd.h:55,<br>
&gt;                  from cdpd.c:20:<br>
&gt; /usr/include/net/if.h:45: error: expected identifier before numeric<br>
&gt; constant<br>
&gt; /usr/include/net/if.h:113: error: redefinition of ‘struct ifmap’<br>
&gt; /usr/include/net/if.h:128: error: redefinition of ‘struct ifreq’<br>
&gt; /usr/include/net/if.h:178: error: redefinition of ‘struct ifconf’<br>
&gt;<br>
&gt;<br>
&gt; I didn&#39;t include the same headers on both files and from what I read<br>
&gt; from the internet the problem appears because the  version of libnet<br>
&gt; that I installed(which is for centos 6) is incompatible with the one<br>
&gt; used of glibc.<br>
&gt;<br>
&gt;<br>
&gt; I tried with this packets:<br>
&gt; - libnet-1.1.2.1-2.2.el6.rf.i686.rpm (this was suggested for centos 6<br>
&gt; and we use centos 6.3)<br>
&gt;<br>
&gt; - libnet-1.1.5-1.el6.i686.rpm<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Do you have any suggestions?<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Martinas Mihaela-Alexandra<br>
</div></div>&gt; _______________________________________________<br>
&gt; LiSA-Devel mailing list<br>
&gt; <a href="mailto:LiSA-Devel@lisa.mindbit.ro">LiSA-Devel@lisa.mindbit.ro</a><br>
&gt; <a href="http://lisa.mindbit.ro/mailman/listinfo/lisa-devel" target="_blank">http://lisa.mindbit.ro/mailman/listinfo/lisa-devel</a><br>
<br>
<br>
_______________________________________________<br>
LiSA-Devel mailing list<br>
<a href="mailto:LiSA-Devel@lisa.mindbit.ro">LiSA-Devel@lisa.mindbit.ro</a><br>
<a href="http://lisa.mindbit.ro/mailman/listinfo/lisa-devel" target="_blank">http://lisa.mindbit.ro/mailman/listinfo/lisa-devel</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Martinas Mihaela-Alexandra</div>
</div>