In case the previous post didn't answer your question, a quick google search of something I recall reveals:
http://www.ibiblio.org/peanut/Kernel...ng/ifenslave.c
search it for "ifr.ifr_name" and you'll find a bunch of good stuff you can use as hints for further google searches or "man" page lookups.
Basically, you can, I think, set "ifr.ifr_name" in the struct ifreq to "eth0" or "eth1" and use that to get the "if_index" I think it is, that you set in one of them struct sockaddr, thingies.. then you can bind a socket to a particular interface/card and pick up things solely on that interface and conceivably, using the same method, place them on the other interface.