sockets - How to find to which line(eth0 or eth1) a packet received belongs to ?

Newbie Member
11Jan2012,19:05   #1
liuxgate's Avatar
hi,
i've two lines - eth0 and eth1 on my board and using tcp sockets. I've used INADDR_ANY in bind(). I get packets on
both eth0 and eth1. How to find to which line(eth0 or eth1) a packet received belongs to ? OS - linux

Thanks & Regards,
liuxgate