April 19, 2024, 03:53:39 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Broadcast address

Started by Egil, April 02, 2009, 03:59:36 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Egil

I want to broadcast a message to all inhouse clients, what IP address should be used?
Checking the network adapter status on the computer I am using at the moment gives this:

           IP address: 10.0.0.1
      Network mask: 255.255.255.0
Standard Gateway: 10.0.0.138

Reading several internet sources make me rather confused. I think that  10.0.0.255 is the address I should use. Can any forum user confirm this, please?
Support Amateur Radio  -  Have a ham  for dinner!

Ficko

I am not sure what you wanna use for broadcast but

if you want to use net send, the messenger service has to be enabled on all computers that you want to recieve the message.

-For security reason it isn't a good approach-

to broadcast:

net send * message

-And Vista dosn't have this service anymore.-

regards
Ficko


Ficko

Hups!

I just recognized we are in the "Client/Server" programming section. :-[

So just ignore my stupid reply. ;D

sapero

10.0.0.255 is valid for broadcasting, I've seen it often in my LAN, but always used the more general  255.255.255.255.
To enable broadcasting you need to prepare the unbound socket with setsockopt api, and then it should be bound (bind api) to one of network cards.
int enabled = 1
setsockopt(hSocket, SOL_SOCKET, SO_BROADCAST, &enabled, len(enabled))

Egil

April 02, 2009, 11:54:56 PM #4 Last Edit: April 03, 2009, 12:10:10 AM by Egil
Thanks guys!
I am part of a radio amateur contest team participating in international contest in the multioperator/multiband classes. Most of these contests have rules that require all contacts to be given serial numbers on every contact referrenced to time, regardless of what frequency band the contact is done. When the operating posts  are separated by several hundred meters to avoid radio interferrence, this is difficult to achieve. And we see that we are loosing scores for that reason.
Since we already are using laptops for logging at each operating post, we will link these in a wireless LAN. And then let a controlling position broadcast the next unused serial number at regular intervals on this network, and the first taker get assigned this number.
I have been experimenting with the routines postol350 supplied in this forum thread, coded by Andrew:  http://www.ionicwind.com/forums/index.php/topic,2166.0.html . These routines are very simple, but works very fast. But now I will  try to do the same thing using the EB Network library.

Using 255.255.255.255 certainly broadcasts  to all computers in my house, but I notice that my routers DSL line indicator lamp is actually activated when using this adress. And I dont know if this means that I am spreading my signals on the web or not. This does not happen when I use 10.0.0.255. Therefore I am seeking advice here.
Support Amateur Radio  -  Have a ham  for dinner!


Egil

Support Amateur Radio  -  Have a ham  for dinner!