LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-15-2014, 06:24 AM   #1
cairn
LQ Newbie
 
Registered: Feb 2014
Posts: 5

Rep: Reputation: Disabled
Mac address and libpcap


I am taking packet data and using libpcap pcap inject method to pass the packet onto another network. This works fine but the mac address in the packet changes to that of the local device been used to relay the packet. Tracing through the libpcap code the inject method calls the standard send() socket method, but from there I loose track of the calls which are updating the mac address. Where in the Linux code is the send() method? and does anybody know what I would need to do to prevent the mac address been over written in the packet.

Thanks in advance
 
Old 02-18-2014, 02:37 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
You can try tcpreplay tool, following link, to replay captured packet. If MAC address issue still come out, you can change interface MAC to match with correct MAC address, in captured packet.
http://tcpreplay.appneta.com/
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I find what MAC address web pages see as my MAC address rob.rice General 20 05-29-2010 02:08 AM
Ethernet MAC Addresses database; MAC address-based processing cctualatin Linux - Newbie 1 04-14-2009 08:59 AM
libpcap mac address ilnli Programming 10 07-25-2007 12:49 AM
how to get ip address, broadcast address, mac address of a machine sumeshstar Programming 2 03-12-2005 04:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration