From a7a8264dd9fefb155f3b9b8d0080345416f6546e Mon Sep 17 00:00:00 2001 From: Brian Wylie Date: Thu, 12 Aug 2021 16:03:09 -0600 Subject: [PATCH] doc conversions over to github.io/markdown --- docs/Makefile | 153 ------------------------------------------ docs/changelog.md | 22 ++++++ docs/conf.py | 75 --------------------- docs/index.md | 42 ++++-------- docs/installation.md | 11 --- docs/plans.md | 8 +-- docs/requirements.txt | 3 - 7 files changed, 35 insertions(+), 279 deletions(-) delete mode 100644 docs/Makefile delete mode 100644 docs/conf.py delete mode 100644 docs/installation.md delete mode 100644 docs/requirements.txt diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index 2687c750..00000000 --- a/docs/Makefile +++ /dev/null @@ -1,153 +0,0 @@ -# Makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -PAPER = -BUILDDIR = _build - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . -# the i18n builder cannot share the environment and doctrees with the others -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . - -.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext - -help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " singlehtml to make a single large HTML file" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " devhelp to make HTML files and a Devhelp project" - @echo " epub to make an epub" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " latexpdf to make LaTeX files and run them through pdflatex" - @echo " text to make text files" - @echo " man to make manual pages" - @echo " texinfo to make Texinfo files" - @echo " info to make Texinfo files and run them through makeinfo" - @echo " gettext to make PO message catalogs" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" - -clean: - -rm -rf $(BUILDDIR)/* - -html: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - -dirhtml: - $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." - -singlehtml: - $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml - @echo - @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." - -pickle: - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -json: - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json - @echo - @echo "Build finished; now you can process the JSON files." - -htmlhelp: - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in $(BUILDDIR)/htmlhelp." - -qthelp: - $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp - @echo - @echo "Build finished; now you can run "qcollectiongenerator" with the" \ - ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/pyspotify.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/pyspotify.qhc" - -devhelp: - $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp - @echo - @echo "Build finished." - @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/pyspotify" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/pyspotify" - @echo "# devhelp" - -epub: - $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub - @echo - @echo "Build finished. The epub file is in $(BUILDDIR)/epub." - -latex: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make' in that directory to run these through (pdf)latex" \ - "(use \`make latexpdf' here to do that automatically)." - -latexpdf: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through pdflatex..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -text: - $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text - @echo - @echo "Build finished. The text files are in $(BUILDDIR)/text." - -man: - $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man - @echo - @echo "Build finished. The manual pages are in $(BUILDDIR)/man." - -texinfo: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo - @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." - @echo "Run \`make' in that directory to run these through makeinfo" \ - "(use \`make info' here to do that automatically)." - -info: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo "Running Texinfo files through makeinfo..." - make -C $(BUILDDIR)/texinfo info - @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." - -gettext: - $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale - @echo - @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." - -changes: - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes - @echo - @echo "The overview file is in $(BUILDDIR)/changes." - -linkcheck: - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in $(BUILDDIR)/linkcheck/output.txt." - -doctest: - $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest - @echo "Testing of doctests in the sources finished, look at the " \ - "results in $(BUILDDIR)/doctest/output.txt." diff --git a/docs/changelog.md b/docs/changelog.md index 825c32f0..a80f9227 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1 +1,23 @@ # Changelog + +## 1.9.5 +**[2021-02-07]** + +- New example showing how to process truncated DNS packets (examples/print_dns_truncated.py). +- Corrected typo in BGP.notification attribute. +- BGP.Update.Attribute.MPReachNLRI.SNPA now inherits from dpkt.Packet. +- Byteorder is now specified when packing GRE optional fields. +- \#517: Improvement to Radiotap class, supporting multi-byte and misaligned flags fields. Endianness is now enforced. +- Github issue template added for bug reporting. +- Compliance with flake8 formatting. +- asn1.py::utctime method now returns time in UTC, instead of local. +- Allow multiple InterfaceDescriptionBlocks with pcapng.Writer. +- SCTP decoder DATA chunk padding aligned to 4-bytes, and improved handling of .data field. +- IEEE80211 DELBA frame now works on big and little-endian architectures. +- Introduce compat.ntole which converts from network byte order to little-endian byte order, regardless of host endianness. +- Ethernet class now attempts to unpack the padding and trailer if present. +- Added anonymous property to cipher suites, which returns True if the cipher suite starts with 'anon'. +- Added pfs (Perfect Forward Secrecy) and aead (Authenticated Encryption with Additional Data) properties to cipher suites. +- Added old CHACHA20-POLY1305 related cipher suites to TLS CipherSuite list. +- Remove redundant num_compression_methods from TLSClientHello +- Testing improved from 90% coverage to over 99%. \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py deleted file mode 100644 index a884a298..00000000 --- a/docs/conf.py +++ /dev/null @@ -1,75 +0,0 @@ -# encoding: utf-8 - -"""dpkt documentation build configuration file""" - -from __future__ import unicode_literals - -import os -import re -import sys -import mock - - -def get_version(filename): - init_py = open(filename).read() - metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", init_py)) - return metadata['version'] - - -# -- Workarounds to have autodoc generate API docs ---------------------------- - -sys.path.insert(0, os.path.abspath('..')) - - -# Mock any objects that we might need to -foo = mock.Mock() -foo.__version__ = '0.1.1' -sys.modules['foo'] = foo - - -# -- General configuration ---------------------------------------------------- -needs_sphinx = '1.0' -extensions = [ - 'sphinx.ext.autodoc', - 'sphinx.ext.extlinks', - 'sphinx.ext.intersphinx', - 'sphinx.ext.viewcode', - 'sphinx.ext.autosummary', - 'sphinxcontrib.napoleon' -] - -templates_path = ['_templates'] -source_suffix = '.rst' -master_doc = 'index' - -project = 'dpkt' -copyright = '2009-2019 Dug Song and lots of Contributors' - -release = get_version('../dpkt/__init__.py') -version = '.'.join(release.split('.')[:2]) - -exclude_patterns = ['_build'] - -pygments_style = 'sphinx' - -modindex_common_prefix = ['dpkt.'] - -autodoc_default_flags = ['members', 'undoc-members', 'show-inheritance'] -autodoc_member_order = 'bysource' - - -# -- Options for HTML output -------------------------------------------------- -html_theme = 'default' -html_static_path = ['_static'] - -html_use_modindex = True -html_use_index = True -html_split_index = False -html_show_sourcelink = True - -htmlhelp_basename = 'dpkt' - -# -- Options for extlink extension -------------------------------------------- -extlinks = { - 'issue': ('https://github.com/kbandla/dpkt/issues/%s', '#'), -} diff --git a/docs/index.md b/docs/index.md index 9d7b2ebc..ada9628e 100644 --- a/docs/index.md +++ b/docs/index.md @@ -8,39 +8,21 @@ The dpkt project is a python module for fast, simple packet parsing, with defini pip install dpkt ``` -### Documentation +### Examples +- [Print Packets](print_packets.md) +- [Print ICMP](print_icmp.md) +- [Print HTTP](print_http_requests.md) - - -### Recent Stuff - -**[2021-02-07]** -Released 1.9.5, thanks a bunch to all contributors but mostly to @crocogorical for doing most of the work :) - -1.9.5 Changelog: - -- New example showing how to process truncated DNS packets (examples/print_dns_truncated.py). -- Corrected typo in BGP.notification attribute. -- BGP.Update.Attribute.MPReachNLRI.SNPA now inherits from dpkt.Packet. -- Byteorder is now specified when packing GRE optional fields. -- \#517: Improvement to Radiotap class, supporting multi-byte and misaligned flags fields. Endianness is now enforced. -- Github issue template added for bug reporting. -- Compliance with flake8 formatting. -- asn1.py::utctime method now returns time in UTC, instead of local. -- Allow multiple InterfaceDescriptionBlocks with pcapng.Writer. -- SCTP decoder DATA chunk padding aligned to 4-bytes, and improved handling of .data field. -- IEEE80211 DELBA frame now works on big and little-endian architectures. -- Introduce compat.ntole which converts from network byte order to little-endian byte order, regardless of host endianness. -- Ethernet class now attempts to unpack the padding and trailer if present. -- Added anonymous property to cipher suites, which returns True if the cipher suite starts with 'anon'. -- Added pfs (Perfect Forward Secrecy) and aead (Authenticated Encryption with Additional Data) properties to cipher suites. -- Added old CHACHA20-POLY1305 related cipher suites to TLS CipherSuite list. -- Remove redundant num_compression_methods from TLSClientHello -- Testing improved from 90% coverage to over 99%. +### Documentation +- [DPKT Key Concepts for Creating Parsers](creating_parsers.md) +- [Changelog](changelog.md) +- [Authors](authors.md) +- [Contributing](contributing.md) +- [Project Plans (TBD)](plans.md) +- [Admin Notes](admin_notes.md) ## About -This code is based on [dpkt code](https://code.google.com/p/dpkt/) lead by Dug Song and is now being maintained and improved by an extended set of -[contributors](https://dpkt.readthedocs.org/en/latest/authors.html) and [developers] (https://github.com/kbandla/dpkt/graphs/contributors) +This code is based on [dpkt code](https://code.google.com/p/dpkt/) lead by Dug Song and is now being maintained and improved by an extended set of [developers] (https://github.com/kbandla/dpkt/graphs/contributors). ## LICENSE diff --git a/docs/installation.md b/docs/installation.md deleted file mode 100644 index 23a6613b..00000000 --- a/docs/installation.md +++ /dev/null @@ -1,11 +0,0 @@ -# Installation - -DKPT is now available directly from pypi :) - -## Install the Code - - pip install dpkt - -## Checkout the Code - - git clone https://github.com/kbandla/dpkt.git diff --git a/docs/plans.md b/docs/plans.md index 6f2a1931..cb9a4591 100644 --- a/docs/plans.md +++ b/docs/plans.md @@ -1,9 +1,3 @@ # Development plans -## Current plans - - - Be Awesome - -## Future plans - - - Maintain the Awesome +TBD: Insert Stuff Here diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index 0e912345..00000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -mock >= 1.0 -Sphinx >= 1.0 -sphinxcontrib-napoleon