(3 . 7)(3 . 6)
155 import logging
156 import os
157 from state import State
158 from infosec import MAX_BOUNCES
159 from infosec import STALE_PACKET
160 from infosec import DUPLICATE_PACKET
161 from infosec import MALFORMED_PACKET
(16 . 9)(15 . 6)
163 from commands import DIRECT
164 from peer import Peer
165
166 RUBBISH_INTERVAL = 10
167 EMBARGO_INTERVAL = 1
168
169 class Station(object):
170 def __init__(self, options):
171 self.client = None
(153 . 7)(149 . 7)
173 })
174
175 def rebroadcast(self, message):
176 if message.bounces < MAX_BOUNCES:
177 if message.bounces < int(self.state.get_knob("max_bounces")):
178 message.command = BROADCAST
179 message.bounces = message.bounces + 1
180 self.infosec.message(message)