Ethernet Port device path?

Hi,

I have a server program that reads data coming in on USB ports. Device paths are in the format: /dev/ttyUSB0

Now, I would like to log data from another device coming in over Ethernet. My first step is trying to track down what the correct device path is which I am unsure of.

Anyone know?

Thanks!

Ethernet devices are not found in /dev, they do not have corresponding device files.

Ah okay makes sense.
Where would I look for them?

You don't. They don't exist. You'll have to write a C program if you want raw access. (darkstat may be useful at showing how to capture all traffic on an ethernet interface.)

okay I will take a look.
thanks

---------- Post updated at 04:37 PM ---------- Previous update was at 04:20 PM ----------

helpful.

I just need to find some sample code on how to establish a connection via TCP/IP on port 22223. I am assuming that this isn't too hard. I will post if I find info.

To what end?

it is data ent out of a instrument. sends out binary packets. i jus want to be aboe to read them.

How does it send these packets? Broadcast?

Wow, sorry that was some terrible typing.
I have an instrument that for some reason sends data out in binary packets via ethernet on a particular port. I am not sure why ethernet is used as I have found that most devices like this one are USB.
I have a fully functioning server application written in C for logging USB output.
I have never worked with ethernet ports before and am looking for resources to beging coding something up.

Thanks!

---------- Post updated at 08:36 AM ---------- Previous update was at 08:33 AM ----------

And in response to your question Corona I am not sure what you mean.

The instrument just puts out data at a given frequency. I believe it is 1Hz by default. So my application would just take whatever is available.

Ethernet is not a serial port. Your USB application is not useful here.

Data over ethernet comes pre-organized into small "packets" which arrive in one piece, labelled with source and destination. If it wasn't from a source your computer was configured to expect, you won't get it. If the destination isn't you, you won't get it. If you're not listening for the correct protocol, you won't get it. It's a network.

Most ethernet data loggers don't send data until you ask them to. If you don't know the address of your data logger and its method of communication, you will need to find out.