def adjust_ether (self, ip=None, ether=None):
    """Called to explicitely fixup an associated Ethernet header

    The function adjusts the ethernet header destination MAC address based on 
    the destination IP address.
    """
# The rules are:
#   1. send to the group mac address address corresponding to the IP.dst
    if ip != None and ip.haslayer(IP) and ether != None and ether.haslayer(Ether):
      iplong = atol(ip.dst)
      ether.dst = "01:00:5e:%02x:%02x:%02x" % ( (iplong>>16)&0x7F, (iplong>>8)&0xFF, (iplong)&0xFF )
      # print "igmpize ip " + ip.dst + " as mac " + ether.dst 
      return True
    else:
      return False
def adjust_ether ( self , ip = None , ether = None ) : if ip != None and ip . haslayer ( IP ) and ether != None and ether . haslayer ( Ether ) : iplong = atol ( ip . dst ) ether . dst = "01:00:5e:%02x:%02x:%02x" % ( ( iplong >> 16 ) & 0x7F , ( iplong >> 8 ) & 0xFF , ( iplong ) & 0xFF ) return True else : return False
Called to explicitely fixup an associated Ethernet header

    The function adjusts the ethernet header destination MAC address based on 
    the destination IP address.