Add an address to the set of addresses this proxy is permitted
        to introduce.

        :param addr: The address to add.
482521
def accept(self, addr):
        

        # Add the address to the set
        ip_addr = _parse_ip(addr)
        if ip_addr is None:
            LOG.warn("Cannot add address %r to proxy %s: "
                     "invalid address" % (addr, self.address))
        else:
            self.accepted.add(addr)
112005
def add_ipv4addr(self, ipv4addr):
        
        for addr in self.ipv4addrs:
            if ((isinstance(addr, dict) and addr['ipv4addr'] == ipv4addr) or
                (isinstance(addr, HostIPv4) and addr.ipv4addr == ipv4addr)):
                raise ValueError('Already exists')
        self.ipv4addrs.append({'ipv4addr': ipv4addr})
1225803
def add(setname=None, entry=None, family='ipv4', **kwargs):
    '''
    

    '''
    if not setname:
        return 'Error: Set needs to be specified'
    if not entry:
        return 'Error: Entry needs to be specified'

    setinfo = _find_set_info(setname)
    if not setinfo:
        return 'Error: Set {0} does not exist'.format(setname)

    settype = setinfo['Type']

    cmd = '{0}'.format(entry)

    if 'timeout' in kwargs:
        if 'timeout' not in setinfo['Header']:
            return 'Error: Set {0} not created with timeout support'.format(setname)

    if 'packets' in kwargs or 'bytes' in kwargs:
        if 'counters' not in setinfo['Header']:
            return 'Error: Set {0} not created with counters support'.format(setname)

    if 'comment' in kwargs:
        if 'comment' not in setinfo['Header']:
            return 'Error: Set {0} not created with comment support'.format(setname)
        if 'comment' not in entry:
            cmd = '{0} comment "{1}"'.format(cmd, kwargs['comment'])

    if set(['skbmark', 'skbprio', 'skbqueue']) & set(kwargs):
        if 'skbinfo' not in setinfo['Header']:
            return 'Error: Set {0} not created with skbinfo support'.format(setname)

    for item in _ADD_OPTIONS[settype]:
        if item in kwargs:
            cmd = '{0} {1} {2}'.format(cmd, item, kwargs[item])

    current_members = _find_set_members(setname)
    if cmd in current_members:
        return 'Warn: Entry {0} already exists in set {1}'.format(cmd, setname)

    # Using -exist to ensure entries are updated if the comment changes
    cmd = '{0} add -exist {1} {2}'.format(_ipset_cmd(), setname, cmd)
    out = __salt__['cmd.run'](cmd, python_shell=False)

    if not out:
        return 'Success'
    return 'Error: {0}'.format(out)
316847
def AddForwardedIp(self, address, interface):
    
    address = address if IP_ALIAS_REGEX.match(address) else '%s/32' % address
    args = ['add', 'to', 'local', address]
    options = self._CreateRouteOptions(dev=interface)
    self._RunIpRoute(args=args, options=options)
755306
protected static <R extends AddressSection, S extends AddressSegment> R add(
			R section, BigInteger increment, AddressCreator<?, R, ?, S> addrCreator, Integer prefixLength) {
		if(section.isMultiple()) {
			throw new IllegalArgumentException();
		}
		int segCount = section.getSegmentCount();
		BigInteger fullValue = section.getValue();
		fullValue = fullValue.add(increment);
		byte bytes[] = fullValue.toByteArray();
		return addrCreator.createSectionInternal(bytes, segCount, prefixLength, true);
	}
1309200
public void setPermittedAddresses(List<DomainMatcher> addrs) {
        if (addrs == null || addrs.isEmpty()) {
            ((HierarchicalConfiguration) getConfig()).clearTree(ADDRESS_KEY);

            this.permittedAddresses = Collections.emptyList();
            this.permittedAddressesEnabled = Collections.emptyList();
            return;
        }

        this.permittedAddresses = new ArrayList<>(addrs);

        ((HierarchicalConfiguration) getConfig()).clearTree(ADDRESS_KEY);

        int size = addrs.size();
        ArrayList<DomainMatcher> enabledAddrs = new ArrayList<>(size);
        for (int i = 0; i < size; ++i) {
            String elementBaseKey = ADDRESS_KEY + "(" + i + ").";
            DomainMatcher addr = addrs.get(i);

            getConfig().setProperty(elementBaseKey + ADDRESS_VALUE_KEY, addr.getValue());
            getConfig().setProperty(elementBaseKey + ADDRESS_REGEX_KEY, addr.isRegex());
            getConfig().setProperty(elementBaseKey + ADDRESS_ENABLED_KEY, addr.isEnabled());

            if (addr.isEnabled()) {
                enabledAddrs.add(addr);
            }
        }

        enabledAddrs.trimToSize();
        this.permittedAddressesEnabled = enabledAddrs;
    }
627766
def register_listener(self, address, func):
        
        try:
            listeners = self.address_listeners[address]
        except KeyError:
            listeners = []
            self.address_listeners[address] = listeners

        if not func in listeners:
            listeners.append(func)

        return True
178888
def add_override(self, addr, key, value):
        """"""
        address = Address(str(addr)).id
        _LOGGER.debug('New override for %s %s is %s', address, key, value)
        device_override = self._overrides.get(address, {})
        device_override[key] = value
        self._overrides[address] = device_override
614671
def add_peer_address(self, ext_bgp_peer_or_fw, rank=None):
        
        if ext_bgp_peer_or_fw.typeof == 'external_bgp_peer':
            ref = 'external_bgp_peer_address_ref'
        else: # engine
            ref = 'fwcluster_peer_address_ref'
        self.conditions.append(
            {ref: ext_bgp_peer_or_fw.href,
             'rank': rank,
             'type': 'peer_address'})
1370542
def translate(self, addr):
        
        # get family of this address so we translate to the same
        family = socket.getaddrinfo(addr, 0, socket.AF_UNSPEC, socket.SOCK_STREAM)[0][0]
        host = socket.getfqdn(addr)
        for a in socket.getaddrinfo(host, 0, family, socket.SOCK_STREAM):
            try:
                return a[4][0]
            except Exception:
                pass
        return addr
435698
def add(name, address)
      device = Device.new(name: name, address: address)
      self << device
      device
    end
40291
def set_address(network, address):
    
    if network.find('.//ip') is not None:
        raise RuntimeError("Address already specified in XML configuration.")

    netmask = str(address.netmask)
    ipv4 = str(address[1])
    dhcp_start = str(address[2])
    dhcp_end = str(address[-2])
    ip = etree.SubElement(network, 'ip', address=ipv4, netmask=netmask)
    dhcp = etree.SubElement(ip, 'dhcp')

    etree.SubElement(dhcp, 'range', start=dhcp_start, end=dhcp_end)
384290
def set_address(self, address):
        
        if len(address) != 5:
            raise Exception('Crazyradio: the radio address shall be 5'
                            ' bytes long')
        if address != self.current_address:
            _send_vendor_setup(self.handle, SET_RADIO_ADDRESS, 0, 0, address)
            self.current_address = address
267537
def add_ip(self,oid,value,label=None):
		""""""
		self.add_oid_entry(oid,'IPADDRESS',value,label=label)
1298041
def addr=(addr)
      @addr = addr
      @me = Node.new @id, @addr, true
      Directory[@id].address = addr
      ObjectSpace.define_finalizer(me, proc { Directory.remove @id })
    end
1342805
def add_address(ipaddress, rule)
      return false unless rule.is_a?(Rule)
      @addresses ||= {}
      (@addresses[ipaddress] ||= []) << rule
      rule
    end
409146
def write(self, addr, data):
        '''

        '''
        self.set_addr(addr & 0xfe)
        self.set_data(data)
        self.set_size(len(data))
        self.start()
        while not self.is_ready:
            pass