AcraNetwork
===========
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
.. code-block::
python setup.py install
or clone this repository to your local directory
.. code-block::
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
.. code-block:: python
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
~~~~~~~~~~~~~~~~~~~~~~
.. code-block::
pip install --upgrade pip wheel setuptools twine
rm dist/*
python ./setup.py sdist bdist_wheel --universal sdist
twine upload dist/*
Raw data
{
"_id": null,
"home_page": "https://github.com/diarmuidcwc/AcraNetwork",
"name": "AcraNetwork",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "ACRA, iNetX, FTI, IENA",
"author": "Diarmuid Collins",
"author_email": "dcollins@curtisswright.com",
"download_url": "https://files.pythonhosted.org/packages/b1/f6/dfdbe89aac11098d2f8e0e48833637b5f72dc6903c0a8dd1581a00539862/AcraNetwork-0.17.14.tar.gz",
"platform": null,
"description": "AcraNetwork \n===========\n\nA collection of classes that can be used to decom network or PCM based FTI traffic\n\n\nSummary\n~~~~~~~\n\n\n* iNetX : Class for packing and unpacking iNetX objects\n* IENA : Class for packing and unpacking IENA objects\n* 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\n* Pcap : Class and helper methods for reading pcap files\n* McastSocket : Class to bind to ports to capture multicast packets\n\nInstall\n~~~~~~~\n\nInstall using the standard setuptools install method\n\n.. code-block::\n\n\tpython setup.py install\n\n\nor clone this repository to your local directory\n\n.. code-block::\n\n\tgit clone https://github.com/diarmuidcwc/AcraNetwork.git\n\n\nUsage\n~~~~~\n\nHere are two brief examples on how to create and read a pcap file. Further examples can be viewed in the examples\ndirectory or in the unittest folder\n\nTo read in a pcap file with multiple ethernet packets all containing an iNetX packet wrapped in UDP\n\n.. code-block:: python\n\n\timport AcraNetwork.iNetX as inetx\n\timport AcraNetwork.SimpleEthernet as SimpleEthernet\n\timport AcraNetwork.Pcap as pcap\n\n\timport struct\n\tmypcap = pcap.Pcap(\"inetx_test.pcap\") # Read the pcap file\n\tfor mypcaprecord in mypcap:\n\n\t\tethpacket = SimpleEthernet.Ethernet() # Create an Ethernet object\n\t\tethpacket.unpack(mypcaprecord.packet) # Unpack the pcap record into the eth object\n\t\tippacket = SimpleEthernet.IP() # Create an IP packet\n\t\tippacket.unpack(ethpacket.payload) # Unpack the ethernet payload into the IP packet\n\t\tudppacket = SimpleEthernet.UDP() # Create a UDP packet\n\t\tudppacket.unpack(ippacket.payload) # Unpack the IP payload into the UDP packet\n\t\tinetxpacket = inetx.iNetX() # Create an iNetx object\n\t\tinetxpacket.unpack(udppacket.payload) # Unpack the UDP payload into this iNetX object\n\t\tprint(\"INETX: StreamID ={:08X} Sequence = {:8d} PTP Seconds = {}\".format(inetxpacket.streamid,inetxpacket.sequence,inetxpacket.ptptimeseconds))\n\n\nTo Make a Distribution\n~~~~~~~~~~~~~~~~~~~~~~\n\n.. code-block::\n\n\tpip install --upgrade pip wheel setuptools twine\n\trm dist/*\n\tpython ./setup.py sdist bdist_wheel --universal sdist\n\ttwine upload dist/*\n\n\n",
"bugtrack_url": null,
"license": "GNU GPLv3",
"summary": "Classes and utilities to support Flight Test Instrumentation Ethernet networks",
"version": "0.17.14",
"project_urls": {
"Homepage": "https://github.com/diarmuidcwc/AcraNetwork"
},
"split_keywords": [
"acra",
" inetx",
" fti",
" iena"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "286c4c8832fc07001fe1f32a0461e5ddbed21978998258b71ccdf4521adb0433",
"md5": "bca1c414bb716a09705d541d98a4d575",
"sha256": "26aecd9f97bf171fb65ade973cbbdff55ee7361e93951b3da417ab7c54b0dbde"
},
"downloads": -1,
"filename": "AcraNetwork-0.17.14-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "bca1c414bb716a09705d541d98a4d575",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.7",
"size": 99506,
"upload_time": "2024-11-20T10:40:08",
"upload_time_iso_8601": "2024-11-20T10:40:08.409218Z",
"url": "https://files.pythonhosted.org/packages/28/6c/4c8832fc07001fe1f32a0461e5ddbed21978998258b71ccdf4521adb0433/AcraNetwork-0.17.14-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b1f6dfdbe89aac11098d2f8e0e48833637b5f72dc6903c0a8dd1581a00539862",
"md5": "237598d493494467a44c3c731daf3936",
"sha256": "e262ba86795ca9f0864062d889714a3edc08b767e60d954caa770890da9ecb4f"
},
"downloads": -1,
"filename": "AcraNetwork-0.17.14.tar.gz",
"has_sig": false,
"md5_digest": "237598d493494467a44c3c731daf3936",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 99898,
"upload_time": "2024-11-20T10:40:09",
"upload_time_iso_8601": "2024-11-20T10:40:09.895012Z",
"url": "https://files.pythonhosted.org/packages/b1/f6/dfdbe89aac11098d2f8e0e48833637b5f72dc6903c0a8dd1581a00539862/AcraNetwork-0.17.14.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-20 10:40:09",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "diarmuidcwc",
"github_project": "AcraNetwork",
"travis_ci": true,
"coveralls": false,
"github_actions": false,
"lcname": "acranetwork"
}