# Path: duct/protocol/sflow/protocol/utils.py
# def unpack_address(u):
#     def __init__(self, addr_int):
#     def __str__(self):
#     def asString(self):
#     def __repr__(self):
# class IPv4Address(object):


from construct import (BitStruct,
                       Bits,
                       Bytes,
                       Const,
                       EmbeddedBitStruct,
                       Enum,
                       Flag,
                       Nibble,
                       Padding,
                       Struct,
                       UBInt8,
                       UBInt16,
                       UBInt32)
from construct.adapters import MappingError
from duct.protocol.sflow.protocol import utils
from twisted.python import log
                         IATP=0x75,
                         STP=0x76,
                         SRP=0x77,
                         UTI=0x78,
                         SMP=0x79,
                         SM=0x7A,
                         PTP=0x7B,
                         ISIS=0x7C,
                         FIRE=0x7D,
                         CRTP=0x7E,
                         CRUDP=0x7F,
                         SSCOPMCE=0x80,
                         IPLT=0x81,
                         SPS=0x82,
                         SCTP=0x84,
                         FC=0x85,
                         UDPLite=0x88,
                         MPLSoIP=0x89,
                         manet=0x8A,
                         HIP=0x8B,
                         Shim6=0x8C,
                         WESP=0x8D,
                         ROHC=0x8E),
                    UBInt16("checksum"),
                    UBInt32("src"),
                    UBInt32("dst"),
                   )

        self.ip = ip.parse(data[:ip.sizeof()])


# Path: duct/protocol/sflow/protocol/utils.py
# def unpack_address(u):
#     def __init__(self, addr_int):
#     def __str__(self):
#     def asString(self):
#     def __repr__(self):
# class IPv4Address(object):


# Path: duct/protocol/sflow/protocol/flows.py
from construct import (BitStruct,
                       Bits,
                       Bytes,
                       Const,
                       EmbeddedBitStruct,
                       Enum,
                       Flag,
                       Nibble,
                       Padding,
                       Struct,
                       UBInt8,
                       UBInt16,
                       UBInt32)
from construct.adapters import MappingError
from duct.protocol.sflow.protocol import utils
from twisted.python import log

                         IATP=0x75,
                         STP=0x76,
                         SRP=0x77,
                         UTI=0x78,
                         SMP=0x79,
                         SM=0x7A,
                         PTP=0x7B,
                         ISIS=0x7C,
                         FIRE=0x7D,
                         CRTP=0x7E,
                         CRUDP=0x7F,
                         SSCOPMCE=0x80,
                         IPLT=0x81,
                         SPS=0x82,
                         SCTP=0x84,
                         FC=0x85,
                         UDPLite=0x88,
                         MPLSoIP=0x89,
                         manet=0x8A,
                         HIP=0x8B,
                         Shim6=0x8C,
                         WESP=0x8D,
                         ROHC=0x8E),
                    UBInt16("checksum"),
                    UBInt32("src"),
                    UBInt32("dst"),
                   )

        self.ip = ip.parse(data[:ip.sizeof()])


        self.ip.src = utils.IPv4Address(self.ip.src)