Jason Stevens wrote:
Well, normally libpcap is used to recieve packets, so it don't neccesarily
help with sending them.
Second, sending packets is one thing, sending packets with a "fake" source
MAC address is yet another thing (as a short note, the DEUNA and DELUA
ethernet controllers for the Unibus can never do this. They set the source
MAC address from the controller, no matter what you place in the packet you
want to send).
But please report if you have success with this.
This is what i'm using right now to have two versions of SIMH send
pings to eachother... I added the tcp/ip stuff, and removed all of
the libpcap parts of the code.. I also noticed it uses blocking
sockets so it'll get 'stuck' from time to time reading stuff. I
started work on porting it to windows but I've been away on vacation
so it didn't get any work done...
"ping" sortof implies that you are talking tcp/ip. If so, the test is
meaningless.
TCP/IP don't care about the source MAC address. And destination MAC address is just
used to make the packet end up at the right destination, without any other meaning to it.
And the mapping between destination IP address and MAC address is solved by ARP. And
several different IP addresses can use the same MAC address. Exactly how that MAC address
looks like isn't an issue either. So, for TCP/IP, everything will work fine if you
just use the actual MAC address the card have, even though you might be doing traffic both
from the host, and from a simulator within the host. Reception is a bit worse, since you
need to figure out if the received packet should go to the host or the simulator.
DECnet works in a very different way, where each host *must* have a unique MAC address,
and where the recipient really checks that the source MAC address is consistent with what
was expected, or else the packet is dropped (yes, I'm writing and meaning source
address here). And sending data is done to a specific MAC address without ARP. Instead the
MAC address is calculated from the DECnet address, and is thus "known" already.
For all hosts on the network.
Believe me. You are not really seeing or understanding the problem yet, with the tests you
are doing.
Parts are things you need to read up on, on how DECnet works. And parts you'll only
find out the hard way, as I did. :-)
Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic
trip
email: bqt at softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" -
B. Idol