Forum Discussion
Altera_Forum
Honored Contributor
13 years agoWhat ip stack are you using?
This is what I once did with nichestack and TSE MACs, but it also works with other environments, provided the driver structure is the same. First, you must get the NET pointer for your target network. Say you have declared NET mynet; After you have correctly assigned mynet pointer, you can access the following functions: mynet->pkt_send() // send a packet format mynet->raw_send() // send raw data, i.e. buffer, len These let you directly send on the network anything you want. Sniffing incoming data is a bit more tricky because it depends on your network stack and MAC driver. You have to find the best point for accessing rx data: it could be directly the MAC rx isr/poll or some convenient function in the ip stack. I'm afraid you have to make changes in library files; AFAIK there's no way to make it otherwise. Although I'm not completely sure on this point: maybe someone else has better advice.