Re: [tcpdump-workers] request for a DLT for ISO14443
Thus wrote Guy Harris (g...@alum.mit.edu): > On Nov 9, 2015, at 12:29 PM, Martin Kaiser wrote: > > I would like to request a DLT for ISO14443. > > ISO14443 is a set of standards defining the communication protocols > > between a contactless smartcard and a card reader. There are some > > commercially available log tools for capturing such traffic. > I've assigned 264 for LINKTYPE_ISO_14443/DLT_ISO_14443. Thanks. > > I created a webpage at > > http://www.kaiser.cx/pcap-iso14443.html > > that describes the data following the pcap header. > You might want to update it to indicate that this can appear in both > pcap and pcapng files, and perhaps just say that the packet time stamp > must be seconds and fractions of a second since January 1, 1970, > 00:00:00 UTC (not committing to it having microsecond resolution or to > the time stamp having separate second and fraction-of-a-second fields; > both pcap and pcapng can support, for example, nanosecond resolution, > and pcapng time stamps are 64-bit fractions-of-a-second counts). > You might also want to do the same for your DVB-CI page at > http://www.kaiser.cx/pcap-dvbci.html. I updated both pages to mention pcapng and simplified the paragraphs about time stamps. All I wanted to say about time stamps is that they should be compliant to the pcap(ng) specifications. ___ tcpdump-workers mailing list tcpdump-workers@lists.tcpdump.org https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers
[tcpdump-workers] Cannot find -lpcap when statically compiling a C project
I want to statically compile a C project in a laptop(fedora), using command line like: gcc -o myprogram -static main.c ... -levent -lpcap but I get error: /usr/bin/ld: cannot find -lpcap /usr/bin/ld: cannot find -lc I tried to locate libpcap.a and find no such a file if I compile dynamically, it successfully produces an executable ldd relay linux-vdso.so.1 => (0x7fff4bfaf000) libevent-1.4.so.2 => /lib/libevent-1.4.so.2 (0x7f14053a5000) libpcap.so.1 => /lib64/libpcap.so.1 (0x0035b4a0) libc.so.6 => /lib64/libc.so.6 (0x0035b0a0) libnsl.so.1 => /lib64/libnsl.so.1 (0x0035cea0) librt.so.1 => /lib64/librt.so.1 (0x0035b1a0) libresolv.so.2 => /lib64/libresolv.so.2 (0x0035b2e0) /lib64/ld-linux-x86-64.so.2 (0x0035b020) libpthread.so.0 => /lib64/libpthread.so.0 (0x0035b160) This executable only works in this laptop. If I compile the project in other laptops, it doesn't work properly(the libpcap can't capture all packets successfully, I don't know why). So I think the libpcap in this laptop may plays an important role and this is why I really want to compile it statically in this laptop. Are there anyways for me to statically compile in this very laptop. Or how can I find the libpcap.a on Internet with the same version? ___ tcpdump-workers mailing list tcpdump-workers@lists.tcpdump.org https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers
Re: [tcpdump-workers] Cannot find -lpcap when statically compiling a C project
On Nov 19, 2015, at 3:29 PM, liu wen wrote: > I want to statically compile a C project in a laptop(fedora), using command > line like: > > gcc -o myprogram -static main.c ... -levent -lpcap > > but I get error: > > /usr/bin/ld: cannot find -lpcap > /usr/bin/ld: cannot find -lc > > I tried to locate libpcap.a and find no such a file See if there are libpcap RPMs that you haven't installed, perhaps one with a name like "libpcap-dev" or something with "-dev" in the name, although usually "-dev" packages include both static libraries and header files, so without the "-dev" package you won't be able to compile anything. Perhaps Fedora has separate packages for the libpcap runtime (shared libraries), libpcap development (headers), and libpcap static libraries. However, "cannot find -lc" means it also doesn't have a static version of libc, so you'll also have to find a Fedora package with a static version of libc. > if I compile dynamically, it successfully produces an executable > > ldd relay > linux-vdso.so.1 => (0x7fff4bfaf000) > libevent-1.4.so.2 => /lib/libevent-1.4.so.2 (0x7f14053a5000) > libpcap.so.1 => /lib64/libpcap.so.1 (0x0035b4a0) > libc.so.6 => /lib64/libc.so.6 (0x0035b0a0) > libnsl.so.1 => /lib64/libnsl.so.1 (0x0035cea0) > librt.so.1 => /lib64/librt.so.1 (0x0035b1a0) > libresolv.so.2 => /lib64/libresolv.so.2 (0x0035b2e0) > /lib64/ld-linux-x86-64.so.2 (0x0035b020) > libpthread.so.0 => /lib64/libpthread.so.0 (0x0035b160) > > > This executable only works in this laptop. Probably because either 1) the other laptops are running the same version of Fedora but don't have all those shared libraries installed or 2) they're running some other OS, so that the libraries have different pathnames. As far as I know, there's not much binary compatibility between different Linux distributions for anything other than programs with no dynamic libraries; there *might* be some level of binary compatibility allowing software compiled for older versions of a distribution to run on newer versions. > If I compile the project in > other laptops, it doesn't work properly(the libpcap can't capture all > packets successfully, I don't know why). I.e., if you compile it on another machine, it doesn't even work on *that* machine? What does "tcpdump -h" print on the laptop where the build works and on the laptops where it doesn't? ___ tcpdump-workers mailing list tcpdump-workers@lists.tcpdump.org https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers
Re: [tcpdump-workers] Cannot find -lpcap when statically compiling a C project
On Fri, Nov 20, 2015 at 12:52 AM, Guy Harris wrote: > > On Nov 19, 2015, at 3:29 PM, liu wen wrote: > > > I want to statically compile a C project in a laptop(fedora), using > command > > line like: > > > > gcc -o myprogram -static main.c ... -levent -lpcap > > > > but I get error: > > > > /usr/bin/ld: cannot find -lpcap > > /usr/bin/ld: cannot find -lc > > > > I tried to locate libpcap.a and find no such a file > > See if there are libpcap RPMs that you haven't installed, perhaps one with > a name like "libpcap-dev" or something with "-dev" in the name, although > usually "-dev" packages include both static libraries and header files, so > without the "-dev" package you won't be able to compile anything. Perhaps > Fedora has separate packages for the libpcap runtime (shared libraries), > libpcap development (headers), and libpcap static libraries. > # locate libpcap-dev /var/lib/yum/yumdb/l/75ed44a0adeee36906852424e93dafd3a950ae77-libpcap-devel-1.3.0-2.fc18-x86_64 /var/lib/yum/yumdb/l/75ed44a0adeee36906852424e93dafd3a950ae77-libpcap-devel-1.3.0-2.fc18-x86_64/changed_by /var/lib/yum/yumdb/l/75ed44a0adeee36906852424e93dafd3a950ae77-libpcap-devel-1.3.0-2.fc18-x86_64/checksum_data /var/lib/yum/yumdb/l/75ed44a0adeee36906852424e93dafd3a950ae77-libpcap-devel-1.3.0-2.fc18-x86_64/checksum_type /var/lib/yum/yumdb/l/75ed44a0adeee36906852424e93dafd3a950ae77-libpcap-devel-1.3.0-2.fc18-x86_64/command_line /var/lib/yum/yumdb/l/75ed44a0adeee36906852424e93dafd3a950ae77-libpcap-devel-1.3.0-2.fc18-x86_64/from_repo /var/lib/yum/yumdb/l/75ed44a0adeee36906852424e93dafd3a950ae77-libpcap-devel-1.3.0-2.fc18-x86_64/from_repo_revision /var/lib/yum/yumdb/l/75ed44a0adeee36906852424e93dafd3a950ae77-libpcap-devel-1.3.0-2.fc18-x86_64/from_repo_timestamp /var/lib/yum/yumdb/l/75ed44a0adeee36906852424e93dafd3a950ae77-libpcap-devel-1.3.0-2.fc18-x86_64/installed_by /var/lib/yum/yumdb/l/75ed44a0adeee36906852424e93dafd3a950ae77-libpcap-devel-1.3.0-2.fc18-x86_64/reason /var/lib/yum/yumdb/l/75ed44a0adeee36906852424e93dafd3a950ae77-libpcap-devel-1.3.0-2.fc18-x86_64/releasever what commands/steps should I follow so as to get the libpcap.a? > > However, "cannot find -lc" means it also doesn't have a static version of > libc, so you'll also have to find a Fedora package with a static version of > libc. > how can I find a static version of libc? > > > if I compile dynamically, it successfully produces an executable > > > > ldd relay > > linux-vdso.so.1 => (0x7fff4bfaf000) > > libevent-1.4.so.2 => /lib/libevent-1.4.so.2 (0x7f14053a5000) > > libpcap.so.1 => /lib64/libpcap.so.1 (0x0035b4a0) > > libc.so.6 => /lib64/libc.so.6 (0x0035b0a0) > > libnsl.so.1 => /lib64/libnsl.so.1 (0x0035cea0) > > librt.so.1 => /lib64/librt.so.1 (0x0035b1a0) > > libresolv.so.2 => /lib64/libresolv.so.2 (0x0035b2e0) > > /lib64/ld-linux-x86-64.so.2 (0x0035b020) > > libpthread.so.0 => /lib64/libpthread.so.0 (0x0035b160) > > > > > > This executable only works in this laptop. > > Probably because either > > 1) the other laptops are running the same version of Fedora but > don't have all those shared libraries installed > > or > > 2) they're running some other OS, so that the libraries have > different pathnames. > > As far as I know, there's not much binary compatibility between different > Linux distributions for anything other than programs with no dynamic > libraries; there *might* be some level of binary compatibility allowing > software compiled for older versions of a distribution to run on newer > versions. > > > If I compile the project in > > other laptops, it doesn't work properly(the libpcap can't capture all > > packets successfully, I don't know why). > > I.e., if you compile it on another machine, it doesn't even work on *that* > machine? > yes, if I compile it on the other machine, it still doesn't work (it doesn't capture all passing-by packets on that machine) > What does "tcpdump -h" print on the laptop where the build works and on > the laptops where it doesn't? it doesn't works on laptop of tcpdump version 4.5.1 libpcap version 1.5.3 it works on laptop of tcpdump version 4.3.0 libpcap version 1.3.0 ___ tcpdump-workers mailing list tcpdump-workers@lists.tcpdump.org https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers
Re: [tcpdump-workers] Cannot find -lpcap when statically compiling a C project
On Nov 19, 2015, at 4:35 PM, liu wen wrote: > On Fri, Nov 20, 2015 at 12:52 AM, Guy Harris wrote: > >> On Nov 19, 2015, at 3:29 PM, liu wen wrote: >> >>> I want to statically compile a C project in a laptop(fedora), using command >>> line like: >>> >>> gcc -o myprogram -static main.c ... -levent -lpcap >>> >>> but I get error: >>> >>> /usr/bin/ld: cannot find -lpcap >>> /usr/bin/ld: cannot find -lc >>> >>> I tried to locate libpcap.a and find no such a file >> >> See if there are libpcap RPMs that you haven't installed, perhaps one with a >> name like "libpcap-dev" or something with "-dev" in the name, although >> usually "-dev" packages include both static libraries and header files, so >> without the "-dev" package you won't be able to compile anything. Perhaps >> Fedora has separate packages for the libpcap runtime (shared libraries), >> libpcap development (headers), and libpcap static libraries. > > # locate libpcap-dev > /var/lib/yum/yumdb/l/75ed44a0adeee36906852424e93dafd3a950ae77-libpcap-devel-1.3.0-2.fc18-x86_64 > /var/lib/yum/yumdb/l/75ed44a0adeee36906852424e93dafd3a950ae77-libpcap-devel-1.3.0-2.fc18-x86_64/changed_by > /var/lib/yum/yumdb/l/75ed44a0adeee36906852424e93dafd3a950ae77-libpcap-devel-1.3.0-2.fc18-x86_64/checksum_data > /var/lib/yum/yumdb/l/75ed44a0adeee36906852424e93dafd3a950ae77-libpcap-devel-1.3.0-2.fc18-x86_64/checksum_type > /var/lib/yum/yumdb/l/75ed44a0adeee36906852424e93dafd3a950ae77-libpcap-devel-1.3.0-2.fc18-x86_64/command_line > /var/lib/yum/yumdb/l/75ed44a0adeee36906852424e93dafd3a950ae77-libpcap-devel-1.3.0-2.fc18-x86_64/from_repo > /var/lib/yum/yumdb/l/75ed44a0adeee36906852424e93dafd3a950ae77-libpcap-devel-1.3.0-2.fc18-x86_64/from_repo_revision > /var/lib/yum/yumdb/l/75ed44a0adeee36906852424e93dafd3a950ae77-libpcap-devel-1.3.0-2.fc18-x86_64/from_repo_timestamp > /var/lib/yum/yumdb/l/75ed44a0adeee36906852424e93dafd3a950ae77-libpcap-devel-1.3.0-2.fc18-x86_64/installed_by > /var/lib/yum/yumdb/l/75ed44a0adeee36906852424e93dafd3a950ae77-libpcap-devel-1.3.0-2.fc18-x86_64/reason > /var/lib/yum/yumdb/l/75ed44a0adeee36906852424e93dafd3a950ae77-libpcap-devel-1.3.0-2.fc18-x86_64/releasever > > what commands/steps should I follow so as to get the libpcap.a? You might have to build it from source, because the Fedora people don't like static libraries: https://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Static_Libraries https://bugzilla.redhat.com/show_bug.cgi?id=248813 >> However, "cannot find -lc" means it also doesn't have a static version of >> libc, so you'll also have to find a Fedora package with a static version of >> libc. > > how can I find a static version of libc? You might have to build it from source, because the Fedora people don't like static libraries. However, they might have decided to allow a static version of libc: http://www.xinotes.net/notes/note/1025/ If that works, try looking for a libpcap-static package, but there might not be one. ___ tcpdump-workers mailing list tcpdump-workers@lists.tcpdump.org https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers