# File lib/cidr.rb, line 970
    def is_contained?(cidr)
        is_contained = false

        if (!cidr.kind_of?(NetAddr::CIDR))
            begin
                cidr = NetAddr::CIDR.create(cidr)
            rescue Exception => error
                raise ArgumentError, "Provided argument raised the following " +
                                     "errors: #{error}"
            end
        end

        if (cidr.version != @version)
            raise VersionError, "Attempted to compare a version #{cidr.version} CIDR " +
                                 "with a version #{@version} CIDR."
        end

        network = cidr.to_i(:network)
        netmask = cidr.to_i(:netmask)
        hostmask = cidr.to_i(:hostmask)

        is_contained = true if ( NetAddr.cidr_compare(self,cidr) == -1 )

        return(is_contained)
    end