tcpdump on uClinux run “No such d evice”
zhou <[email protected]>
| Newsgroups | gmane.linux.uclinux.devel |
|---|---|
| Message-ID | <CAA5+GXzqbytyRSWfS=czzO+0r1NJk5Q86ZV1nxRBggKVp3mWZQ@mail.gmail.com> |
tcpdump on uClinux run “No Such device”
kernel linux-3.x uClinux,the target CPU is Cortex R7,
#tcpdump -i any
munmap of memory not mmapped by process 383 (tcpdump): 0xffffffff -0x20bffe
tcpdump: any: can't mmap rx ring: No such device
I check source code,libpcap.a source file Pcap-linux.c function
create_ring() print this error,handle->fd is socket handle.
/* memory map the rx ring */
handle->md.mmapbuflen = req.tp_block_nr * req.tp_block_size;
handle->md.mmapbuf = mmap(0, handle->md.mmapbuflen,
PROT_READ|PROT_WRITE, MAP_SHARED, handle->fd, 0);
if (handle->md.mmapbuf == MAP_FAILED) {
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
"can't mmap rx ring: %s", pcap_strerror(errno));
/* clear the allocated ring on error*/
destroy_ring(handle);
return -1;
}
the further reason is mm/nommu.c validate_mmap_request() return -ENODEV in
kernel
if (!(capabilities & BDI_CAP_MAP_DIRECT)
return -ENODEV;
Can tcpdump run on uClinux and how?
PS.
I have configured CONFIG_PACKET=y and CONFIG_PACKET_DIAG=y linux kernel
.config,I can not find CONFIG_PACKET_MMAP
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev