當前位置: 首頁>>代碼示例>>Python>>正文


Python ATMT.receive_condition方法代碼示例

本文整理匯總了Python中scapy.automaton.ATMT.receive_condition方法的典型用法代碼示例。如果您正苦於以下問題:Python ATMT.receive_condition方法的具體用法?Python ATMT.receive_condition怎麽用?Python ATMT.receive_condition使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在scapy.automaton.ATMT的用法示例。


在下文中一共展示了ATMT.receive_condition方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: receive_offer

# 需要導入模塊: from scapy.automaton import ATMT [as 別名]
# 或者: from scapy.automaton.ATMT import receive_condition [as 別名]
def receive_offer(self, pkt):
        """Receive offer on SELECTING state."""
        logger.debug("C2. Received OFFER?, in SELECTING state.")
        if isoffer(pkt):
            logger.debug("C2: T, OFFER received")
            self.offers.append(pkt)
            if len(self.offers) >= MAX_OFFERS_COLLECTED:
                logger.debug("C2.5: T, raise REQUESTING.")
                self.select_offer()
                raise self.REQUESTING()
            logger.debug("C2.5: F, raise SELECTING.")
            raise self.SELECTING()

    # same as:, but would can not be overloaded
    # @ATMT.receive_condition(RENEWING)
    # @ATMT.receive_condition(REBINDING) 
開發者ID:juga0,項目名稱:dhcpcanon,代碼行數:18,代碼來源:dhcpcapfsm.py

示例2: receive_ack_requesting

# 需要導入模塊: from scapy.automaton import ATMT [as 別名]
# 或者: from scapy.automaton.ATMT import receive_condition [as 別名]
def receive_ack_requesting(self, pkt):
        """Receive ACK in REQUESTING state."""
        logger.debug("C3. Received ACK?, in REQUESTING state.")
        if self.process_received_ack(pkt):
            logger.debug("C3: T. Received ACK, in REQUESTING state, "
                         "raise BOUND.")
            raise self.BOUND()

    # same as:, but would can not be overloaded
    # @ATMT.receive_condition(RENEWING)
    # @ATMT.receive_condition(REBINDING) 
開發者ID:juga0,項目名稱:dhcpcanon,代碼行數:13,代碼來源:dhcpcapfsm.py


注:本文中的scapy.automaton.ATMT.receive_condition方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。