scapy.contrib.sdnv module

Copyright 2012, The MITRE Corporation:

                          NOTICE
This software/technical data was produced for the U.S. Government
under Prime Contract No. NASA-03001 and JPL Contract No. 1295026
  and is subject to FAR 52.227-14 (6/87) Rights in Data General,
    and Article GP-51, Rights in Data  General, respectively.
   This software is publicly released under MITRE case #12-3054
class scapy.contrib.sdnv.SDNV(maxValue=4294967295)

Bases: object

decode(ba, offset)
encode(number)
getMax()
setMax(maxValue)
class scapy.contrib.sdnv.SDNV2(name, default, fmt='H')

Bases: scapy.fields.Field

SDNV2 field

addfield(pkt, s, val)

Add an internal value to a string

Copy the network representation of field val (belonging to layer pkt) to the raw string packet s, and return the new string packet.

getfield(pkt, s)

Extract an internal value from a string

Extract from the raw packet s the field value belonging to layer pkt.

Returns a two-element list, first the raw packet string after having removed the extracted field, second the extracted field itself in internal representation.

class scapy.contrib.sdnv.SDNV2FieldLenField(name, default, length_of=None, fmt='H', count_of=None, adjust=<function FieldLenField.<lambda>>, fld=None)

Bases: scapy.fields.FieldLenField, scapy.contrib.sdnv.SDNV2

addfield(pkt, s, val)

Add an internal value to a string

Copy the network representation of field val (belonging to layer pkt) to the raw string packet s, and return the new string packet.

class scapy.contrib.sdnv.SDNV2LenField(name, default, fmt='H', adjust=<function LenField.<lambda>>)

Bases: scapy.fields.LenField, scapy.contrib.sdnv.SDNV2

addfield(pkt, s, val)

Add an internal value to a string

Copy the network representation of field val (belonging to layer pkt) to the raw string packet s, and return the new string packet.

exception scapy.contrib.sdnv.SDNVValueError(maxValue)

Bases: Exception