Virtual LAN

This is a long line of text.

class vlan.Network

This is a long line of text.

nodes

This is a long line of text.

dropPercent

This is a long line of text.

addrLen

This is a long line of text.

addrAddr

This is a long line of text.

__init__(addr, dropPercent=0.0)
Parameters:dropPercent (float) – percentage of packets to drop

This is a long line of text.

add_node(node)
Parameters:node (Node) – node to add to the network

This is a long line of text.

remove_node(node)
Parameters:node (Node) – node to remove from the network

This is a long line of text.

process_pdu(pdu)
Parameters:pdu – pdu to send on the network

This is a long line of text.

__len__()

Simple mechanism to return the number of nodes on the network.

class vlan.Node

This is a long line of text.

__init__(addr, lan=None, promiscuous=False, spoofing=False)
Parameters:
  • addr (Address) – address for the node
  • lan (Network) – network reference
  • promiscuous (boolean) – receive all packets
  • spoofing (boolean) – send with mocked source address

This is a long line of text.

bind(lan)
Parameters:lan (Network) – network reference

This is a long line of text.

indication(pdu)
Parameters:pdu – pdu to send on the network

This is a long line of text.