diff --git a/.gitignore b/.gitignore index 6e92f57..23c2073 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,8 @@ tags +doxygen1 +doxygen3 +doxygen7 +doxyfile1.stamp +doxyfile3.stamp +doxyfile7.stamp +docs/* diff --git a/docs/.directory b/docs/.directory new file mode 100644 index 0000000..e69de29 diff --git a/src/Makefile.am b/src/Makefile.am index ca9591b..048ca94 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -24,6 +24,7 @@ hashpipe_base = hashpipe.h \ hashpipe_udp.c hashpipe_exec = hashpipe.c \ + hashpipe_decls.h \ hashpipe_thread_args.h \ hashpipe_thread_args.c \ null_output_thread.c @@ -68,6 +69,7 @@ libhashpipe_la_LIBADD = libhashpipestatus.la include_HEADERS = fitshead.h \ hashpipe.h \ + hashpipe_decls.h \ hashpipe_databuf.h \ hashpipe_error.h \ hashpipe_packet.h \ @@ -91,3 +93,39 @@ install-exec-hook: chmod u+s $(DESTDIR)$(bindir)/hashpipe$(EXEEXT) # vi: set ts=8 noet : +if HAVE_DOXYGEN +directory1 = $(top_srcdir)/../docs/man/man1/* +directory3 = $(top_srcdir)/../docs/man/man3/* +directory7 = $(top_srcdir)/../docs/man/man7/* + +man1_MANS = $(directory1) +man3_MANS = $(directory3) +man7_MANS = $(directory7) + +$(directory1): doxyfile1.stamp + +$(directory3): doxyfile3.stamp + +$(directory7): doxyfile7.stamp + +doxyfile1.stamp: doxygen1 + $(DOXYGEN) $^ + echo Timestamp > $@ + +doxyfile3.stamp: doxygen3 + $(DOXYGEN) $^ + echo Timestamp > $@ + +doxyfile7.stamp: doxygen7 + $(DOXYGEN) $^ + echo Timestamp > $@ + +CLEANFILES = doxyfile1.stamp doxyfile3.stamp doxyfile7.stamp + +clean-local: clean-local-doxygen + +all-local: doxyfile1.stamp doxyfile3.stamp doxyfile7.stamp +clean-local-doxygen: + -rm -rf $(top_srcdir)/../docs/man + +endif diff --git a/src/configure.ac b/src/configure.ac index d68438d..a810221 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.65]) -AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS]) +AC_INIT([hashpipe], [1.7-dev], [BUG-REPORT-ADDRESS]) AM_INIT_AUTOMAKE([foreign]) LT_INIT AM_SILENT_RULES([yes]) @@ -44,6 +44,15 @@ AC_TYPE_UINT64_T AC_FUNC_MALLOC AC_CHECK_FUNCS([floor gettimeofday memset socket strchr strerror strrchr strtol strtoul strtoull]) +AC_CHECK_PROGS([DOXYGEN], [doxygen]) +if test -z "$DOXYGEN"; then + AC_MSG_WARN([Doxygen not found - continue without Doxygen support]) +fi +AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"]) +AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([doxygen1])]) +AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([doxygen3])]) +AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([doxygen7])]) + # Report results build_hpibv="will NOT" if test "${ac_cv_lib_ibverbs_ibv_get_device_list}" = "yes" diff --git a/src/doxygen1.in b/src/doxygen1.in new file mode 100644 index 0000000..0f4c137 --- /dev/null +++ b/src/doxygen1.in @@ -0,0 +1,422 @@ +# Doxyfile 1.8.13 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +DOXYFILE_ENCODING = UTF-8 +PROJECT_NAME = "hashpipe" +PROJECT_NUMBER = @VERSION@ +PROJECT_BRIEF = "High Availibility Shared Pipeline Engine" +PROJECT_LOGO = +OUTPUT_DIRECTORY = "../docs" +CREATE_SUBDIRS = NO +ALLOW_UNICODE_NAMES = NO +OUTPUT_LANGUAGE = English +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES + +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the + +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = YES +STRIP_FROM_PATH = +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = NO +QT_AUTOBRIEF = NO +MULTILINE_CPP_IS_BRIEF = NO +INHERIT_DOCS = YES +SEPARATE_MEMBER_PAGES = NO +TAB_SIZE = 4 +ALIASES = "synopsis=@par SYNOPSIS\n" +TCL_SUBST = +OPTIMIZE_OUTPUT_FOR_C = YES +OPTIMIZE_OUTPUT_JAVA = NO +OPTIMIZE_FOR_FORTRAN = NO +OPTIMIZE_OUTPUT_VHDL = NO +EXTENSION_MAPPING = +MARKDOWN_SUPPORT = YES +TOC_INCLUDE_HEADINGS = 0 +AUTOLINK_SUPPORT = YES +BUILTIN_STL_SUPPORT = NO +CPP_CLI_SUPPORT = NO +SIP_SUPPORT = NO +IDL_PROPERTY_SUPPORT = YES +DISTRIBUTE_GROUP_DOC = NO +GROUP_NESTED_COMPOUNDS = NO +SUBGROUPING = YES +INLINE_GROUPED_CLASSES = NO +INLINE_SIMPLE_STRUCTS = NO +TYPEDEF_HIDES_STRUCT = NO +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +EXTRACT_ALL = NO +EXTRACT_PRIVATE = NO +EXTRACT_PACKAGE = NO +EXTRACT_STATIC = NO +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = NO +EXTRACT_ANON_NSPACES = NO +HIDE_UNDOC_MEMBERS = YES +HIDE_UNDOC_CLASSES = YES +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = NO +CASE_SENSE_NAMES = YES +HIDE_SCOPE_NAMES = NO +HIDE_COMPOUND_REFERENCE= NO +SHOW_INCLUDE_FILES = YES +SHOW_GROUPED_MEMB_INC = NO +FORCE_LOCAL_INCLUDES = NO +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +SORT_BRIEF_DOCS = NO +SORT_MEMBERS_CTORS_1ST = NO +SORT_GROUP_NAMES = NO +SORT_BY_SCOPE_NAME = NO +STRICT_PROTO_MATCHING = NO +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES +SHOW_FILES = YES +SHOW_NAMESPACES = YES +FILE_VERSION_FILTER = +LAYOUT_FILE = +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = NO +WARN_AS_ERROR = NO +WARN_FORMAT = "$file:$line: $text" +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +INPUT = hashpipe.c +INPUT_ENCODING = UTF-8 +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.cpp \ + *.c++ \ + *.java \ + *.ii \ + *.ixx \ + *.ipp \ + *.i++ \ + *.inl \ + *.idl \ + *.ddl \ + *.odl \ + *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ \ + *.cs \ + *.d \ + *.php \ + *.php4 \ + *.php5 \ + *.phtml \ + *.inc \ + *.m \ + *.markdown \ + *.md \ + *.mm \ + *.dox \ + *.py \ + *.pyw \ + *.f90 \ + *.f95 \ + *.f03 \ + *.f08 \ + *.f \ + *.for \ + *.tcl \ + *.vhd \ + *.vhdl \ + *.ucf \ + *.qsf +RECURSIVE = NO + +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXCLUDE_SYMBOLS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = * +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +FILTER_SOURCE_PATTERNS = +USE_MDFILE_AS_MAINPAGE = + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +SOURCE_BROWSER = NO +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = NO +REFERENCES_RELATION = NO +REFERENCES_LINK_SOURCE = YES +SOURCE_TOOLTIPS = YES +USE_HTAGS = NO +VERBATIM_HEADERS = YES +CLANG_ASSISTED_PARSING = NO +CLANG_OPTIONS = + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +ALPHABETICAL_INDEX = YES +COLS_IN_ALPHA_INDEX = 5 +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +GENERATE_HTML = NO +HTML_OUTPUT = html +HTML_FILE_EXTENSION = .html +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_EXTRA_STYLESHEET = +HTML_EXTRA_FILES = +HTML_COLORSTYLE_HUE = 220 +HTML_COLORSTYLE_SAT = 100 +HTML_COLORSTYLE_GAMMA = 80 +HTML_TIMESTAMP = NO +HTML_DYNAMIC_SECTIONS = NO +HTML_INDEX_NUM_ENTRIES = 100 +GENERATE_DOCSET = NO +DOCSET_FEEDNAME = "Doxygen generated docs" +DOCSET_BUNDLE_ID = org.doxygen.Project +DOCSET_PUBLISHER_ID = org.doxygen.Publisher +DOCSET_PUBLISHER_NAME = Publisher +GENERATE_HTMLHELP = NO +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +CHM_INDEX_ENCODING = +BINARY_TOC = NO +TOC_EXPAND = NO +GENERATE_QHP = NO +QCH_FILE = +QHP_NAMESPACE = org.doxygen.Project +QHP_VIRTUAL_FOLDER = doc +QHP_CUST_FILTER_NAME = +QHP_CUST_FILTER_ATTRS = +QHP_SECT_FILTER_ATTRS = +QHG_LOCATION = +GENERATE_ECLIPSEHELP = NO +ECLIPSE_DOC_ID = org.doxygen.Project +DISABLE_INDEX = NO +GENERATE_TREEVIEW = NO +ENUM_VALUES_PER_LINE = 4 +TREEVIEW_WIDTH = 250 +EXT_LINKS_IN_WINDOW = NO +FORMULA_FONTSIZE = 10 +FORMULA_TRANSPARENT = YES +USE_MATHJAX = NO +MATHJAX_FORMAT = HTML-CSS +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest +MATHJAX_EXTENSIONS = +MATHJAX_CODEFILE = +SEARCHENGINE = YES +SERVER_BASED_SEARCH = NO +EXTERNAL_SEARCH = NO +SEARCHENGINE_URL = +SEARCHDATA_FILE = searchdata.xml +EXTERNAL_SEARCH_ID = +EXTRA_SEARCH_MAPPINGS = + +#--------------------------------------------------------------------------- +# Configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +GENERATE_LATEX = NO +LATEX_OUTPUT = latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = a4 +EXTRA_PACKAGES = +LATEX_HEADER = +LATEX_FOOTER = +LATEX_EXTRA_STYLESHEET = +LATEX_EXTRA_FILES = +PDF_HYPERLINKS = YES +USE_PDFLATEX = YES +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = NO +LATEX_SOURCE_CODE = NO +LATEX_BIB_STYLE = plain +LATEX_TIMESTAMP = NO + +#--------------------------------------------------------------------------- +# Configuration options related to the RTF output +#--------------------------------------------------------------------------- + +GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +RTF_SOURCE_CODE = NO + +#--------------------------------------------------------------------------- +# Configuration options related to the man page output +#--------------------------------------------------------------------------- + +GENERATE_MAN = YES +MAN_OUTPUT = man +MAN_EXTENSION = .1 +MAN_SUBDIR = +MAN_LINKS = YES + +#--------------------------------------------------------------------------- +# Configuration options related to the XML output +#--------------------------------------------------------------------------- + +GENERATE_XML = NO +XML_OUTPUT = xml +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# Configuration options related to the DOCBOOK output +#--------------------------------------------------------------------------- + +GENERATE_DOCBOOK = NO +DOCBOOK_OUTPUT = docbook +DOCBOOK_PROGRAMLISTING = NO + +#--------------------------------------------------------------------------- +# Configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# Configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration options related to external references +#--------------------------------------------------------------------------- + +TAGFILES = +GENERATE_TAGFILE = +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +EXTERNAL_PAGES = YES +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +CLASS_DIAGRAMS = NO +MSCGEN_PATH = +DIA_PATH = +HIDE_UNDOC_RELATIONS = YES +HAVE_DOT = NO +DOT_NUM_THREADS = 0 +DOT_FONTNAME = Helvetica +DOT_FONTSIZE = 10 +DOT_FONTPATH = +CLASS_GRAPH = NO +COLLABORATION_GRAPH = NO +GROUP_GRAPHS = NO +UML_LOOK = NO +UML_LIMIT_NUM_FIELDS = 10 +TEMPLATE_RELATIONS = NO +INCLUDE_GRAPH = NO +INCLUDED_BY_GRAPH = YES +CALL_GRAPH = NO +CALLER_GRAPH = NO +GRAPHICAL_HIERARCHY = YES +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = png +INTERACTIVE_SVG = NO +DOT_PATH = +DOTFILE_DIRS = +MSCFILE_DIRS = +DIAFILE_DIRS = +PLANTUML_JAR_PATH = +PLANTUML_CFG_FILE = +PLANTUML_INCLUDE_PATH = +DOT_GRAPH_MAX_NODES = 50 +MAX_DOT_GRAPH_DEPTH = 0 +DOT_TRANSPARENT = NO +DOT_MULTI_TARGETS = NO +GENERATE_LEGEND = YES +DOT_CLEANUP = YES diff --git a/src/doxygen3.in b/src/doxygen3.in new file mode 100644 index 0000000..057b666 --- /dev/null +++ b/src/doxygen3.in @@ -0,0 +1,422 @@ +# Doxyfile 1.8.13 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +DOXYFILE_ENCODING = UTF-8 +PROJECT_NAME = "hashpipe" +PROJECT_NUMBER = @PACKAGE_VERSION@ +PROJECT_BRIEF = "High Availibility Shared Pipeline Engine" +PROJECT_LOGO = +OUTPUT_DIRECTORY = "../docs" +CREATE_SUBDIRS = NO +ALLOW_UNICODE_NAMES = NO +OUTPUT_LANGUAGE = English +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES + +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the + +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = YES +STRIP_FROM_PATH = +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = NO +QT_AUTOBRIEF = NO +MULTILINE_CPP_IS_BRIEF = NO +INHERIT_DOCS = YES +SEPARATE_MEMBER_PAGES = NO +TAB_SIZE = 4 +ALIASES = "synopsis=@par SYNOPSIS\n" +TCL_SUBST = +OPTIMIZE_OUTPUT_FOR_C = YES +OPTIMIZE_OUTPUT_JAVA = NO +OPTIMIZE_FOR_FORTRAN = NO +OPTIMIZE_OUTPUT_VHDL = NO +EXTENSION_MAPPING = +MARKDOWN_SUPPORT = YES +TOC_INCLUDE_HEADINGS = 0 +AUTOLINK_SUPPORT = YES +BUILTIN_STL_SUPPORT = NO +CPP_CLI_SUPPORT = NO +SIP_SUPPORT = NO +IDL_PROPERTY_SUPPORT = YES +DISTRIBUTE_GROUP_DOC = NO +GROUP_NESTED_COMPOUNDS = NO +SUBGROUPING = YES +INLINE_GROUPED_CLASSES = NO +INLINE_SIMPLE_STRUCTS = NO +TYPEDEF_HIDES_STRUCT = NO +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +EXTRACT_ALL = NO +EXTRACT_PRIVATE = NO +EXTRACT_PACKAGE = NO +EXTRACT_STATIC = NO +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = NO +EXTRACT_ANON_NSPACES = NO +HIDE_UNDOC_MEMBERS = YES +HIDE_UNDOC_CLASSES = YES +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = NO +CASE_SENSE_NAMES = YES +HIDE_SCOPE_NAMES = NO +HIDE_COMPOUND_REFERENCE= NO +SHOW_INCLUDE_FILES = YES +SHOW_GROUPED_MEMB_INC = NO +FORCE_LOCAL_INCLUDES = NO +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +SORT_BRIEF_DOCS = NO +SORT_MEMBERS_CTORS_1ST = NO +SORT_GROUP_NAMES = NO +SORT_BY_SCOPE_NAME = NO +STRICT_PROTO_MATCHING = NO +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES +SHOW_FILES = YES +SHOW_NAMESPACES = YES +FILE_VERSION_FILTER = +LAYOUT_FILE = +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = NO +WARN_AS_ERROR = NO +WARN_FORMAT = "$file:$line: $text" +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +INPUT = +INPUT_ENCODING = UTF-8 +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.cpp \ + *.c++ \ + *.java \ + *.ii \ + *.ixx \ + *.ipp \ + *.i++ \ + *.inl \ + *.idl \ + *.ddl \ + *.odl \ + *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ \ + *.cs \ + *.d \ + *.php \ + *.php4 \ + *.php5 \ + *.phtml \ + *.inc \ + *.m \ + *.markdown \ + *.md \ + *.mm \ + *.dox \ + *.py \ + *.pyw \ + *.f90 \ + *.f95 \ + *.f03 \ + *.f08 \ + *.f \ + *.for \ + *.tcl \ + *.vhd \ + *.vhdl \ + *.ucf \ + *.qsf +RECURSIVE = NO + +EXCLUDE = hashpipe.c hashpipe.h hashpipe_check_status.c hashpipe_clean_shmem.c hashpipe_dump_databuf.c hashpipe_write_databuf.c hashpipe_check_databuf.c +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXCLUDE_SYMBOLS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = * +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +FILTER_SOURCE_PATTERNS = +USE_MDFILE_AS_MAINPAGE = + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +SOURCE_BROWSER = NO +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = NO +REFERENCES_RELATION = NO +REFERENCES_LINK_SOURCE = YES +SOURCE_TOOLTIPS = YES +USE_HTAGS = NO +VERBATIM_HEADERS = YES +CLANG_ASSISTED_PARSING = NO +CLANG_OPTIONS = + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +ALPHABETICAL_INDEX = YES +COLS_IN_ALPHA_INDEX = 5 +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +GENERATE_HTML = NO +HTML_OUTPUT = html +HTML_FILE_EXTENSION = .html +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_EXTRA_STYLESHEET = +HTML_EXTRA_FILES = +HTML_COLORSTYLE_HUE = 220 +HTML_COLORSTYLE_SAT = 100 +HTML_COLORSTYLE_GAMMA = 80 +HTML_TIMESTAMP = NO +HTML_DYNAMIC_SECTIONS = NO +HTML_INDEX_NUM_ENTRIES = 100 +GENERATE_DOCSET = NO +DOCSET_FEEDNAME = "Doxygen generated docs" +DOCSET_BUNDLE_ID = org.doxygen.Project +DOCSET_PUBLISHER_ID = org.doxygen.Publisher +DOCSET_PUBLISHER_NAME = Publisher +GENERATE_HTMLHELP = NO +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +CHM_INDEX_ENCODING = +BINARY_TOC = NO +TOC_EXPAND = NO +GENERATE_QHP = NO +QCH_FILE = +QHP_NAMESPACE = org.doxygen.Project +QHP_VIRTUAL_FOLDER = doc +QHP_CUST_FILTER_NAME = +QHP_CUST_FILTER_ATTRS = +QHP_SECT_FILTER_ATTRS = +QHG_LOCATION = +GENERATE_ECLIPSEHELP = NO +ECLIPSE_DOC_ID = org.doxygen.Project +DISABLE_INDEX = NO +GENERATE_TREEVIEW = NO +ENUM_VALUES_PER_LINE = 4 +TREEVIEW_WIDTH = 250 +EXT_LINKS_IN_WINDOW = NO +FORMULA_FONTSIZE = 10 +FORMULA_TRANSPARENT = YES +USE_MATHJAX = NO +MATHJAX_FORMAT = HTML-CSS +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest +MATHJAX_EXTENSIONS = +MATHJAX_CODEFILE = +SEARCHENGINE = YES +SERVER_BASED_SEARCH = NO +EXTERNAL_SEARCH = NO +SEARCHENGINE_URL = +SEARCHDATA_FILE = searchdata.xml +EXTERNAL_SEARCH_ID = +EXTRA_SEARCH_MAPPINGS = + +#--------------------------------------------------------------------------- +# Configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +GENERATE_LATEX = NO +LATEX_OUTPUT = latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = a4 +EXTRA_PACKAGES = +LATEX_HEADER = +LATEX_FOOTER = +LATEX_EXTRA_STYLESHEET = +LATEX_EXTRA_FILES = +PDF_HYPERLINKS = YES +USE_PDFLATEX = YES +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = NO +LATEX_SOURCE_CODE = NO +LATEX_BIB_STYLE = plain +LATEX_TIMESTAMP = NO + +#--------------------------------------------------------------------------- +# Configuration options related to the RTF output +#--------------------------------------------------------------------------- + +GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +RTF_SOURCE_CODE = NO + +#--------------------------------------------------------------------------- +# Configuration options related to the man page output +#--------------------------------------------------------------------------- + +GENERATE_MAN = YES +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_SUBDIR = +MAN_LINKS = YES + +#--------------------------------------------------------------------------- +# Configuration options related to the XML output +#--------------------------------------------------------------------------- + +GENERATE_XML = NO +XML_OUTPUT = xml +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# Configuration options related to the DOCBOOK output +#--------------------------------------------------------------------------- + +GENERATE_DOCBOOK = NO +DOCBOOK_OUTPUT = docbook +DOCBOOK_PROGRAMLISTING = NO + +#--------------------------------------------------------------------------- +# Configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# Configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration options related to external references +#--------------------------------------------------------------------------- + +TAGFILES = +GENERATE_TAGFILE = +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +EXTERNAL_PAGES = YES +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +CLASS_DIAGRAMS = NO +MSCGEN_PATH = +DIA_PATH = +HIDE_UNDOC_RELATIONS = YES +HAVE_DOT = NO +DOT_NUM_THREADS = 0 +DOT_FONTNAME = Helvetica +DOT_FONTSIZE = 10 +DOT_FONTPATH = +CLASS_GRAPH = NO +COLLABORATION_GRAPH = NO +GROUP_GRAPHS = NO +UML_LOOK = NO +UML_LIMIT_NUM_FIELDS = 10 +TEMPLATE_RELATIONS = NO +INCLUDE_GRAPH = NO +INCLUDED_BY_GRAPH = YES +CALL_GRAPH = NO +CALLER_GRAPH = NO +GRAPHICAL_HIERARCHY = YES +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = png +INTERACTIVE_SVG = NO +DOT_PATH = +DOTFILE_DIRS = +MSCFILE_DIRS = +DIAFILE_DIRS = +PLANTUML_JAR_PATH = +PLANTUML_CFG_FILE = +PLANTUML_INCLUDE_PATH = +DOT_GRAPH_MAX_NODES = 50 +MAX_DOT_GRAPH_DEPTH = 0 +DOT_TRANSPARENT = NO +DOT_MULTI_TARGETS = NO +GENERATE_LEGEND = YES +DOT_CLEANUP = YES diff --git a/src/doxygen7.in b/src/doxygen7.in new file mode 100644 index 0000000..9648c25 --- /dev/null +++ b/src/doxygen7.in @@ -0,0 +1,422 @@ +# Doxyfile 1.8.13 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +DOXYFILE_ENCODING = UTF-8 +PROJECT_NAME = "hashpipe" +PROJECT_NUMBER = @PACKAGE_VERSION@ +PROJECT_BRIEF = "High Availibility Shared Pipeline Engine" +PROJECT_LOGO = +OUTPUT_DIRECTORY = "../docs" +CREATE_SUBDIRS = NO +ALLOW_UNICODE_NAMES = NO +OUTPUT_LANGUAGE = English +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES + +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the + +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = YES +STRIP_FROM_PATH = +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = NO +QT_AUTOBRIEF = NO +MULTILINE_CPP_IS_BRIEF = NO +INHERIT_DOCS = YES +SEPARATE_MEMBER_PAGES = NO +TAB_SIZE = 4 +ALIASES = "synopsis=@par SYNOPSIS\n" +TCL_SUBST = +OPTIMIZE_OUTPUT_FOR_C = YES +OPTIMIZE_OUTPUT_JAVA = NO +OPTIMIZE_FOR_FORTRAN = NO +OPTIMIZE_OUTPUT_VHDL = NO +EXTENSION_MAPPING = +MARKDOWN_SUPPORT = YES +TOC_INCLUDE_HEADINGS = 0 +AUTOLINK_SUPPORT = YES +BUILTIN_STL_SUPPORT = NO +CPP_CLI_SUPPORT = NO +SIP_SUPPORT = NO +IDL_PROPERTY_SUPPORT = YES +DISTRIBUTE_GROUP_DOC = NO +GROUP_NESTED_COMPOUNDS = NO +SUBGROUPING = YES +INLINE_GROUPED_CLASSES = NO +INLINE_SIMPLE_STRUCTS = NO +TYPEDEF_HIDES_STRUCT = NO +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +EXTRACT_ALL = NO +EXTRACT_PRIVATE = NO +EXTRACT_PACKAGE = NO +EXTRACT_STATIC = NO +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = NO +EXTRACT_ANON_NSPACES = NO +HIDE_UNDOC_MEMBERS = YES +HIDE_UNDOC_CLASSES = YES +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = NO +CASE_SENSE_NAMES = YES +HIDE_SCOPE_NAMES = NO +HIDE_COMPOUND_REFERENCE= NO +SHOW_INCLUDE_FILES = YES +SHOW_GROUPED_MEMB_INC = NO +FORCE_LOCAL_INCLUDES = NO +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +SORT_BRIEF_DOCS = NO +SORT_MEMBERS_CTORS_1ST = NO +SORT_GROUP_NAMES = NO +SORT_BY_SCOPE_NAME = NO +STRICT_PROTO_MATCHING = NO +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES +SHOW_FILES = YES +SHOW_NAMESPACES = YES +FILE_VERSION_FILTER = +LAYOUT_FILE = +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = NO +WARN_AS_ERROR = NO +WARN_FORMAT = "$file:$line: $text" +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +INPUT = hashpipe.h +INPUT_ENCODING = UTF-8 +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.cpp \ + *.c++ \ + *.java \ + *.ii \ + *.ixx \ + *.ipp \ + *.i++ \ + *.inl \ + *.idl \ + *.ddl \ + *.odl \ + *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ \ + *.cs \ + *.d \ + *.php \ + *.php4 \ + *.php5 \ + *.phtml \ + *.inc \ + *.m \ + *.markdown \ + *.md \ + *.mm \ + *.dox \ + *.py \ + *.pyw \ + *.f90 \ + *.f95 \ + *.f03 \ + *.f08 \ + *.f \ + *.for \ + *.tcl \ + *.vhd \ + *.vhdl \ + *.ucf \ + *.qsf +RECURSIVE = NO + +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXCLUDE_SYMBOLS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = * +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +FILTER_SOURCE_PATTERNS = +USE_MDFILE_AS_MAINPAGE = + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +SOURCE_BROWSER = NO +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = NO +REFERENCES_RELATION = NO +REFERENCES_LINK_SOURCE = YES +SOURCE_TOOLTIPS = YES +USE_HTAGS = NO +VERBATIM_HEADERS = YES +CLANG_ASSISTED_PARSING = NO +CLANG_OPTIONS = + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +ALPHABETICAL_INDEX = YES +COLS_IN_ALPHA_INDEX = 5 +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +GENERATE_HTML = NO +HTML_OUTPUT = html +HTML_FILE_EXTENSION = .html +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_EXTRA_STYLESHEET = +HTML_EXTRA_FILES = +HTML_COLORSTYLE_HUE = 220 +HTML_COLORSTYLE_SAT = 100 +HTML_COLORSTYLE_GAMMA = 80 +HTML_TIMESTAMP = NO +HTML_DYNAMIC_SECTIONS = NO +HTML_INDEX_NUM_ENTRIES = 100 +GENERATE_DOCSET = NO +DOCSET_FEEDNAME = "Doxygen generated docs" +DOCSET_BUNDLE_ID = org.doxygen.Project +DOCSET_PUBLISHER_ID = org.doxygen.Publisher +DOCSET_PUBLISHER_NAME = Publisher +GENERATE_HTMLHELP = NO +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +CHM_INDEX_ENCODING = +BINARY_TOC = NO +TOC_EXPAND = NO +GENERATE_QHP = NO +QCH_FILE = +QHP_NAMESPACE = org.doxygen.Project +QHP_VIRTUAL_FOLDER = doc +QHP_CUST_FILTER_NAME = +QHP_CUST_FILTER_ATTRS = +QHP_SECT_FILTER_ATTRS = +QHG_LOCATION = +GENERATE_ECLIPSEHELP = NO +ECLIPSE_DOC_ID = org.doxygen.Project +DISABLE_INDEX = NO +GENERATE_TREEVIEW = NO +ENUM_VALUES_PER_LINE = 4 +TREEVIEW_WIDTH = 250 +EXT_LINKS_IN_WINDOW = NO +FORMULA_FONTSIZE = 10 +FORMULA_TRANSPARENT = YES +USE_MATHJAX = NO +MATHJAX_FORMAT = HTML-CSS +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest +MATHJAX_EXTENSIONS = +MATHJAX_CODEFILE = +SEARCHENGINE = YES +SERVER_BASED_SEARCH = NO +EXTERNAL_SEARCH = NO +SEARCHENGINE_URL = +SEARCHDATA_FILE = searchdata.xml +EXTERNAL_SEARCH_ID = +EXTRA_SEARCH_MAPPINGS = + +#--------------------------------------------------------------------------- +# Configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +GENERATE_LATEX = NO +LATEX_OUTPUT = latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = a4 +EXTRA_PACKAGES = +LATEX_HEADER = +LATEX_FOOTER = +LATEX_EXTRA_STYLESHEET = +LATEX_EXTRA_FILES = +PDF_HYPERLINKS = YES +USE_PDFLATEX = YES +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = NO +LATEX_SOURCE_CODE = NO +LATEX_BIB_STYLE = plain +LATEX_TIMESTAMP = NO + +#--------------------------------------------------------------------------- +# Configuration options related to the RTF output +#--------------------------------------------------------------------------- + +GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +RTF_SOURCE_CODE = NO + +#--------------------------------------------------------------------------- +# Configuration options related to the man page output +#--------------------------------------------------------------------------- + +GENERATE_MAN = YES +MAN_OUTPUT = man +MAN_EXTENSION = .7 +MAN_SUBDIR = +MAN_LINKS = YES + +#--------------------------------------------------------------------------- +# Configuration options related to the XML output +#--------------------------------------------------------------------------- + +GENERATE_XML = NO +XML_OUTPUT = xml +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# Configuration options related to the DOCBOOK output +#--------------------------------------------------------------------------- + +GENERATE_DOCBOOK = NO +DOCBOOK_OUTPUT = docbook +DOCBOOK_PROGRAMLISTING = NO + +#--------------------------------------------------------------------------- +# Configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# Configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration options related to external references +#--------------------------------------------------------------------------- + +TAGFILES = +GENERATE_TAGFILE = +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +EXTERNAL_PAGES = YES +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +CLASS_DIAGRAMS = NO +MSCGEN_PATH = +DIA_PATH = +HIDE_UNDOC_RELATIONS = YES +HAVE_DOT = NO +DOT_NUM_THREADS = 0 +DOT_FONTNAME = Helvetica +DOT_FONTSIZE = 10 +DOT_FONTPATH = +CLASS_GRAPH = NO +COLLABORATION_GRAPH = NO +GROUP_GRAPHS = NO +UML_LOOK = NO +UML_LIMIT_NUM_FIELDS = 10 +TEMPLATE_RELATIONS = NO +INCLUDE_GRAPH = NO +INCLUDED_BY_GRAPH = YES +CALL_GRAPH = NO +CALLER_GRAPH = NO +GRAPHICAL_HIERARCHY = YES +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = png +INTERACTIVE_SVG = NO +DOT_PATH = +DOTFILE_DIRS = +MSCFILE_DIRS = +DIAFILE_DIRS = +PLANTUML_JAR_PATH = +PLANTUML_CFG_FILE = +PLANTUML_INCLUDE_PATH = +DOT_GRAPH_MAX_NODES = 50 +MAX_DOT_GRAPH_DEPTH = 0 +DOT_TRANSPARENT = NO +DOT_MULTI_TARGETS = NO +GENERATE_LEGEND = YES +DOT_CLEANUP = YES diff --git a/src/hashpipe.c b/src/hashpipe.c index 9dfeabf..c7e5d8c 100644 --- a/src/hashpipe.c +++ b/src/hashpipe.c @@ -20,13 +20,73 @@ #include #include "hashpipe.h" +#include "hashpipe_decls.h" #include "hashpipe_thread_args.h" +#include "config.h" +#define HASHPIPE_VERSION PACKAGE_VERSION + // Functions defined in hashpipe_thread.c, but not declared/exposed in public // hashpipe_thread.h. void set_run_threads(); void clear_run_threads(); +/** @page hashpipe + * + * @brief program that creates shared memory and threads for the processing pipeline + * + * @section SYNOPSIS SYNOPSIS + * hashpipe [OPTIONS] THREAD [[OPTIONS] THREAD ...] + * + * @section DESCRIPTION DESCRIPTION + * hashpipe is a program that loads shared libraries (plugins), creates shared memory executes the THREADs + * connected via the ring buffer. Apart from data buffer, additional status buffer is created + * + * @section OPTIONS OPTIONS + * + * @subsection h -h, --help + * show help message + * + * @subsection l -l, --list + * list all known threads + * + * @subsection K -K=KEY_F, --shmkey=KEY_F + * use KEY_F file instead of $HOME as a way to generate + * SystemV key file for the project. Option may become deprecated in newer versions + * + * @subsection I -I ID, --instance=ID + * use given ID as an instance ID. 6 LSB of ID is used to create + * 8 MSB of the key used by SystemV shared memory/semaphores. That means that for given Key + * file, up to 32 independent pipelines can be created. + * + * @subsection c -c N, --cpu=N + * Set CPU number for subsequent thread + * + * @subsection m -m N, --mask=N + * Set CPU mask for subsequent thread + * + * @subsection o -o K=V, --option=K=V + * Store K=V in status buffer + * + * @subsection p -p P, --plugin=P + * load plugin P + * + * @subsection V -V, --version + * show version and exit + * + * @section EXAMPLES EXAMPLES + * + * @subsection e1 hashpipe -p ./myplugin -I 1 -c 18 thread_inputnet -c 19 thread_proc -c 20 thread_output + * load plugin ./myplugin and start 3 threads in a pipeline + * + * @subsection e2 numactl --cpunodebind=1 --membind=1 hashpipe -p ./myplugin -I 1 t1 t2 + * start 2 threads, all binded to the same NUMA + * + * @section SEE_ALSO SEE ALSO + * hashpipe(7) hashpipe_check_databuf(1) hashpipe_clean_shmem(1) hashpipe_check_status(1) + */ + + void usage(const char *argv0) { fprintf(stderr, "Usage: %s [options]\n" diff --git a/src/hashpipe.h b/src/hashpipe.h index d73d807..1fb54db 100644 --- a/src/hashpipe.h +++ b/src/hashpipe.h @@ -9,12 +9,113 @@ #include "hashpipe_pktsock.h" #include "hashpipe_udp.h" -#define HASHPIPE_VERSION "1.7" +//#define HASHPIPE_VERSION "1.7" + +// man(7) page below +/** \page hashpipe + * + * A hashpipe_thread structure encapsulates metadata and functionality for one + * or more threads that can be used in a processing pipeline. The hashpipe + * executable dynamically assembles a pipeline at runtime consisting of + * multiple hashpipe threads. + * + * Hashpipe threads must register themselves with the hashpipe executable via a + * call to register_hashpipe_thread(). This is typically performed from a + * static C function with the constructor attribute in the hashpipe thread's + * source file. + * + * Hashpipe threads are identified by their name. The hashpipe executable + * finds (registered) hashpipe threads by their name. A hashpipe thread can be + * input-only, output-only, or both input and output. An input thread has an + * associated output data buffer into which it writes data. An output thread + * has an associated input data buffer from which it reads data. An + * input/output thread has both. + * + * Input-only threads source data into the pipeline. They do not get their + * input data from a shared memory ring buffer. They get their data from + * external sources (e.g. files or the network) or generate it internally + * (e.g. for test vectors). Input-only threads have an output data buffer, + * but no input data buffer (their input does not come from a shared memory + * ring buffer). + * + * Output-only threads sink data from the pipeline. Thy do not put their + * output data into a shared memory ring buffer. They send their data to + * external sinks (e.g. files or the network) of consume it internally (e.g. + * comparing against expected output). Output-only threads have an input data + * buffer, but no output data buffer (their output data does not go the a + * shared memory ring buffer). + * + * Input/output threads get their input data from one shared memory region + * (their input data buffer), process it, and store the output data in another + * shared memory region (their output data buffer). + * + * One thread can have at most 1 input and 1 output buffer. Any other communication + * have to be done by different means (files, sockets etc.) + * + * The hashpipe's thread's metadata consists of the following information: + * + * name - A string containing the thread's name + * skey - A string containing the thread's status buffer "status" key + * init - A pointer to the thread's initialization function + * run - A pointer to the thread's run function + * ibuf - A structure describing the thread's input data buffer (if any) + * obuf - A structure describing the thread's output data buffer (if any) + * + * "name" is used to match command line thread spcifiers to thread metadata so + * that the pipeline can be constructed as specified on the command line. + * + * "skey" is typically 8 characters or less, uppercase, and ends with "STAT". + * If it is non-NULL and non-empty, HASHPIPE will automatically store/update + * this key in the status buffer with the thread's status at initialization + * ("init") and exit ("exit"). + * + * The thread initialization function can be null if no special initialization + * is needed. If provided, it must point to a function with the following + * signature: + * + * int my_thread_init_funtion(hashpipe_thread_args_t *args) + * + * The thread run function must have the following signature: + * + * void my_thread_run_funtion(hashpipe_thread_args_t *args) + * + * The data buffer description structure used for ibuf and obuf currently + * contains one function pointer: + * + * create - A pointer to a function that creates the data buffer + * + * Future HASHPIPE versions may introduce additional data buffer fields. + * + * ibuf.create should be NULL for input-only threads and obuf.create should + * NULL for output-only threads. Having both ibuf.create and obuf.create set + * to NULL is invalid and the thread will not be used. + * + * The create function must have the following signature: + * + * hashpipe_databuf_t * my_create_function(int instance_id, int databuf_id) + * + * @section NUMA NUMA + * + * Hashpipe does lock its shared memory buffers. These buffers will have the + * NUMA node affinity of the thread that created them so be sure to pin the + * threads to the desired core or cores by preceding the thread names on the + * command line with a -c # (set thread affinity to a single core) or -m # + * (set thread affinity to multiple cores) option. + * Alternatively (or additional) you can run the entire hashpipe process with numactl + * + * numactl --cpunodebind=1 --membind=1 hashpipe [...] + * + * @section SEE_ALSO SEE ALSO + * + * hashpipe(1) + */ + #ifdef __cplusplus extern "C" { #endif + // This file defines types needed by hashpipe plugings. A hashpipe plugin is // an shared library that defines application specific processing threads and // data buffers for use in a hashpipe pipeline. The hashpipe executable loads @@ -22,99 +123,30 @@ extern "C" { // dynamically at run time based on command line arguments. // Forward declare some structures +/// @private struct hashpipe_thread_args; +/// @private struct hashpipe_thread_desc; // Create typedefs for convenience +/// @private typedef struct hashpipe_thread_args hashpipe_thread_args_t; +/// @private typedef struct hashpipe_thread_desc hashpipe_thread_desc_t; -// A hashpipe_thread structure encapsulates metadata and functionality for one -// or more threads that can be used in a processing pipeline. The hashpipe -// executable dynamically assembles a pipeline at runtime consisting of -// multiple hashpipe threads. -// -// Hashpipe threads must register themselves with the hashpipe executable via a -// call to register_hashpipe_thread(). This is typically performed from a -// static C function with the constructor attribute in the hashpipe thread's -// source file. -// -// Hashpipe threads are identified by their name. The hashpipe executable -// finds (registered) hashpipe threads by their name. A hashpipe thread can be -// input-only, output-only, or both input and output. An input thread has an -// associated output data buffer into which it writes data. An output thread -// has an associated input data buffer from which it reads data. An -// input/output thread has both. -// -// Input-only threads source data into the pipeline. They do not get their -// input data from a shared memory ring buffer. They get their data from -// external sources (e.g. files or the network) or generate it internally -// (e.g. for test vectors). Input-only threads have an output data buffer, -// but no input data buffer (their input does not come from a shared memory -// ring buffer). -// -// Output-only threads sink data from the pipeline. Thy do not put their -// output data into a shared memory ring buffer. They send their data to -// external sinks (e.g. files or the network) of consume it internally (e.g. -// comparing against expected output). Output-only threads have an input data -// buffer, but no output data buffer (their output data does not go the a -// shared memory ring buffer). -// -// Input/output threads get their input data from one shared memory region -// (their input data buffer), process it, and store the output data in another -// shared memory region (their output data buffer). -// -// The hashpipe's thread's metadata consists of the following information: -// -// name - A string containing the thread's name -// skey - A string containing the thread's status buffer "status" key -// init - A pointer to the thread's initialization function -// run - A pointer to the thread's run function -// ibuf - A structure describing the thread's input data buffer (if any) -// obuf - A structure describing the thread's output data buffer (if any) -// -// "name" is used to match command line thread spcifiers to thread metadata so -// that the pipeline can be constructed as specified on the command line. -// -// "skey" is typically 8 characters or less, uppercase, and ends with "STAT". -// If it is non-NULL and non-empty, HASHPIPE will automatically store/update -// this key in the status buffer with the thread's status at initialization -// ("init") and exit ("exit"). -// -// The thread initialization function can be null if no special initialization -// is needed. If provided, it must point to a function with the following -// signature: -// -// int my_thread_init_funtion(hashpipe_thread_args_t *args) -// -// The thread run function must have the following signature: -// -// void my_thread_run_funtion(hashpipe_thread_args_t *args) -// -// The data buffer description structure used for ibuf and obuf currently -// contains one function pointer: -// -// create - A pointer to a function that creates the data buffer -// -// Future HASHPIPE versions may introduce additional data buffer fields. -// -// ibuf.create should be NULL for input-only threads and obuf.create should -// NULL for output-only threads. Having both ibuf.create and obuf.create set -// to NULL is invalid and the thread will not be used. -// -// The create function must have the following signature: -// -// hashpipe_databuf_t * my_create_function(int instance_id, int databuf_id) - // These typedefs are used to declare pointers to a pipeline thread's init and // run functions. +/// @private typedef int (* initfunc_t)(hashpipe_thread_args_t *); +/// @private typedef void * (* runfunc_t)(hashpipe_thread_args_t *); // This typedefs are used to declare pointers to a pipline thread's data buffer // create function. +/// @private typedef hashpipe_databuf_t * (* databuf_createfunc_t)(int, int); +/// @private typedef struct { databuf_createfunc_t create; } databuf_desc_t; @@ -122,6 +154,7 @@ typedef struct { // The hashpipe_thread_desc structure is used to store metadata describing a // hashpipe thread. Typically a hashpipe plugin will define one of these // hashpipe thread descriptors per hashpipe thread. +/// @private struct hashpipe_thread_desc { const char * name; const char * skey; @@ -134,6 +167,7 @@ struct hashpipe_thread_desc { // This structure passed (via a pointer) to the application's thread // initialization and run functions. The `user_data` field can be used to pass // info from the init function to the run function. +/// @private struct hashpipe_thread_args { hashpipe_thread_desc_t *thread_desc; int instance_id; @@ -156,30 +190,11 @@ struct hashpipe_thread_args { // Maximum number of threads that be defined by plugins #define MAX_HASHPIPE_THREADS 1024 -// Function threads use to determine whether to keep running. -int run_threads(); - -// This function is used by pipeline plugins to register threads with the -// pipeline executable. -int register_hashpipe_thread(hashpipe_thread_desc_t * ptm); - -// This function can be used to find hashpipe threads by name. It is generally -// used only by the hashpipe executable. Returns a pointer to its -// hashpipe_thread_desc_t structure or NULL if a test with the given name is -// not found. -// -// NB: Names are case sensitive. -hashpipe_thread_desc_t * find_hashpipe_thread(char *name); - -// List all known hashpipe threads to FILE f. -void list_hashpipe_threads(FILE * f); - -// Get CPU affinity of calling thread -// Returns 0 on error -unsigned int get_cpu_affinity(); +//this is not a nice thing, but it's a workaround to support backward compatibility +#include "hashpipe_decls.h" #ifdef __cplusplus } #endif -#endif // _HASHPIPE_H +#endif diff --git a/src/hashpipe_databuf.c b/src/hashpipe_databuf.c index 4674e05..db49d48 100644 --- a/src/hashpipe_databuf.c +++ b/src/hashpipe_databuf.c @@ -21,6 +21,7 @@ #include "hashpipe_error.h" /* union for semaphore ops. */ +/// @private union semun { int val; struct semid_ds *buf; diff --git a/src/hashpipe_databuf.h b/src/hashpipe_databuf.h index c4b5bd9..8b33da6 100644 --- a/src/hashpipe_databuf.h +++ b/src/hashpipe_databuf.h @@ -16,6 +16,7 @@ extern "C" { #endif // Define hashpipe_databuf structure +/// @private typedef struct { char data_type[64]; /* Type of data in buffer */ size_t header_size; /* Size of each block header (bytes) */ diff --git a/src/hashpipe_decls.h b/src/hashpipe_decls.h new file mode 100644 index 0000000..71f8469 --- /dev/null +++ b/src/hashpipe_decls.h @@ -0,0 +1,37 @@ +#ifndef _HASHPIPE_DECLS_H +#define _HASHPIPE_DECLS_H + +#include "hashpipe.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +// Function threads use to determine whether to keep running. +int run_threads(); + +// This function is used by pipeline plugins to register threads with the +// pipeline executable. +int register_hashpipe_thread(hashpipe_thread_desc_t * ptm); + +// This function can be used to find hashpipe threads by name. It is generally +// used only by the hashpipe executable. Returns a pointer to its +// hashpipe_thread_desc_t structure or NULL if a test with the given name is +// not found. +// +// NB: Names are case sensitive. +hashpipe_thread_desc_t * find_hashpipe_thread(char *name); + +// List all known hashpipe threads to FILE f. +void list_hashpipe_threads(FILE * f); + +// Get CPU affinity of calling thread +// Returns 0 on error +unsigned int get_cpu_affinity(); + +#ifdef __cplusplus +} +#endif + +#endif // _HASHPIPE_H diff --git a/src/hashpipe_error.h b/src/hashpipe_error.h index 121f929..41842b9 100644 --- a/src/hashpipe_error.h +++ b/src/hashpipe_error.h @@ -5,6 +5,10 @@ #ifndef _HASHPIPE_ERROR_H #define _HASHPIPE_ERROR_H +/** @file hashpipe_error.h + * @brief temp description + */ + /* Some exit codes */ #define HASHPIPE_OK 0 #define HASHPIPE_TIMEOUT 1 // Call timed out diff --git a/src/hashpipe_ibverbs.c b/src/hashpipe_ibverbs.c index 8eb6680..03d4a61 100644 --- a/src/hashpipe_ibverbs.c +++ b/src/hashpipe_ibverbs.c @@ -872,8 +872,12 @@ int hashpipe_ibv_flow( return 1; } // switch(flow_type) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wpragmas" +#pragma GCC diagnostic ignored "-Waddress-of-packed-member" if(!(hibv_ctx->ibv_flows[flow_idx] = ibv_create_flow(hibv_ctx->qp, (struct ibv_flow_attr *)&flow))) { +#pragma GCC diagnostic pop return 1; } diff --git a/src/hashpipe_status.c b/src/hashpipe_status.c index a1fb033..63b4675 100644 --- a/src/hashpipe_status.c +++ b/src/hashpipe_status.c @@ -191,7 +191,7 @@ void hashpipe_status_chkinit(hashpipe_status_t *s) /* Fill first record w/ spaces */ memset(s->buf, ' ', HASHPIPE_STATUS_RECORD_SIZE); /* add END */ - strncpy(s->buf, "END", 3); + memcpy(s->buf, "END", 3*sizeof(char)); // Add INSTANCE record hputi4(s->buf, "INSTANCE", s->instance_id); } else { @@ -224,7 +224,7 @@ void hashpipe_status_clear(hashpipe_status_t *s) { /* Fill first record w/ spaces */ memset(s->buf, ' ', HASHPIPE_STATUS_RECORD_SIZE); /* add END */ - strncpy(s->buf, "END", 3); + memcpy(s->buf, "END", 3*sizeof(char)); hputi4(s->buf, "INSTANCE", s->instance_id); diff --git a/src/hashpipe_status.h b/src/hashpipe_status.h index 2049364..cb62cad 100644 --- a/src/hashpipe_status.h +++ b/src/hashpipe_status.h @@ -22,6 +22,7 @@ extern "C" { #endif /* Structure describes status memory area */ +/// @private typedef struct { int instance_id; /* Instance ID of this status buffer (DO NOT SET/CHANGE!) */ int shmid; /* Shared memory segment id */ diff --git a/src/hashpipe_thread.c b/src/hashpipe_thread.c index 869d3e2..e1bf19b 100644 --- a/src/hashpipe_thread.c +++ b/src/hashpipe_thread.c @@ -6,6 +6,7 @@ #include #include #include "hashpipe.h" +#include "hashpipe_decls.h" static int run_threads_flag = 1; diff --git a/src/hput.c b/src/hput.c index 8eb7db4..beb9494 100644 --- a/src/hput.c +++ b/src/hput.c @@ -421,7 +421,8 @@ const char *cval; /* character string containing the value for variable /* Put single quote at start of string */ value[0] = squot; - strncpy (&value[1],cval,lcval); + //strncpy (&value[1],cval,lcval); + memcpy(&value[1],cval,lcval*sizeof(char)); /* If string is less than eight characters, pad it with spaces */ if (lcval < 8) { @@ -497,7 +498,7 @@ const char *value; /* character string containing the value for variable v2 = v1 + 80; /* Insert keyword8 */ - strncpy (v1,keyword8,7); + memcpy(v1,keyword8,7*sizeof(char)); /* Pad with spaces */ for (vp = v1+lkeyword; vp < v2; vp++) @@ -589,11 +590,13 @@ const char *value; /* character string containing the value for variable } /* Fill new entry with spaces */ + //memset(v1,' ', v2-v1); for (vp = v1; vp < v2; vp++) *vp = ' '; /* Copy keyword8 to new entry */ - strncpy (v1, keyword8, lkeyword); + //strncpy (v1, keyword8, lkeyword); + memcpy (v1, keyword8, lkeyword*sizeof(char)); /* Add parameter value in the appropriate place */ /* @@ -612,7 +615,8 @@ const char *value; /* character string containing the value for variable *vp = ' '; vp = vp + 1; if (*value == squot) { - strncpy (vp, value, lval); + //strncpy (vp, value, lval); + memcpy (vp, value, lval*sizeof(char)); if (lval+12 > 31) lc = lval + 12; else @@ -620,7 +624,7 @@ const char *value; /* character string containing the value for variable } else { vp = v1 + 30 - lval; - strncpy (vp, value, lval); + memcpy (vp, value, lval*sizeof(char)); lc = 30; } @@ -697,6 +701,8 @@ hputcom (hstring,keyword,comment) strncpy (v2, v1, 80); /* blank out new line and insert keyword */ + //memset(v1,' ',v2-v1); + //memset(v1,' ',80); //FIXME: JK: isn't it more efficient? for (vp = v1; vp < v2; vp++) *vp = ' '; strncpy (v1, keyword, lkeyword); @@ -766,7 +772,7 @@ hputcom (hstring,keyword,comment) /* If comment will not fit at all, return */ if (c0 - v1 > 77) return (-1); - strncpy (c0, " / ",3); + memcpy(c0, " / ",3*sizeof(char)); } /* Create new entry */ @@ -890,7 +896,8 @@ const char *keyword; /* Keyword of entry to be deleted */ /* Cover former first line with new keyword */ lkey = (int) strlen (keyword); - strncpy (hplace, keyword, lkey); + //strncpy (hplace, keyword, lkey); + memcpy (hplace, keyword, lkey*sizeof(char)); if (lkey < 8) { for (i = lkey; i < 8; i++) hplace[i] = ' '; @@ -1237,7 +1244,7 @@ double deg; /* Angle in degrees */ int ndec; /* Number of decimal places in degree string */ { - char degform[8]; + char degform[25]; int field, ltstr; char tstring[64]; double deg1; @@ -1290,7 +1297,7 @@ int field; /* Number of characters in output field (0=any) */ int ndec; /* Number of decimal places in degree string */ { - char numform[8]; + char numform[24]; if (field > 0) { if (ndec > 0) { diff --git a/src/null_output_thread.c b/src/null_output_thread.c index 69e4463..34e7684 100644 --- a/src/null_output_thread.c +++ b/src/null_output_thread.c @@ -11,6 +11,7 @@ #include #include "hashpipe.h" +#include "hashpipe_decls.h" static void *run(hashpipe_thread_args_t * args) {