I want to create a UDP socket that receives broadcast messages only from
a specific network device (in case there are more than one network
devices).
When I bind the socket to INADDR_ANY I receive all messages, but when I
bind to a specific IP address, no broadcast messages are received at all
on IRIX or Linux. On Windows2K it works like I expected.
I still have to test it on a Unix machine with two network cards, but I
think binding to a specific address should work also with only one.
Note that when I use INADDR_ANY on Windows with two network cards each
connected to a seperate network, I receive each message twice on the
same socket!! That's why INADDR_ANY in combination with different UDP
ports for both netwoks is not an option.
Does anyone has experience with multiple network devices?? 5 9385
Roger Jansen <xx*@fel.tno.nl> scribbled the following: I want to create a UDP socket that receives broadcast messages only from a specific network device (in case there are more than one network devices).
Stop right there. ISO standard C specifies no networking facilities
whatsoever. At least these terms in your message are not specified by
the C standard: "UDP", "socket", "receive", "broadcast", "message",
"network" and "device".
Please ask in a newsgroup dedicated to your own platform.
--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ---------------------------\
| Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
| http://www.helsinki.fi/~palaste W++ B OP+ |
\----------------------------------------- Finland rules! ------------/
"How come even in my fantasies everyone is a jerk?"
- Daria Morgendorfer
Joona I Palaste wrote: Roger Jansen <xx*@fel.tno.nl> scribbled the following: I want to create a UDP socket that receives broadcast messages only from a specific network device (in case there are more than one network devices).
Stop right there. ISO standard C specifies no networking facilities whatsoever. At least these terms in your message are not specified by the C standard: "UDP", "socket", "receive", "broadcast", "message", "network" and "device". Please ask in a newsgroup dedicated to your own platform.
I thought this was a C newsgroup and bind() is C function on every
platform I know. Maybe rename this group to comp.lang.iso-standard-c
where people can only ask general questions who don't have an
iso-standard-C manual?
Roger Jansen <xx*@fel.tno.nl> writes: Joona I Palaste wrote: Roger Jansen <xx*@fel.tno.nl> scribbled the following: I want to create a UDP socket that receives broadcast messages only from a specific network device (in case there are more than one network devices). Stop right there. ISO standard C specifies no networking facilities whatsoever. At least these terms in your message are not specified by the C standard: "UDP", "socket", "receive", "broadcast", "message", "network" and "device". Please ask in a newsgroup dedicated to your own platform. I thought this was a C newsgroup
It is.
and bind() is C function on every platform I know.
This may well be the case, but that only means you don't know many
platforms. :)
Just to name a few, neither my washing machine, nor my microwave oven, nor
my CD player, nor my radio receiver has or needs a `bind' function.
Maybe rename this group to comp.lang.iso-standard-c where people can only ask general questions who don't have an iso-standard-C manual?
It is not true that only general questions are on-topic here. Specific
questions about the C language are very welcome.
Martin
Roger Jansen <xx*@fel.tno.nl> wrote: Joona I Palaste wrote: Roger Jansen <xx*@fel.tno.nl> scribbled the following: I want to create a UDP socket that receives broadcast messages only from a specific network device (in case there are more than one network devices). Stop right there. ISO standard C specifies no networking facilities whatsoever. At least these terms in your message are not specified by the C standard: "UDP", "socket", "receive", "broadcast", "message", "network" and "device". Please ask in a newsgroup dedicated to your own platform. I thought this was a C newsgroup
Yes, but...
and bind() is C function on every platform I know.
....you can't know very many platforms, then. Ever programmed an elevator
controller? A Sinclair QL? Hell, ever even seen a DOS prompt?
Maybe rename this group to comp.lang.iso-standard-c
That's an old joke. In any case, there are more than enough newsgroups
for specific platforms.
Richard
Roger Jansen wrote:
Joona I Palaste wrote: Roger Jansen <xx*@fel.tno.nl> scribbled the following: > I want to create a UDP socket that receives broadcast messages only > from a specific network device (in case there are more than one network > devices).
Stop right there. ISO standard C specifies no networking facilities whatsoever. At least these terms in your message are not specified by the C standard: "UDP", "socket", "receive", "broadcast", "message", "network" and "device". Please ask in a newsgroup dedicated to your own platform.
I thought this was a C newsgroup and bind() is C function on every platform I know. Maybe rename this group to comp.lang.iso-standard-c where people can only ask general questions who don't have an iso-standard-C manual?
It's not in DOS. That's a C platform, last I heard.
--
I have learned silence from the talkative,
toleration from the intolerant, and kindness from the unkind.
-- Kahlil Gibran This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Clarence Gardner |
last post by:
I've got a problem that I don't see how to program around. A socket server
that was running fine, today started getting an exception from the bind()
call (errno 22, Invalid argument) and yet the...
|
by: Roger Jansen |
last post by:
I want to create a UDP socket that receives broadcast messages only from
a specific network device (in case there are more than one network
devices).
When I bind the socket to INADDR_ANY I...
|
by: 0k |
last post by:
Hi everyone, I am trying to write a small app that sends multicast udp
packets using a socket object.
I have more than one NIC on my PC and the following code works OK only if I
disable all the...
|
by: meulie |
last post by:
Hi all!
Is it possible to bind MySQL 4.1 to more than 1 interface? Will
multiple 'bind-address=x.x.x.x' statements do the job?
Regards,
Evert
|
by: USUN_TO |
last post by:
Hi, i got problem
when i bind in this way:
local_addr.sin_family = AF_INET;
local_addr.sin_addr.s_addr = inet_addr("127.0.0.1");
local_addr.sin_port = htons(CLIENT_PORT);
i can easly bind...
|
by: Pieter |
last post by:
Hi,
I want to bind a proeprty of a child object to a DataGridView, but it
doesn't work.
For instance:
Imagen that I have an object Company, and this object company has a child
object...
|
by: natambu |
last post by:
I have a linux box with multiple ip addresses. I want to make my
python client connect from one of the ip addresses. Here is my code,
no matter what valid information I put in the bind it always...
|
by: MaheBytes |
last post by:
I have been facing a problem with UDP socket programming. I have to reuse port number for two different IP address. I am actually using SO_REUSEADD. I have no problem with debug version but with...
|
by: Jan Vinten |
last post by:
Hi all,
I got into some trouble trying to bind to a specific IP address.
Code:
Private mobjClient As TcpClient
mobjClient = New TcpClient(IPAddress.Parse("10.16.104.87").ToString,
8892)
|
by: Giovanni Gherdovich |
last post by:
Hello,
in the following code I have a pointer (to function), say p,
of type
double (*)(double, double, void*)
and I try to fix the second argument of the function *p
to a given value (using...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |