[fpc-pascal] [NETWORK - LINUX ]: Calculate broadcast - network

Alexandre Leclerc alexandre.leclerc at gmail.com
Thu Oct 12 17:27:20 CEST 2006

2006/10/12, TOUZEAU DAVID <david.touzeau at fr.kaspersky.com>:
> <message>
> </message>
> Dear
> I develop a tool that change the network settings in /etc/network/interfaces
> the config file must be
> iface eth0 inet static
>          address 192.168.xx.xx
>          netmask
>          network 192.168.xx.0
>          broadcast 192.168.xx.255
>          gateway 192.168.xx.xx
> In this case when user type and i need to calculate
> the network address and broadcast.

For a class b network (based on your mask) that would be
for the broadcast and probably be (?) for the network. More
info there: http://en.wikipedia.org/wiki/Broadcast_address

But all this is good for private networks only.

Hope this helps;
Best regards.

Alexandre Leclerc

More information about the fpc-pascal mailing list