When the Internet was originally set up, various ranges of IP addresses were segmented into three network classes: A, B, and C.
This function will return a prefix that is associated with the IP address specified defining where it falls in the predefined classes.
ip |
an IPv4 address (in network byte order) |
the default class prefix for the given IP |