How to write and read on network interfaces?

Discussion in 'C++' started by fabrizio, Dec 7, 2005.

  1. fabrizio

    fabrizio Guest

    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
     
    fabrizio, Dec 7, 2005
    #1
    1. Advertising

  2. fabrizio

    mlimber Guest

    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-lite/how-to-post.html#faq-5.9

    Cheers! --M
     
    mlimber, Dec 7, 2005
    #2
    1. Advertising

  3. "fabrizio" <> 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
     
    Niklas Norrthon, Dec 7, 2005
    #3
  4. fabrizio

    fabrizio Guest

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

    mlimber Guest

    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
     
    mlimber, Dec 7, 2005
    #5
  6. fabrizio

    mlimber Guest

    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.lang.c /browse_frm/thread/a0beda2e7d2c9f6e/0343134853383fef

    Cheers! --M
     
    mlimber, Dec 7, 2005
    #6
  7. 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
     
    Larry I Smith, Dec 8, 2005
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matthew K Jensen

    detecting enabled network interfaces in win32

    Matthew K Jensen, Oct 17, 2004, in forum: Python
    Replies:
    4
    Views:
    479
    Tim Golden
    Oct 18, 2004
  2. AAaron123

    SQL Network Interfaces, error: 26

    AAaron123, Jul 17, 2008, in forum: ASP .Net
    Replies:
    15
    Views:
    2,804
    AAaron123
    Jul 20, 2008
  3. Alessio Pace
    Replies:
    0
    Views:
    640
    Alessio Pace
    Jan 7, 2009
  4. oceandeep

    read and write file from network drive (NAS)

    oceandeep, Jun 27, 2005, in forum: ASP .Net Security
    Replies:
    3
    Views:
    674
    Paul Clement
    Jun 28, 2005
  5. sahm
    Replies:
    4
    Views:
    690
Loading...

Share This Page