dhcpcanon/dhcpcapfsm.py
def timeout_selecting(self):
        """Timeout of selecting on SELECTING state.

        Not specifiyed in [:rfc:`7844`].
        See comments in :func:`dhcpcapfsm.DHCPCAPFSM.timeout_request`.

        """
        logger.debug('C2.1: T In %s, timeout receiving response to select.',
                     self.current_state)

        if len(self.offers) >= MAX_OFFERS_COLLECTED:
            logger.debug('C2.2: T Maximum number of offers reached, '
                         'raise REQUESTING.')
            raise self.REQUESTING()

        if self.discover_attempts >= MAX_ATTEMPTS_DISCOVER:
            logger.debug('C2.3: T Maximum number of discover retries is %s'
                         ' and already sent %s.',
                         MAX_ATTEMPTS_DISCOVER, self.discover_attempts)
            if len(self.offers) <= 0:
                logger.debug('C2.4: T. But no OFFERS where received, '
                             'raise ERROR.')
                raise self.ERROR()
            logger.debug('C2.4: F. But there is some OFFERS, '
                         'raise REQUESTING.')
            raise self.REQUESTING()

        logger.debug('C2.2: F. Still not received all OFFERS, but not '
                     'max # attemps reached, raise SELECTING.')
        raise self.SELECTING()
def timeout_selecting(self):
        logger.debug('C2.1: T In %s, timeout receiving response to select.',
                     self.current_state)

        if len(self.offers) >= MAX_OFFERS_COLLECTED:
            logger.debug('C2.2: T Maximum number of offers reached, '
                         'raise REQUESTING.')
            raise self.REQUESTING()

        if self.discover_attempts >= MAX_ATTEMPTS_DISCOVER:
            logger.debug('C2.3: T Maximum number of discover retries is %s'
                         ' and already sent %s.',
                         MAX_ATTEMPTS_DISCOVER, self.discover_attempts)
            if len(self.offers) <= 0:
                logger.debug('C2.4: T. But no OFFERS where received, '
                             'raise ERROR.')
                raise self.ERROR()
            logger.debug('C2.4: F. But there is some OFFERS, '
                         'raise REQUESTING.')
            raise self.REQUESTING()

        logger.debug('C2.2: F. Still not received all OFFERS, but not '
                     'max # attemps reached, raise SELECTING.')
        raise self.SELECTING()
def timeout_selecting ( self ) : logger . debug ( 'C2.1: T In %s, timeout receiving response to select.' , self . current_state ) if len ( self . offers ) >= MAX_OFFERS_COLLECTED : logger . debug ( 'C2.2: T Maximum number of offers reached, ' 'raise REQUESTING.' ) raise self . REQUESTING ( ) if self . discover_attempts >= MAX_ATTEMPTS_DISCOVER : logger . debug ( 'C2.3: T Maximum number of discover retries is %s' ' and already sent %s.' , MAX_ATTEMPTS_DISCOVER , self . discover_attempts ) if len ( self . offers ) <= 0 : logger . debug ( 'C2.4: T. But no OFFERS where received, ' 'raise ERROR.' ) raise self . ERROR ( ) logger . debug ( 'C2.4: F. But there is some OFFERS, ' 'raise REQUESTING.' ) raise self . REQUESTING ( ) logger . debug ( 'C2.2: F. Still not received all OFFERS, but not ' 'max # attemps reached, raise SELECTING.' ) raise self . SELECTING ( )
Timeout of selecting on SELECTING state.

        Not specifiyed in [:rfc:`7844`].
        See comments in :func:`dhcpcapfsm.DHCPCAPFSM.timeout_request`.
Timeout of selecting on SELECTING state .