| |
 |
|
|
Linux Forum Index » Linux Networking » Source MAC address per IP packet...
Page 1 of 1
|
| Author |
Message |
| ... |
Posted: Sun Jun 15, 2008 9:02 am |
|
|
|
Guest
|
Hello,
for a networking application, I need to set the source MAC address
individually
for every IP packet that I send. Is this possible at all? I know that
the MAC address
can be changed in software but per IP frame? On the other hand, every
layer 2
switch does exactly this, so it must be possible in principle. Do I
need special
network controller chips that support this feature? All datasheets of
ethernet
controllers I got hands on allow you to program the MAC address but it
is then
automatically filled in for every packet.
Also, how would the programming side look like? I presume I must use
RAW sockets
but in which field would I set the source MAC address?
Thanks,
Albrecht |
|
|
| Back to top |
|
| Burkhard Ott... |
Posted: Tue Aug 12, 2008 2:31 am |
|
|
|
Guest
|
Am Sun, 10 Aug 2008 10:51:49 -0700 schrieb hat-trick:
Quote: On Jun 15, 3:02 pm, albrechtuhlm... at (no spam) gmx.net wrote:
for every IP packet that I send. Is this possible at all? I know that
the MAC address
can be changed in software but per IP frame? On the other hand, every
layer 2
controllers I got hands on allow you to program the MAC address but it
is then
automatically filled in for every packet.
Also, how would the programming side look like? I presume I must use
RAW sockets
but in which field would I set the source MAC address?
What about /usr/src/linux/if_ether.h ?
(struct ethhdr)
You can set the MAC address to what ever you want.
cheers |
|
|
| Back to top |
|
| |
|
Page 1 of 1
All times are GMT - 5 Hours
The time now is Sat Nov 22, 2008 6:17 am
|
|