473,397 Members | 2,116 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,397 software developers and data experts.

Selects eth device to send/receive

Hello,

If there are two ethernet device, how I can select a device to send/receive?

Actually I want to do loopback test between twe ethernet device.
Send a UDP packet through eth0 and receives that packet from eth1 device.
And vice versa.

Regards,
namsh
Aug 20 '07 #1
5 2148
SungHyun Nam wrote:
Hello,

If there are two ethernet device, how I can select a device to send/receive?
Asking on a platform specific group would be a good start.

--
Ian Collins.
Aug 20 '07 #2
Ian Collins wrote:
SungHyun Nam wrote:
>Hello,

If there are two ethernet device, how I can select a device to
send/receive?
Asking on a platform specific group would be a good start.
If there're two diferent NICs, then they will have different IP's (if you\re
talking about TCP/IP).
So, when receive you need to specify the NIC address, not the INADDR_ANY,
anf to send you must specify address of the desired NIC.

Aug 20 '07 #3
In article <fa**********@aioe.org>,
Ivan Gotovchits <iv*************@auriga.ru, cr*****@gmail.comwrote:
>Ian Collins wrote:
>SungHyun Nam wrote:
>>If there are two ethernet device, how I can select a device to
send/receive?
>Asking on a platform specific group would be a good start.
>If there're two diferent NICs, then they will have different IP's (if you\re
talking about TCP/IP).
No, that's merely how it happens on the systems you've encountered.
IP addresses need not be associated with particular NICs -- and
*aren't*, once you get into high-reliability systems which have to
keep going smoothly even when individual NICs fail (or their
network link goes down.)
--
Is there any thing whereof it may be said, See, this is new? It hath
been already of old time, which was before us. -- Ecclesiastes
Aug 20 '07 #4
Walter Roberson wrote:
In article <fa**********@aioe.org>,
Ivan Gotovchits <iv*************@auriga.ru, cr*****@gmail.comwrote:
>>Ian Collins wrote:
>>SungHyun Nam wrote:
>>>If there are two ethernet device, how I can select a device to
send/receive?
>>Asking on a platform specific group would be a good start.
>>If there're two diferent NICs, then they will have different IP's (if
you\re talking about TCP/IP).

No, that's merely how it happens on the systems you've encountered.
IP addresses need not be associated with particular NICs -- and
*aren't*, once you get into high-reliability systems which have to
keep going smoothly even when individual NICs fail (or their
network link goes down.)
So, can you specify what stack do you use? Because it is really
stack-dependent question, or even platform dependend if it is not POSIX
stack.
Or you can use multicast or broadcast addresses and send messages containing
some magic numbers defining the NIC that sends it. So you can verify that
all transmissions was ok.
Aug 20 '07 #5
Ivan Gotovchits wrote:
Ian Collins wrote:
>SungHyun Nam wrote:
>>>
If there are two ethernet device, how I can select a device to
send/receive?
Asking on a platform specific group would be a good start.

If there're two diferent NICs, then they will have different IP's
(if you\re talking about TCP/IP). So, when receive you need to
specify the NIC address, not the INADDR_ANY, anf to send you must
specify address of the desired NIC.
Please don't even attempt to answer OT queries on c.l.c. The
experts to correct mistakes are not present here. Limit your
response to advice on what newsgroups to ask on.

--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>

--
Posted via a free Usenet account from http://www.teranews.com

Aug 20 '07 #6

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

Similar topics

1
by: tomseye | last post by:
I have a simple form to collect user selections in html form. I am pretty new to php...how can I send the user's checkbox selects to me in an email...I am struggling with buiding an array to send...
2
by: Jody Burgess | last post by:
Hi; I am writing my first python program and would like to know how to change stdout to refer to my default printer or any other printer on my network. The other question is, Is there an API set...
4
by: Maya Young | last post by:
Hello Everyone, I'm trying to create a C# application to open a serial port connected to a mobile device and control the mobile through the application where the user can dial the number, send...
1
by: Kitchen Bin | last post by:
Hi. I am trying to use Sockets to do multiple Send and Receives via HTTP (not simultaneously). A first pair of Send/Receives works fine and sure enough I receive HTML back, but the next...
9
by: Paul Steele | last post by:
I am writing a C# app that needs to periodically poll for cdroms and usb storage device insertions. I've looked at the WMI functions but haven't found anything all that useful. The closest is...
13
by: Manfred Braun | last post by:
Hi All, I am trying to understand the blocking method socket.Send(). The call blocks as expected, but does this mean, it returnes after the underlying TCP layer got a confirmation, that the send...
1
by: Matt | last post by:
We have an Intermec stationary computers setup to basically clock people in and out... I have code running (borrowed from Planet Source Code and modified to suit) to receive packets from these...
4
by: JDS | last post by:
I have an application that interfaces with a USB device using the .Net serial port. The code works fine, displaying live data on the screen; that is until the USB lead is pulled out from the PC...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.