[Winpcap-users] UserBridge sample

Bryan Kadzban bryan at kadzban.is-a-geek.net
Sat Nov 1 16:43:48 GMT 2008


ceo at triplebit.com wrote:
> Following the sample UserBridge, I see that the received packets are 
> sent as is, in the second adapter.
> 
> Since the same packet is sent from another adapter why dosn't the
> code modify the IP source address?

Um, because it's a bridge?  The whole point is to pass the frame along
-- intact! -- to the next device in the chain of bridges between the
source MAC and destination MAC address.  ;-)

(Do your switches modify the IP source addresses of frames that they
forward?  I certainly hope not, or replies would likely go back to the
wrong place.  Switches are, in essence, a bunch of bridges.)

In fact, the *routers* that most traffic passes through on the public
Internet don't even modify the source IP address in the packets that
they see.  They simply decide which interface to send the packet back
out on -- just like a bridge does.

(Bridges operate on layer 2 addresses, and don't even touch layer 3.  In
fact, layer 3 may not even be IP: it may be ARP, or IPX, or PPPoE, or
any one of tons of other protocols.  Also, note that bridges don't
change the L2 addresses either, unless you're doing very strange things
with ARP proxying. They're a lot like routers, just at a different
layer.)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
Url : http://www.winpcap.org/pipermail/winpcap-users/attachments/20081101/9ac5c323/signature.pgp


More information about the Winpcap-users mailing list