473,395 Members | 1,412 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How to write and read on network interfaces?

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

Dec 7 '05 #1
6 5263
fabrizio wrote:
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-lit...t.html#faq-5.9

Cheers! --M

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

Dec 7 '05 #3
fabrizio wrote:
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

Dec 7 '05 #4
mlimber wrote:
fabrizio wrote:
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....43134853383fef

Cheers! --M

Dec 7 '05 #5
"fabrizio" <fa*************@gmail.com> writes:
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
Dec 7 '05 #6
fabrizio wrote:
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
Dec 8 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Mark Szlazak | last post by:
All files that I will be referring to are in the same file folder. I need my javascipt file to write or save the contents of a textarea to other local files. This is for local use only on one...
2
by: Alex | last post by:
Yes you can: <html><head><script language="javascript"> SaveToFile('This is a text to save in a file', 'C:\\temp\\test.txt'); alert(read('C:\\temp\\test.txt')); function SaveToFile (text,...
3
by: broli85 | last post by:
I am writing an extension for Firefox 1.5. I would like to know if there is a way to write and read data to and from a file which is in the location of the extension (or somewhere in the user's...
8
by: rongchaua | last post by:
Hi all, i would like now to disable and enable network adapter programmatically with c#. I have searched but found nothing useful. There's no topic about this problem. Has someone done with this...
2
by: Joshua Beall | last post by:
Hi All, I've got a utility I'm working on, and I want to be able to list for the user all the current network interfaces on the machine. Is there a way to do this in PHP? PHP 5.0.3, Mandriva...
12
by: Sean Davis | last post by:
I am working on a simple script to read from one database (oracle) and write to another (postgresql). I retrieve the data from oracle in chunks and drop the data to postgresql continuously. The...
14
by: Frank | last post by:
I see that ImageFormat includes exif. But I can't find out if I've System.Drawing.Image.FromStream or something like it can read and/or write that format.
2
by: Dave | last post by:
Hi everyone, I've got a program which sends UDP data which works perfectly on my PC but not on my laptop. The problem experienced is that sometimes on the laptop packets that I send just...
5
by: DotNetDanny | last post by:
Hello Machine: Windows Vista Business, standalone machine (no domain). Installed an old classic ASP webapplication in IIS7, running under a new app.pool with 'NETWORK SERVICE' account (using...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.