|
PCS
0.4
|
Public Member Functions | |
| def | __init__ |
| def | read_packet |
| def | readpkt |
| def | poll_read |
| def | blocking_read |
| def | write |
Public Attributes | |
| group | |
| port | |
| file | |
A connector for hooking up to a User Mode Linux virtual LAN,
implemented by Ethernet frames over UDP sockets in a multicast group.
Typically used for interworking with QEMU. See:
http://user-mode-linux.sourceforge.net/old/text/mcast.txt
No additional encapsulation of the frames is performed, nor is
any filtering performed.
Be aware that this encapsulation may fragment traffic if sent
across a real LAN. The multicast API is being somewhat abused here
to send and receive the session on the same socket; generally apps
shouldn't bind to group addresses, and it's not guaranteed to work
with all host IP stacks.
| def pcs.UmlMcast4Connector.__init__ | ( | self, | |
| group, | |||
| port, | |||
ifaddr = None |
|||
| ) |
initialize a UML Mcast v4 connector group - the multicast group to join port - the UDP source/destination port for the session ifaddr - optionally, the interface upon which to join the group.
References pcs.PcapConnector.file, pcs.PcapDumpConnector.file, pcs.IP4Connector.file, pcs.UmlMcast4Connector.group, and pcs.UmlMcast4Connector.port.
| def pcs.UmlMcast4Connector.poll_read | ( | self, | |
timeout = None |
|||
| ) |
Poll the underlying I/O layer for a read. Return TIMEOUT if the timeout was reached.
Reimplemented from pcs.Connector.
| def pcs.UmlMcast4Connector.read_packet | ( | self | ) |
Read a packet from the underlying I/O layer, and return an instance of a class derived from pcs.Packet appropriate to the data-link or transport layer in use. If the Connector has multiple data-link layer support, then the type returned by this method may vary. If the underlying packet parsers throw an exception, it will propagate here.
Reimplemented from pcs.IP4Connector.
References pcs.TapConnector.blocking_read(), pcs.UmlMcast4Connector.blocking_read(), and pcs.Connector.read_packet().
| def pcs.UmlMcast4Connector.write | ( | self, | |
| packet, | |||
flags = 0 |
|||
| ) |
write data to an IPv4 socket
Reimplemented from pcs.IP4Connector.
References pcs.UmlMcast4Connector.group, and pcs.UmlMcast4Connector.port.
1.8.0