Re: Finding broadcast address
- Posted by codepilot Gmail Account <codepilot at gmail.com> Apr 28, 2005
- 449 views
The subment is in winsock somewhere I think, but I don't remember On 4/26/05, MrTrick <guest at rapideuphoria.com> wrote: > > posted by: MrTrick <mistertrik at hotmail.com> > > I want to broadcast messages to my local subnet. I know that if > the IP address is (for example) 10.42.97.5 and the subnet is > 255.255.255.0, the broadcast address is 10.42.97.255. > > I guess the formula is broadcast_addr = ip_addr OR (NOT subnet_addr) > > How though, do I find what the subnet address is? I suppose I could > system call 'ipconfig > ip.txt' and parse the text file, but does anythin= g > neater than that exist? I've looked on the MSDN site, but their search sy= stem > is not very useful. > > (This is on a windows box) > > > > >