Forum Discussion
Altera_Forum
Honored Contributor
14 years agoHi Paolo,
That's nice. Can you give me some pointers on how you managed this? I was looking at changing the NicheStack code so that a number of interfaces can be opened (statically, at startup), attached to the same physical port. For this to happen, I am changing the driver software (ins_tse_mac.c) to open up 4 interfaces (modify the init procedure) and then change the stack code (demux.c) to confirm that the interface variable in the NET structure is set correctly - for a Rx packet. To allow me to use socket calls (sendto and recvfrom), I am adding a socket option that would set the interface number for the socket - so that I can send out Tx packets on the proper interface (having the correct IP address). This would allow me to have a general-purpose fix rather than just a "server" services as you mentioned. All this is fairly intrusive and i thought Interniche (or someone else) must have done this already. I still need to demux the packet to the correct socket (on the rx side). I will take a look at the IP filtering code. One other reason for making the changes "interface" based is that I can then use the same code for multiple MAC addresses (using the supplemental addresses of the TSE) or use VLAN capabilities - a unique interface for one VLAN tag or a unique MAC address. What do you think? Any suggestions? -Ravi