I want to broadcast a UDP message to all process. Like 255.255.255.255 is used to broadcast to all ips, is there any port to broadcast to every proceses?
Asked
Active
Viewed 616 times
0
-
2What exactly are you trying to do? Won't most of those processes not understand what you're sending them? – Carl Norum Mar 17 '12 at 20:08
-
Actually I'm forking some process and then I want to send them same message through UDP (it's requirement of the assignment), I thought broadcast would be an easy solution. – Uzair Farooq Mar 17 '12 at 20:16
-
Do you mean: "broadcast to every port"? Not sure how the concept of processes has anything to do with UDP – Niklas B. Mar 17 '12 at 20:22
-
Yes, broadcast to every port. It's my assignment, the assignment requires to spawn multiple processes through fork() and then send them a message through UDP. – Uzair Farooq Mar 17 '12 at 20:27
-
[Does this help?](http://stackoverflow.com/a/9310749/220636) – nabulke Mar 17 '12 at 20:31
-
noop...that's about broadcast to ips. I think blueshift is right, there's no way to do that – Uzair Farooq Mar 17 '12 at 20:35
-
If they are your own processes why exactly do you need to flood every port in the LAN? – user207421 Mar 18 '12 at 22:26
-
I don't know why this is getting downvoted. It's a legitimate question. – blueshift Mar 19 '12 at 03:33
2 Answers
5
No.
That's the short answer. The rest of this answer is just to get over the length limit.

blueshift
- 6,742
- 2
- 39
- 63
-
4
-
1@MartinJames And how do you know he didn't understand the question? – Uzair Farooq Mar 17 '12 at 20:10
0
Do you want to broadcast to every process on a local system, like we send out UDP broadcasts on a network?
For Windows, you can see this. This is no about processes, but about services.
http://msdn.microsoft.com/en-us/library/windows/desktop/ms685149(v=vs.85).aspx
It might be theoretically possible to get a list of services, and call their Service Control Handlers. I am not sure if it can be implemented at all, and my best guess is it cannot.
I understand that you are going to throw the same "the assignment requires it" answer, but I am very interested to know what you are trying to achieve, by broadcasting to all processes.

Chinmoy
- 1,750
- 2
- 21
- 45