[LiSA-Devel] Libnet package

Mihaela Alexandra Martinas martinas.mihaela21 at gmail.com
Fri May 17 12:21:43 EEST 2013


Hi Ionut,

I chose pcap because it was easier than if I had to extract the information
from a raw
packet. For libnet I don't have a real good motivation. I'll try to send
packets using raw sockets
and for receiving I'll keep pcap. Seems a good solution?

Mihaela


2013/5/17 Ionut Nicu <ionut.nicu at mindbit.ro>

> Hi Mihaela,
>
> Why use libnet and not just the standard socket API? Is there a reason
> for using libnet instead of just using send()/recv()?
>
> Ionut.
>
> On Thu, 2013-05-16 at 00:17 +0300, Mihaela Alexandra Martinas wrote:
> > Hello,
> >
> >
> > I started implementing the raw_sockets and I use libnet for sending
> > the packets.
> > When I integrated the implementation with cdp I faced a problem at
> > compile time.
> >
> >
> > In file included from /usr/include/libnet.h:83,
> >                  from ../switch/raw_socket.h:23,
> >                  from cdpd.h:55,
> >                  from cdpd.c:20:
> > /usr/include/net/if.h:45: error: expected identifier before numeric
> > constant
> > /usr/include/net/if.h:113: error: redefinition of ‘struct ifmap’
> > /usr/include/net/if.h:128: error: redefinition of ‘struct ifreq’
> > /usr/include/net/if.h:178: error: redefinition of ‘struct ifconf’
> >
> >
> > I didn't include the same headers on both files and from what I read
> > from the internet the problem appears because the  version of libnet
> > that I installed(which is for centos 6) is incompatible with the one
> > used of glibc.
> >
> >
> > I tried with this packets:
> > - libnet-1.1.2.1-2.2.el6.rf.i686.rpm (this was suggested for centos 6
> > and we use centos 6.3)
> >
> > - libnet-1.1.5-1.el6.i686.rpm
> >
> >
> >
> >
> > Do you have any suggestions?
> >
> >
> >
> >
> > --
> > Martinas Mihaela-Alexandra
> > _______________________________________________
> > LiSA-Devel mailing list
> > LiSA-Devel at lisa.mindbit.ro
> > http://lisa.mindbit.ro/mailman/listinfo/lisa-devel
>
>
> _______________________________________________
> LiSA-Devel mailing list
> LiSA-Devel at lisa.mindbit.ro
> http://lisa.mindbit.ro/mailman/listinfo/lisa-devel
>



-- 
Martinas Mihaela-Alexandra
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lisa.mindbit.ro/pipermail/lisa-devel/attachments/20130517/fd93ea05/attachment.html 


More information about the LiSA-Devel mailing list