Changeset 176 for etherws/trunk
- Timestamp:
- 07/25/12 20:47:54 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
etherws/trunk/etherws.py
r175 r176 72 72 self.data = data 73 73 74 @staticmethod 75 def multicast(mac): 76 return ord(mac[0]) & 1 74 @property 75 def dst_multicast(self): 76 return ord(self.data[0]) & 1 77 78 @property 79 def src_multicast(self): 80 return ord(self.data[6]) & 1 77 81 78 82 @property … … 160 164 def forward(self, src_port, frame): 161 165 try: 162 if not frame. multicast(frame.src_mac):166 if not frame.src_multicast: 163 167 self._fdb.learn(src_port, frame) 164 168 165 if not frame. multicast(frame.dst_mac):169 if not frame.dst_multicast: 166 170 dst_port = self._fdb.lookup(frame) 167 171
Note: See TracChangeset
for help on using the changeset viewer.