"Manuel Rodríguez Cayetano" wrote:
>
> Hello. I am an associated professor at the University of Valladolid
> (Spain) and I would like to use libpcap in our practical classes.
> As is security risk to let our students to use libpcap "as is",
> Could you tell me the changes I have to do in libpcap code to limit the
> number of bytes obtained from an ethernet frame? (for example, only get
> until byte 42th or discard TCP or UDP user data) Thanks in advance.
For a fixed (or maximum) number of bytes, set 'snaplen' in
pcap_open_live(). The particular pcap_open_live() that is compiled
depends on your platform. (they're in pcap-bpf.c, pcap-dlpi.c, etc.)
--gilbert
-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe