Skip to main content

Classes and utilities to support Flight Test Instrumentation Ethernet networks

Project description

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/*

Project details


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.12.tar.gz (97.8 kB view details)

Uploaded Source

Built Distribution

AcraNetwork-0.17.12-py2.py3-none-any.whl (96.8 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: AcraNetwork-0.17.12.tar.gz
  • Upload date:
  • Size: 97.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.4

File hashes

Hashes for AcraNetwork-0.17.12.tar.gz
Algorithm Hash digest
SHA256 0cc8c6e48179eb8b494aa6ed30633b0361046a0b2d0f0d69851b59cf74f84df7
MD5 f33577e2a40a03a5df2ce9dce8c5a373
BLAKE2b-256 981d7a718da8cd56e8824216c1ec6350dd58e73fd9379021de44c1f0ce2f9eef

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for AcraNetwork-0.17.12-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1ca694f738a14481a89181f99dd7b614a99c00d8c83a451d15305a5fa22dd6a8
MD5 a15abc80ab79aaca42da182d5afd97a9
BLAKE2b-256 96ce42c29057d0b5b762504e1e3c8c83f4dbff9d9cce44fbe00feaf399c85af2

See more details on using hashes here.

Supported by

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