> I am writing a program in which I need to write UDP messages to the
> network which my program is running on.
First you'll have to define "my current network".Quote:> Is there a standard way to determine the network address of my
> current network?
The high order bits of the address *do* tell you what class of networkQuote:> Please note that I cannot depend upon the high order octet of the
> address to let me know what class of network I'm attached to because
> of subnetting.
you're on, *by definition*. A subnet with high bits 10xx, subnetted to
24 bits of network and 8 of host, is still a class B network; it's just
a subnetted class B network.
What you are probably looking for is the SIOCGIFCONF ioctl to get the
list of interfaces, then when you've chosen an interface somehow,
SIOCGIFADDR and SIOCGIFNETMASK to get its address and netmask.
(Actually, the SIOCGIFADDR isn't necessary because SIOCGIFCONF returns
interface addresses as well as names.)
der Mouse