{ "info": { "author": "Diarmuid Collins", "author_email": "dcollins@curtisswright.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "AcraNetwork [![Build Status](https://travis-ci.org/diarmuidcwc/AcraNetwork.svg?branch=master)](https://travis-ci.org/diarmuidcwc/AcraNetwork)\n===========\n\nA collection of classes that can be used to decom network or PCM based FTI traffic\n\n#Summary\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\nsufficient 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\n#Install\nInstall using the standard setuptools install method\n```shell\npython setup.py install\n```\nor clone this repository to your local directory\n\n```shell\ngit clone https://github.com/diarmuidcwc/AcraNetwork.git\n```\n\n#Classes\n\n##iNetx\nThis will create an iNetx object. Once you have an iNetX object you can then either\n* assign values to the various fields and then convert(pack) the object into a buffer that is suitable for transmission\nor writing to a file or\n* convert (unpack) a buffer containing an iNetX packet\n\n###Methods\n\n####pack()\n\nThis method will take an iNetX object and return a string buffer containing the binary representation of the iNetX packet\nThis method is typically run if you want to write an iNetX packet to a file or to transmit over the network\n\n####unpack(buffer)\n\nThis method will convert a binary buffer into an iNetX object. This is typically used to convert some data read from a\npcap file or captured from the network into the iNetX object.\n\n####setPacketTime(utctimeinseconds,timeinmicroseconds)\n\nThis method will accept two arguments, utctimeinseconds and nanoseconds and assign the time to the iNetX object\n\n\n##IENA\n\nThis will create an IENA object. Once you have an IENA object you can then either\n* assign values to the various fields and then convert(pack) the object into a buffer that is suitable for transmission\nor writing to a file or\n* convert (unpack) a buffer containing an IENA packet\n\n###Methods\n\n####pack()\n\nThis method will take an IENA object and return a string buffer containing the binary representation of the IENA packet.\nThis method is typically run if you want to write an IENA packet to a file or to transmit over the network\n\n####unpack(buffer)\n\nThis method will convert a binary buffer into an IENA object. This is typically used to convert some data read from a\npcap file or captured from the network into the IENA object.\n\n####setPacketTime(utctimeinseconds,timeinnanoseconds)\n\nThis method will accept two arguments, utctimeinseconds and microseconds and assign the time to the IENA object\n\n##Ethernet / IP / UDP\n\nEach of these classes will create the corresponding object. Once you create this object you can then either\n* assign values to the various fields and then convert(pack) the object into a buffer that is suitable for transmission\nor writing to a file or\n* convert (unpack) a buffer containing the packet\n\n###Methods\n\n####pack()\n\nThis method will take the object and return a string buffer containing the binary representation of the packet.\nThis method is typically run if you want to write a packet to a file or to transmit over the network\n\n####unpack(buffer)\n\nThis method will convert a binary buffer into an object. This is typically used to convert some data read from a\npcap file or captured from the network into the IENA object.\n\n##Pcap\n\nThis class will allow you to read and write to a Pcap file. Due to the potentially large size of pcap files, the complete\nfile is not read or written in one operation but in pieces. This keeps the memory usage to a minimum\n\n###Methods\n\n####__init__()\n\nTo create a new pcap object you need to supply a filename and a flag to indicate if you want to read or write to this\nfile. eg\n```python\npcap_for_reading = pcap.Pcap(\"input.pcap\") \t\t\t\t\t\t# Create a new Pcap object based on reading from the file\npcap_for_writing = pcap.Pcap(\"output.pcap\",mode='w')\t# Create a new Pcap object that will be writing to a file\npcap_for_appending = pcap.Pcap(\"output.pcap\",mode='a')\t# Open an existing pcap file for appending\n```\n\n####readGlobalHeader()\n\nWhen reading a pcap file this should be the first method called. This method will populate the fields in the Pcap object\nas described in the [Pcap Wiki](http://wiki.wireshark.org/Development/LibpcapFileFormat#Global_Header)\n\n####readAPacket()\n\nThis method is called when reading a pcap file. It can be called repeatedly until the end of the file is reached and\nthe method raises an IOError exception\nThis method will return a PcapRecord object which will contain one pcap record, containing the header and payload\n\n####writeGlobalHeader()\n\nWhen creating a new pcap file, this method should be called first. It will write a valid global header to the file.\nWhen creating a new Pcap object the defaults used in the object will generate a standard pcap file that will support\nEthernet packets\n\n####writeARecord(pcaprecord)\n\nWrite out one pcap record to the file. The argument is required to be a PcapRecord object\n\n####close()\n\nClose the pcap file\n\n\n\n\n#Usage\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```python\nimport sys\nsys.path.append(\"..\")\n\nimport AcraNetwork.iNetX as inetx\nimport AcraNetwork.SimpleEthernet as SimpleEthernet\nimport AcraNetwork.Pcap as pcap\n\nimport struct\nmypcap = pcap.Pcap(\"inetx_test.pcap\") # Read the pcap file\nmypcap.readGlobalHeader()\nwhile True:\n\t# Loop through the pcap file reading one packet at a time\n\ttry:\n\t\tmypcaprecord = mypcap.readAPacket()\n\texcept IOError:\n\t\t# End of file reached\n\t\tbreak\n\n\tethpacket = SimpleEthernet.Ethernet() # Create an Ethernet object\n\tethpacket.unpack(mypcaprecord.packet) # Unpack the pcap record into the eth object\n\tippacket = SimpleEthernet.IP() # Create an IP packet\n\tippacket.unpack(ethpacket.payload) # Unpack the ethernet payload into the IP packet\n\tudppacket = SimpleEthernet.UDP() # Create a UDP packet\n\tudppacket.unpack(ippacket.payload) # Unpack the IP payload into the UDP packet\n\tinetxpacket = inetx.iNetX() # Create an iNetx object\n\tinetxpacket.unpack(udppacket.payload) # Unpack the UDP payload into this iNetX object\n\tprint \"INETX: StreamID ={:08X} Sequence = {:8d} PTP Seconds = {}\".format(inetxpacket.streamid,inetxpacket.sequence,inetxpacket.ptptimeseconds)\n```\n\n#To Make a Distribution\n```\npython setup.py sdist bdist_wininst upload\n```", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/diarmuidcwc/AcraNetwork", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "AcraNetwork", "package_url": "https://pypi.org/project/AcraNetwork/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/AcraNetwork/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/diarmuidcwc/AcraNetwork" }, "release_url": "https://pypi.org/project/AcraNetwork/0.7.5/", "requires_dist": null, "requires_python": null, "summary": "Classes and utilities to support Flight Test Instrumentation Ethernet networks", "version": "0.7.5" }, "last_serial": 2845715, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "845d49a5df895c7bbc672fe2c6b1704d", "sha256": "2d193a1be242dbcade14acb8d1a025a1fc0348f277f2ffa4c30d475fa27fb337" }, "downloads": -1, "filename": "AcraNetwork-0.1.win32.exe", "has_sig": false, "md5_digest": "845d49a5df895c7bbc672fe2c6b1704d", "packagetype": "bdist_wininst", "python_version": "2.7", "requires_python": null, "size": 214594, "upload_time": "2014-03-18T13:03:10", "url": "https://files.pythonhosted.org/packages/56/11/3d149892bf1bb013aafdd79a95827a281005a0e4012c8500d1276a6fd8aa/AcraNetwork-0.1.win32.exe" }, { "comment_text": "", "digests": { "md5": "4e345ce5ed62668d12379b3470ada10a", "sha256": "586ba45ff6a9c85fd0ffc8849765e6c2a2ef2da6fc05a9e5f9234165aa1a38cc" }, "downloads": -1, "filename": "AcraNetwork-0.1.zip", "has_sig": false, "md5_digest": "4e345ce5ed62668d12379b3470ada10a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26861, "upload_time": "2014-03-18T13:00:54", "url": "https://files.pythonhosted.org/packages/9f/0c/4b95c0a2f7e0c9a667bb34982c408f0d039abd73d1453d79c8bb6de859ec/AcraNetwork-0.1.zip" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "811e8beb637721bbae016b9f327ebf40", "sha256": "56b1b48f2c96cfe386dc0080b41fcdb95754ecae40669d2547e07af36e7da2dd" }, "downloads": -1, "filename": "AcraNetwork-0.2.tar.gz", "has_sig": false, "md5_digest": "811e8beb637721bbae016b9f327ebf40", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25730, "upload_time": "2015-11-17T21:05:35", "url": "https://files.pythonhosted.org/packages/72/f6/645248efb86281a57823da2bac1398818e9d9214cdf3906bc6735f29d918/AcraNetwork-0.2.tar.gz" }, { "comment_text": "", "digests": { "md5": "bfcf7f35c78499c902dd7112bcb92526", "sha256": "7c594d4594841ff45c2abf8a8b3bc3c96a33adb8e5167da5650c7602bedabdf9" }, "downloads": -1, "filename": "AcraNetwork-0.2.win32.exe", "has_sig": false, "md5_digest": "bfcf7f35c78499c902dd7112bcb92526", "packagetype": "bdist_wininst", "python_version": "2.7", "requires_python": null, "size": 227219, "upload_time": "2015-11-18T10:29:48", "url": "https://files.pythonhosted.org/packages/a7/f7/04f945d59098391d0f50a34dcb459cf0a5c25baf7e8b13a7322ea821721f/AcraNetwork-0.2.win32.exe" } ], "0.3": [], "0.4": [ { "comment_text": "", "digests": { "md5": "4a37984d53b64c68b84d80d241bd001f", "sha256": "cc645bb96d59ccac1082fae6c4da754bef65f5c577300b4ec7ee4581aaaa9e94" }, "downloads": -1, "filename": "AcraNetwork-0.4.tar.gz", "has_sig": false, "md5_digest": "4a37984d53b64c68b84d80d241bd001f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27074, "upload_time": "2015-12-26T08:44:51", "url": "https://files.pythonhosted.org/packages/aa/3b/fb7576e7db1d4ee27378333952ee1c9f6c9de877664fa8d574ef28422884/AcraNetwork-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "504107eec7447f388bf20a4050615e81", "sha256": "9ca2d64e3ee52e2bc050fff3275b70b991089636600662197279848f3accad03" }, "downloads": -1, "filename": "AcraNetwork-0.5.tar.gz", "has_sig": false, "md5_digest": "504107eec7447f388bf20a4050615e81", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27979, "upload_time": "2015-12-26T09:04:24", "url": "https://files.pythonhosted.org/packages/e3/6f/82bdbabbf28023b2333ac85a345178e2206ac55af7df1fb7b6c2120a51c8/AcraNetwork-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "54375775edff7581845442f1bec26244", "sha256": "1b1dc042850edd8b5e7551efc7f775ffba4b7bccf96b7089b545d1812f5e1357" }, "downloads": -1, "filename": "AcraNetwork-0.6.tar.gz", "has_sig": false, "md5_digest": "54375775edff7581845442f1bec26244", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28564, "upload_time": "2015-12-26T09:12:17", "url": "https://files.pythonhosted.org/packages/fd/40/1fdfe9ce597718cfd01f40cb344d3020ff27888b97f1c3ca69d9016b20b4/AcraNetwork-0.6.tar.gz" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "7d5ef92e1285c42b5ffba32ded7fec13", "sha256": "df94e5eb557a99625a1ae3ad17cb9ad09ccb73fada3b69bd05bf737ea5db27c9" }, "downloads": -1, "filename": "AcraNetwork-0.7.zip", "has_sig": false, "md5_digest": "7d5ef92e1285c42b5ffba32ded7fec13", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 49188, "upload_time": "2016-06-03T08:32:29", "url": "https://files.pythonhosted.org/packages/cc/07/c0f11ea88d1e1ebccb73c48cb4b810a0515252c766d64edea26302e9d8c3/AcraNetwork-0.7.zip" } ], "0.7.3": [ { "comment_text": "", "digests": { "md5": "1079ce9ab340a281f4cc026698a548c3", "sha256": "2e64685f634d8d834c23d0f9e6e54bfaff658a5fc20efd094f11285a685d6088" }, "downloads": -1, "filename": "AcraNetwork-0.7.3.win32.exe", "has_sig": false, "md5_digest": "1079ce9ab340a281f4cc026698a548c3", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 230723, "upload_time": "2016-08-24T08:36:21", "url": "https://files.pythonhosted.org/packages/66/a3/a3715a83d56359f759552b1001d51f609de9f306b45a2fa8cc402dc7e86e/AcraNetwork-0.7.3.win32.exe" }, { "comment_text": "", "digests": { "md5": "72d9c537886e0e872a84330410dafa14", "sha256": "9de95042ff97185046c2e9d26fc61e521af8009d7caf703b816c57e4679f8f09" }, "downloads": -1, "filename": "AcraNetwork-0.7.3.zip", "has_sig": false, "md5_digest": "72d9c537886e0e872a84330410dafa14", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 52687, "upload_time": "2016-08-24T08:36:17", "url": "https://files.pythonhosted.org/packages/92/b0/2ce57b69dab7f84b870efdbe043b1486ba5a05ac02a7862a7a7b8075c544/AcraNetwork-0.7.3.zip" } ], "0.7.4": [ { "comment_text": "", "digests": { "md5": "4469216a40b7f42f9774d6a3e05ae2b4", "sha256": "b3757e89eeadaf8a5865804427dfa3eac08926929c63b22aa6c7e6ef064235d7" }, "downloads": -1, "filename": "AcraNetwork-0.7.4.tar.gz", "has_sig": false, "md5_digest": "4469216a40b7f42f9774d6a3e05ae2b4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32139, "upload_time": "2016-10-24T19:41:23", "url": "https://files.pythonhosted.org/packages/36/22/643c455ac0c50d42916d52b9b476e86fe245f03e8d9e8b8ee8dc66fc7970/AcraNetwork-0.7.4.tar.gz" } ], "0.7.5": [ { "comment_text": "", "digests": { "md5": "422009e8bab066fe20a4ae9a915455f6", "sha256": "4ab7bae3d48d55117a2d877c415645c97121a7fb6a7804d7896efd5c018604b0" }, "downloads": -1, "filename": "AcraNetwork-0.7.5.win32.exe", "has_sig": false, "md5_digest": "422009e8bab066fe20a4ae9a915455f6", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 231044, "upload_time": "2017-05-02T07:46:23", "url": "https://files.pythonhosted.org/packages/cb/b4/1db8fb3756cbea53e43c8479f6fdae98c817db3350b72ba4ec73cc1d7e9f/AcraNetwork-0.7.5.win32.exe" }, { "comment_text": "", "digests": { "md5": "b77bdc1b59a1eae31a56932877e3bb13", "sha256": "6a11c8779209b3720c74f5438d4ede2c650706212e8af00b3a8ef4145b506ffc" }, "downloads": -1, "filename": "AcraNetwork-0.7.5.zip", "has_sig": false, "md5_digest": "b77bdc1b59a1eae31a56932877e3bb13", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 53026, "upload_time": "2017-05-02T07:46:15", "url": "https://files.pythonhosted.org/packages/e8/d6/0fa21a06a24cc9d9763db8970944b4e1b837b1d07fb53fdb074d68f7147f/AcraNetwork-0.7.5.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "422009e8bab066fe20a4ae9a915455f6", "sha256": "4ab7bae3d48d55117a2d877c415645c97121a7fb6a7804d7896efd5c018604b0" }, "downloads": -1, "filename": "AcraNetwork-0.7.5.win32.exe", "has_sig": false, "md5_digest": "422009e8bab066fe20a4ae9a915455f6", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 231044, "upload_time": "2017-05-02T07:46:23", "url": "https://files.pythonhosted.org/packages/cb/b4/1db8fb3756cbea53e43c8479f6fdae98c817db3350b72ba4ec73cc1d7e9f/AcraNetwork-0.7.5.win32.exe" }, { "comment_text": "", "digests": { "md5": "b77bdc1b59a1eae31a56932877e3bb13", "sha256": "6a11c8779209b3720c74f5438d4ede2c650706212e8af00b3a8ef4145b506ffc" }, "downloads": -1, "filename": "AcraNetwork-0.7.5.zip", "has_sig": false, "md5_digest": "b77bdc1b59a1eae31a56932877e3bb13", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 53026, "upload_time": "2017-05-02T07:46:15", "url": "https://files.pythonhosted.org/packages/e8/d6/0fa21a06a24cc9d9763db8970944b4e1b837b1d07fb53fdb074d68f7147f/AcraNetwork-0.7.5.zip" } ] }