Please try the following links.

KiXgolf: MOAN - Mother Of All Networks
http://www.kixtart.org/ubbthreads/showflat.php?Cat=0&Number=100163

Quote:

=============
The Challenge
=============
  
You are to create the Mother Of All Networks (MOAN) UDF.
This UDF will provide certain network information depending on the parameters passed to it.
The challenge will be run as a private coding challenge from
Friday, May 23, 3pm EST to Friday, May 30, 3pm EST.
A second public coding phase will start on Friday, May 30 and end on Wednesday, June 4, 3pm EST.
 
The task is to generate the corresponding output based on the input of either two or
three of the parameters IP Address, Network ID, and Subnet Mask. Specifics are provided
in section "Inputs & Outputs".






KIXgolf: MOAN(), Part II
http://www.kixtart.org/ubbthreads/showflat.php?Cat=0&Number=100502

MightyR1 commented the code on page 4 of Part II
http://www.kixtart.org/ubbthreads/showflat.php?Cat=0&Number=100502&page=0&fpart=4
 
The Finalized UDF Code
Moan() - Mother Of All Networks
http://www.kixtart.org/ubbthreads/showflat.php?Cat=0&Number=83638