parameters: (ip, net)
return_statement: return (ipaddr & netmask) == (network & netmask)
docstring: This function allows you to check if an IP belongs to a network subnet
  
      Example: returns True if ip = 192.168.1.1 and net = 192.168.1.0/24
               returns False if ip = 192.168.1.1 and net = 192.168.100.0/24
  
      :rtype: bool
docstring_summary: This function allows you to check if an IP belongs to a network subnet
docstring_tokens: This function allows you to check if an IP belongs to a network subnet
function: def address_in_network(ip, net):
      """This function allows you to check if an IP belongs to a network subnet
  
      Example: returns True if ip = 192.168.1.1 and net = 192.168.1.0/24
               returns False if ip = 192.168.1.1 and net = 192.168.100.0/24
  
      :rtype: bool
      """
      ipaddr = struct.unpack('=L', socket.inet_aton(ip))[0]
      netaddr, bits = net.split('/')
      netmask = struct.unpack('=L', socket.inet_aton(dotted_netmask(int(bits))))[0]
      network = struct.unpack('=L', socket.inet_aton(netaddr))[0] & netmask
      return (ipaddr & netmask) == (network & netmask)
function_tokens: def address_in_network ( ip , net ) : ipaddr = struct . unpack ( '=L' , socket . inet_aton ( ip ) ) [ 0 ] netaddr , bits = net . split ( '/' ) netmask = struct . unpack ( '=L' , socket . inet_aton ( dotted_netmask ( int ( bits ) ) ) ) [ 0 ] network = struct . unpack ( '=L' , socket . inet_aton ( netaddr ) ) [ 0 ] & netmask return ( ipaddr & netmask ) == ( network & netmask )