[Oisf-devel] [PATCH 0/2] lighten Packet structure v2
Eric Leblond
eleblond at edenwall.com
Mon Nov 22 11:07:21 UTC 2010
Hi,
Le lundi 22 novembre 2010 à 12:00 +0100, Victor Julien a écrit :
> go.ph1g at gmail.com wrote:
> > Is it possible to check the MTU on the listening interface and set it
> > that way? I don't know if all devices support it or whether it would be
> > headache to manage cross platform. I can see where pcap-snoop has a
> > method to get the MTU for IRIX interfaces.
> >
> > http://www.opensource.apple.com/source/libpcap/libpcap-18/libpcap/pcap-snoop.c
> >
> > #ifdef SIOCGIFMTU
> > /*
> > * XXX - IRIX appears to give you an error if you try to set the
> > * capture length to be greater than the MTU, so let's try to get
> > * the MTU first and, if that succeeds, trim the snap length
> > * to be no greater than the MTU.
> > */
> > (void)strncpy(ifr.ifr_name, device, sizeof(ifr.ifr_name));
> > if (ioctl(fd, SIOCGIFMTU, (char *)&ifr) < 0) {
> > snprintf(ebuf, PCAP_ERRBUF_SIZE, "SIOCGIFMTU: %s",
> > pcap_strerror(errno));
> > goto bad;
> > }
> > /*
>
> I like this idea. What do you think Eric?
This seems to be a great default if pcap is used.
I will add this to the patchset to be resent.
BR,
--
Éric Leblond, eleblond at edenwall.com
Téléphone : +33 1 40 24 65 04, Fax : +33 9 57 21 48 75
EdenWall, http://www.edenwall.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Ceci est une partie de message numériquement signée
URL: <http://lists.openinfosecfoundation.org/pipermail/oisf-devel/attachments/20101122/76554ac4/attachment.sig>
More information about the Oisf-devel
mailing list