Thanks for your confirmation.
There is another error when I compile libpcap-1.0.0-ring.  The error is:
"
xscale-linux-gcc -O2 -fPIC -I.  -I ../../kernel -I ../lib -DHAVE_CONFIG_H  
-D_U_="__attribute__((unused))" -c bpf_filter.c
bpf_filter.c:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before 
‘.’ token
make: *** [bpf_filter.o] Error 1
"

The content of bpf_filter.c is: link ./bpf/net/bpf_filter.c

I have two questions:

(1) What's the mean of this line in C language?

(2) How to solve this error?

Thanks!


在2010-05-07 17:29:15,"saxon elf" <[email protected]> 写道:


Hi Sam: 
    The rdtsc function used to get system time more precision which hardware 
system base on the Intel / AMD Arch. 
    And this form of code  " asm volatile("rdtsc":"=A" (a)); " not support ARM 
arch.
    And in the PF_RING kernel code, there have some preprocesser to use the 
rdtsc but the user space code does not use it, so if you compile the PF_RING 
kernel code successfully I think you can comment this line too. 
    Good luck.


Hi Luca,

I comment the line about “asm” in pfring.c, and now the rdtsc() function 
becomes:
"
unsigned long long rdtsc() 
{ 
    unsigned long long a; 
    // asm volatile("rdtsc":"=A" (a));
    return(a); 
} 

"
It can pass the compile.
I have searched other *.h && *.c files, and there is no place to invoke 
rdtsc().  So I guess it doesn't matter to comment this line.  But I still need 
your confirmation about my guess.  Thanks very much!  

BR.
Sam



_______________________________________________
Ntop-misc mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-misc

Reply via email to