RLRP routing  v.0.1.0
Transport.VirtualTransport Class Reference

Class for interaction with virtual network interface. More...

Collaboration diagram for Transport.VirtualTransport:
Collaboration graph

Public Member Functions

def __init__ (self)
 Constructor. More...
 
def set_mtu (self, iface, mtu)
 Set MTU value. More...
 
def interface_up (self, iface)
 Up the interface. More...
 
def send_to_app (self, packet)
 Send data packet to the application. More...
 
def send_to_interface (self, packet)
 Send data packet back to the virtual interface. More...
 
def recv_from_app (self)
 Receive raw data from virtual interface. More...
 

Public Attributes

 f
 Store a file descriptor to the virtual interface. More...
 
 virtual_socket
 Create raw socket for sending the packets back to the interface. More...
 

Detailed Description

Class for interaction with virtual network interface.

Constructor & Destructor Documentation

def Transport.VirtualTransport.__init__ (   self)

Constructor.

Parameters
selfThe object pointer.
Returns
None

Here is the call graph for this function:

Member Function Documentation

def Transport.VirtualTransport.interface_up (   self,
  iface 
)

Up the interface.

Parameters
selfThe object pointer.
ifaceName of the virtual interface.
Returns
None

Here is the caller graph for this function:

def Transport.VirtualTransport.recv_from_app (   self)

Receive raw data from virtual interface.

Returns
List in a form: [src_ip, dst_ip, raw_data].
def Transport.VirtualTransport.send_to_app (   self,
  packet 
)

Send data packet to the application.

Parameters
selfThe object pointer.
packetRaw packet data.
Returns
None
def Transport.VirtualTransport.send_to_interface (   self,
  packet 
)

Send data packet back to the virtual interface.

Provides interface for sending back the packets to initial virtual interface.

Parameters
selfThe object pointer.
packetRaw packet data.
Returns
None
def Transport.VirtualTransport.set_mtu (   self,
  iface,
  mtu 
)

Set MTU value.

Parameters
selfThe object pointer.
ifaceName of the virtual interface.
mtuMTU value.
Returns
None

Here is the caller graph for this function:

Member Data Documentation

Transport.VirtualTransport.f

Store a file descriptor to the virtual interface.

Transport.VirtualTransport.virtual_socket

Create raw socket for sending the packets back to the interface.


The documentation for this class was generated from the following file: