Skip to main content

A collection of classes that can be used to decom network or PCM based FTI traffic

Summary

  • iNetX : Class for packing and unpacking iNetX objects

  • IENA : Class for packing and unpacking IENA objects

  • SimpleEthernet : A simplified set of classes for Ethernet, IP and UDP packets. These are not fully featured is sufficient for the network systems used in the KAM500 networks

  • Pcap : Class and helper methods for reading pcap files

  • McastSocket : Class to bind to ports to capture multicast packets

Install

Install using the standard setuptools install method

python setup.py install

or clone this repository to your local directory

git clone https://github.com/diarmuidcwc/AcraNetwork.git

Usage

Here are two brief examples on how to create and read a pcap file. Further examples can be viewed in the examples directory or in the unittest folder

To read in a pcap file with multiple ethernet packets all containing an iNetX packet wrapped in UDP

import AcraNetwork.iNetX as inetx
import AcraNetwork.SimpleEthernet as SimpleEthernet
import AcraNetwork.Pcap as pcap

import struct
mypcap = pcap.Pcap("inetx_test.pcap")       # Read the pcap file
for mypcaprecord in mypcap:

        ethpacket = SimpleEthernet.Ethernet()   # Create an Ethernet object
        ethpacket.unpack(mypcaprecord.packet)   # Unpack the pcap record into the eth object
        ippacket =  SimpleEthernet.IP()         # Create an IP packet
        ippacket.unpack(ethpacket.payload)      # Unpack the ethernet payload into the IP packet
        udppacket = SimpleEthernet.UDP()        # Create a UDP packet
        udppacket.unpack(ippacket.payload)      # Unpack the IP payload into the UDP packet
        inetxpacket = inetx.iNetX()             # Create an iNetx object
        inetxpacket.unpack(udppacket.payload)   # Unpack the UDP payload into this iNetX object
        print("INETX: StreamID ={:08X} Sequence = {:8d} PTP Seconds = {}".format(inetxpacket.streamid,inetxpacket.sequence,inetxpacket.ptptimeseconds))

To Make a Distribution

pip  install --upgrade pip wheel setuptools twine
rm dist/*
python ./setup.py sdist bdist_wheel --universal sdist
twine upload dist/*

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

AcraNetwork-0.17.8.tar.gz (100.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

AcraNetwork-0.17.8-py2.py3-none-any.whl (103.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file AcraNetwork-0.17.8.tar.gz.

File metadata

  • Download URL: AcraNetwork-0.17.8.tar.gz
  • Upload date:
  • Size: 100.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for AcraNetwork-0.17.8.tar.gz
Algorithm Hash digest
SHA256 5c497aae15ce0f3111837525eb82e8444af83ce0dd8a570dc2365f1b8a053169
MD5 34a41e8a6b59559b72a0534e8640b7e4
BLAKE2b-256 d01ee4771466328c74192d40d3bf36b965c0dd5457cd81fabd2dca36c73c1e05

See more details on using hashes here.

File details

Details for the file AcraNetwork-0.17.8-py2.py3-none-any.whl.

File metadata

  • Download URL: AcraNetwork-0.17.8-py2.py3-none-any.whl
  • Upload date:
  • Size: 103.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for AcraNetwork-0.17.8-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b68686009a27bc17761e34d9a5d207bb385cbc6e6154169f9dab8c67b2dd23f1
MD5 def228ecd6808e9fa437a185c5530d72
BLAKE2b-256 9154dad8e6f8a6d20a4eb7260cfb747d40385805f6159dbc454c477c68c65c83

See more details on using hashes here.

Release history Release notifications | RSS feed

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page