Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12599 Discussions

Fast ethernet without mac/protocol

Altera_Forum
Honored Contributor II
951 Views

I have a network that is already working and I want ro take this data without filtering, I want to connect my de2-115 board with the phy connectors and only sniff the data. I the same way I have my data already prepared and packed and I only want to put this in the ethernet wire.  

 

How should I do?? I'm pretty lost and I don't know if is necesary and Ip core or not. 

 

Thank you very much!
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
299 Views

What 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.
0 Kudos
Reply