vendor/bundle/ruby/2.7.0/gems/dnsruby-1.61.5/lib/dnsruby/packet_sender.rb
#  Can be a single Integer or a Range or an Array
#  If an invalid port is selected (one reserved by
#  IANA), then an ArgumentError will be raised.
#  "0" means "any valid port" - this is only a viable
#  option if it is the only port in the list.
#  An ArgumentError will be raised if "0" is added to
#  an existing set of source ports.
# 
#         res.add_src_port(60000)
#         res.add_src_port([60001,60005,60010])
#         res.add_src_port(60015..60115)
# 
Can be a single Integer or a Range or an Array
If an invalid port is selected (one reserved by
IANA), then an ArgumentError will be raised.
"0" means "any valid port" - this is only a viable
option if it is the only port in the list.
An ArgumentError will be raised if "0" is added to
an existing set of source ports.


Can be a single Integer or a Range or an Array If an invalid port is selected ( one reserved by IANA ) then an ArgumentError will be raised . " 0 " means " any valid port " - this is only a viable option if it is the only port in the list . An ArgumentError will be raised if " 0 " is added to an existing set of source ports .
def add_src_port(p)
      if (Resolver.check_port(p, @src_port))
        a = Resolver.get_ports_from(p)
        a.each do |x|
          if ((@src_port.length > 0) && (x == 0))
            raise ArgumentError.new("src_port of 0 only allowed as only src_port value (currently #{@src_port.length} values")
          end
          @src_port.push(x)
        end
      end
    end
def add_src_port ( p ) if ( Resolver . check_port ( p , @src_port ) ) a = Resolver . get_ports_from ( p ) a . each do | x | if ( ( @src_port . length > 0 ) && ( x == 0 ) ) raise ArgumentError . new ( "src_port of 0 only allowed as only src_port value (currently #{@src_port.length} values" ) end @src_port . push ( x ) end end end
Can be a single Integer or a Range or an Array
If an invalid port is selected (one reserved by
IANA), then an ArgumentError will be raised.
Can be a single Integer or a Range or an Array If an invalid port is selected ( one reserved by IANA ) then an ArgumentError will be raised .
p
<not_specific>