tcpdump mailing list archives

Re: mac addr of the destination in linux cooked


From: Ankith Agarwal <ankitha () cdac in>
Date: Wed, 27 Apr 2011 11:37:53 +0530 (IST)

On Wed, Apr 27, 2011, Guy Harris <guy () alum mit edu> said:

For each of the *LAN* interfaces of the system.  Not all interfaces, on all systems, *have* MAC addresses.  You might 
have a PPP interface, for example.

What exactly is your program trying to do?  It might make sense to open a PF_PACKET socket yourself, and get the 
interface index from the sockaddr_ll filled in by recvfrom()


     I am writing a tool for analyzing voip calls remotely. The idea is to
run a pcap instance at the client side and forward all the packets to the
server, for QoS parameter calculation. I have made my own packet format
for forwarding the packets. For this purpose I need to know the interface
from which the rtp packets are arriving. I have taken the mac addresses of
all the LAN interfaces from sys filesystem, and the idea was to compare
this address with the obtained destination mac address of the packet, so
that the interface could be known. Is it feasible to do it this way or is
there any better way to achieve it??

Regards
Ankith 


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.


Current thread: