It's simpler than that: it actually has the host logic in it. It simulates how the TCP/IP stack of the host would behave if I had gotten a ping package, for example. Same for hub/switch: it simulates how these guys would behave if they got Ethernet frames from hosts.