How to write and read on network interfaces?

F

fabrizio

I've to write an applications which emulates the network, so this
application must write and read all the data passing on network
interfaces like eth0 and tap0(virtual ethernet interface). How can I
do?
I've configured tap0 with

debian:/home/fabrizio# tunctl -u root
Set 'tap0' persistent and owned by uid 0

so I don't have the device file "/dev/tap0" to pass to function open(),
however eth0 doesn't have the node /dev/eth0.
Thanks.
Greetings
 
M

mlimber

fabrizio said:
I've to write an applications which emulates the network, so this
application must write and read all the data passing on network
interfaces like eth0 and tap0(virtual ethernet interface). How can I
do?
I've configured tap0 with

debian:/home/fabrizio# tunctl -u root
Set 'tap0' persistent and owned by uid 0

so I don't have the device file "/dev/tap0" to pass to function open(),
however eth0 doesn't have the node /dev/eth0.
Thanks.
Greetings

You should ask this question in a Linux newsgroup as it is off-topic
here. See the FAQ for what is on-topic and for some suggestions of
where to post:

http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.9

Cheers! --M
 
N

Niklas Norrthon

fabrizio said:
I've to write an applications which emulates the network, so this
application must write and read all the data passing on network
interfaces like eth0 and tap0(virtual ethernet interface). How can I
do?
I've configured tap0 with

debian:/home/fabrizio# tunctl -u root
Set 'tap0' persistent and owned by uid 0

so I don't have the device file "/dev/tap0" to pass to function open(),
however eth0 doesn't have the node /dev/eth0.

And your C++ question is...?

Perhaps you meant to post to comp.unix.programmer.

/Niklas Norrthon
 
F

fabrizio

Maybe you didn't understand, but I've to write a C++ application which
should do what write above. Thanks however.
 
M

mlimber

fabrizio said:
Maybe you didn't understand, but I've to write a C++ application which
should do what write above. Thanks however.

An excerpt from the link I posted on what is on-topic in this C++
*language* newsgroup:

"[Y]our question must be answerable by looking into the C++ language
definition as determined by the ISO/ANSI C++ Standard document, and by
planned extensions and adjustments. Operating-specific questions (e.g.,
about Windows NT / 95 / 3.x, UNIX, etc.) should go to an
operating-system-specific newsgroup (see below), *not* to
comp.lang.c++."

That fact that your application is in C++ does not mean it is
necessarily on-topic here, and unless I do misunderstand you, yours is
an OS-specific issue, not a C++ *language* issue.

Cheers! --M
 
M

mlimber

mlimber said:
fabrizio said:
Maybe you didn't understand, but I've to write a C++ application which
should do what write above. Thanks however.

An excerpt from the link I posted on what is on-topic in this C++
*language* newsgroup:

"[Y]our question must be answerable by looking into the C++ language
definition as determined by the ISO/ANSI C++ Standard document, and by
planned extensions and adjustments. Operating-specific questions (e.g.,
about Windows NT / 95 / 3.x, UNIX, etc.) should go to an
operating-system-specific newsgroup (see below), *not* to
comp.lang.c++."

That fact that your application is in C++ does not mean it is
necessarily on-topic here, and unless I do misunderstand you, yours is
an OS-specific issue, not a C++ *language* issue.

Cheers! --M

As for a C++ answer, how about the one you already got:

http://groups.google.com/group/comp.lang.c++/browse_frm/thread/a0beda2e7d2c9f6e/0343134853383fef

Cheers! --M
 
L

Larry I Smith

fabrizio said:
I've to write an applications which emulates the network, so this
application must write and read all the data passing on network
interfaces like eth0 and tap0(virtual ethernet interface). How can I
do?
I've configured tap0 with

debian:/home/fabrizio# tunctl -u root
Set 'tap0' persistent and owned by uid 0

so I don't have the device file "/dev/tap0" to pass to function open(),
however eth0 doesn't have the node /dev/eth0.
Thanks.
Greetings

You may get some answers if you post your question to
this newsgroup:

comp.os.linux.development.system

Regards,
Larry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top