Low-Power Border Router

Lowpan.Printer.Printer Class Reference

Printer class for 6LoWPAN and IPv6 packets. More...

List of all members.

Public Member Functions

def __init__
 Initializes this object.
def print_string
 Prints the contents of a string representing a packet.
def print_ipv6_headers
 Prints the contents of a previously disassembled IPv6 headers.
def print_lowpan_headers
 Prints the contents of a previously disassembled lowpan headers.

Public Attributes

 username
 log

Detailed Description

Printer class for 6LoWPAN and IPv6 packets.


Constructor & Destructor Documentation

def Lowpan.Printer.Printer.__init__ (   self,
  username 
)

Initializes this object.

Parameters:
usernameThe name of the user this instance works for.

Member Function Documentation

def Lowpan.Printer.Printer.print_string (   self,
  packet_string 
)

Prints the contents of a string representing a packet.

Bytes are printed in rows or 16, in a format compatible to Wireshark.

Precondition:
The string needs to be read beforehand, i.e. from a tun virtual interface.
Parameters:
packet_stringA string of bytes representing a packet.
def Lowpan.Printer.Printer.print_ipv6_headers (   self,
  ipv6_headers 
)

Prints the contents of a previously disassembled IPv6 headers.

Precondition:
Call ipv6_string_to_headers to obtain the headers.
Parameters:
ipv6_headersA disassembled IPv6 packet.
def Lowpan.Printer.Printer.print_lowpan_headers (   self,
  lowpan_headers 
)

Prints the contents of a previously disassembled lowpan headers.

Precondition:
Call lowpan_string_to_headers to obtain the headers.
Parameters:
lowpan_headersA disassembled lowpan packet.

Member Data Documentation