hpimdm/InterfaceHPIM.py
def send(self, data: Packet, group_ip: str=MCAST_GRP):
        """
        Send a new packet destined to group_ip IP
        """
        if self.is_security_enabled():
            key = self.get_security_key()
            data.payload.security_id = self.security_id
            data.payload.security_length = self.security_len
            security_value = hmac.new(key, socket.inet_pton(self._get_address_family(), self.get_ip()) +
                                      socket.inet_pton(self._get_address_family(), group_ip) +
                                      data.bytes(), digestmod=self.hash_function).digest()
            data.payload.security_value = security_value

        #if self.drop_packet_type is not None and data.payload.get_pim_type() == self.drop_packet_type:
        #    self.drop_packet_type = None
        #    return
        super().send(data=data.bytes(), group_ip=group_ip)

        Send a new packet destined to group_ip IP
        
Send a new packet destined to group_ip IP
Send a new packet destined to group_ip IP
def send(self, data: Packet, group_ip: str=MCAST_GRP):
        if self.is_security_enabled():
            key = self.get_security_key()
            data.payload.security_id = self.security_id
            data.payload.security_length = self.security_len
            security_value = hmac.new(key, socket.inet_pton(self._get_address_family(), self.get_ip()) +
                                      socket.inet_pton(self._get_address_family(), group_ip) +
                                      data.bytes(), digestmod=self.hash_function).digest()
            data.payload.security_value = security_value
        super().send(data=data.bytes(), group_ip=group_ip)
def send ( self , data : Packet , group_ip : str = MCAST_GRP ) : if self . is_security_enabled ( ) : key = self . get_security_key ( ) data . payload . security_id = self . security_id data . payload . security_length = self . security_len security_value = hmac . new ( key , socket . inet_pton ( self . _get_address_family ( ) , self . get_ip ( ) ) + socket . inet_pton ( self . _get_address_family ( ) , group_ip ) + data . bytes ( ) , digestmod = self . hash_function ) . digest ( ) data . payload . security_value = security_value super ( ) . send ( data = data . bytes ( ) , group_ip = group_ip )
Send a new packet destined to group_ip IP
Send a new packet destined to group_ip IP
"""
        Send a new packet destined to group_ip IP
        """ #if self.drop_packet_type is not None and data.payload.get_pim_type() == self.drop_packet_type: #    self.drop_packet_type = None #    return
self
data
Packet
group_ip
str