Finding broadcast address

new topic     » topic index » view thread      » older message » newer message

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 anything
neater than that exist? I've looked on the MSDN site, but their search system
is not very useful.

(This is on a windows box)

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu