Did I find the right examples for you? yes no

All Samples(3)  |  Call(2)  |  Derive(0)  |  Import(1)

src/p/y/pystack-1.0.0/pystack/layers/udp_application.py   pystack(Download)
 
from pystack.layers.layer import Layer
from pystack.kernel_filter import unblock_icmp_port_unreachable, block_icmp_port_unreachable
import transversal_layer_access
 
        """
        self.localPort = port
        block_icmp_port_unreachable()  #block_outgoing_packets("udp", self.localIP, self.localPort, None, None)
        self.connectionID = (self.localIP, self.localPort)
        self.lowerLayers['default'].register_upper_layer(self.connectionID, self)
 
        if not self.connectionID:
            block_icmp_port_unreachable()
            self.connectionID = (self.localIP, self.localPort)
            self.lowerLayers['default'].register_upper_layer(self.connectionID, self)