

<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.net-snmp.org/wiki/index.php?action=history&amp;feed=atom&amp;title=TUT%3AHeader_files</id>
		<title>TUT:Header files - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://www.net-snmp.org/wiki/index.php?action=history&amp;feed=atom&amp;title=TUT%3AHeader_files"/>
		<link rel="alternate" type="text/html" href="http://www.net-snmp.org/wiki/index.php?title=TUT:Header_files&amp;action=history"/>
		<updated>2026-04-27T21:03:31Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.26.3</generator>

	<entry>
		<id>http://www.net-snmp.org/wiki/index.php?title=TUT:Header_files&amp;diff=3172&amp;oldid=prev</id>
		<title>Dts12: Use general tasks, not important ones</title>
		<link rel="alternate" type="text/html" href="http://www.net-snmp.org/wiki/index.php?title=TUT:Header_files&amp;diff=3172&amp;oldid=prev"/>
				<updated>2007-10-31T15:50:03Z</updated>
		
		<summary type="html">&lt;p&gt;Use general tasks, not important ones&lt;/p&gt;
&lt;table class=&#039;diff diff-contentalign-left&#039;&gt;
				&lt;col class=&#039;diff-marker&#039; /&gt;
				&lt;col class=&#039;diff-content&#039; /&gt;
				&lt;col class=&#039;diff-marker&#039; /&gt;
				&lt;col class=&#039;diff-content&#039; /&gt;
				&lt;tr style=&#039;vertical-align: top;&#039; lang=&#039;en&#039;&gt;
				&lt;td colspan=&#039;2&#039; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&#039;2&#039; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 15:50, 31 October 2007&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l27&quot; &gt;Line 27:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 27:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Public API headers ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Public API headers ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;lt;tasks&amp;gt;[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;2&lt;/del&gt;]Describe the seven &amp;lt;net-snmp/*_api.h&amp;gt; header files&amp;lt;/tasks&amp;gt;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;lt;tasks&amp;gt;[ ]Describe the seven &amp;lt;net-snmp/*_api.h&amp;gt; header files&amp;lt;/tasks&amp;gt;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Internal API headers ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Internal API headers ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;lt;tasks&amp;gt;[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;2&lt;/del&gt;]Describe the important &amp;lt;net-snmp/{library,agent}/*.h&amp;gt; header files&amp;lt;/tasks&amp;gt;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;lt;tasks&amp;gt;[ ]Describe the important &amp;lt;net-snmp/{library,agent}/*.h&amp;gt; header files&amp;lt;/tasks&amp;gt;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Autoconf ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Autoconf ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Dts12</name></author>	</entry>

	<entry>
		<id>http://www.net-snmp.org/wiki/index.php?title=TUT:Header_files&amp;diff=3167&amp;oldid=prev</id>
		<title>Dts12: Wikification of HTML Tutorial page</title>
		<link rel="alternate" type="text/html" href="http://www.net-snmp.org/wiki/index.php?title=TUT:Header_files&amp;diff=3167&amp;oldid=prev"/>
				<updated>2007-10-31T14:38:00Z</updated>
		
		<summary type="html">&lt;p&gt;Wikification of HTML Tutorial page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The package provides a number of include files that may be used by the general application&lt;br /&gt;
programmer when writing applications against the Net-SNMP package APIs. &lt;br /&gt;
&lt;br /&gt;
== High-level headers ==&lt;br /&gt;
&lt;br /&gt;
There are three high-level header files, which are the only Net-SNMP includes&lt;br /&gt;
required in a typical application.  These are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;net-snmp/net-snmp-config.h&amp;lt;/code&amp;gt;&lt;br /&gt;
: This file contains a number of configuration directives which are used to define whether other include files are included by the rest of the include files. this file is installed for convenience purposes and may be used by simple packages when possible. However, certain package authors may find it problematic to use if the package it is being used in also has its own configuration file generated by the autoconf mechanisms. Please see below for details on dealing with these issues.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;net-snmp/net-snmp-includes.h&amp;lt;/code&amp;gt;&lt;br /&gt;
: This file is a high level wrapper around the rest of the more detailed include files. Generally speaking, if an application which is to include functionality from the base SNMP library it should include this file. At the die-hard developers may wish to include each sub-include file only as needed, as it will ease the burden on the C preprocessor.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;net-snmp/agent/net-snmp-agent-includes.h&amp;lt;/code&amp;gt;&lt;br /&gt;
:This file is a high level wrapper around the agent specific include files. Specifically, this fall should be included by developers who are developing modules to be used within an SNMP agent. Again, hard-core developers who wish to speed up the work of the C processor can be more selective than this, however this fall is here for easiest use.&lt;br /&gt;
&lt;br /&gt;
Most management application code will simply contain the two include lines:&lt;br /&gt;
&lt;br /&gt;
    #include &amp;lt;net-snmp/net-snmp-config.h&amp;gt;&lt;br /&gt;
    #include &amp;lt;net-snmp/net-snmp-includes.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Agent developers will also need to add one further line to their code files:&lt;br /&gt;
&lt;br /&gt;
    #include &amp;lt;net-snmp/agent/net-snmp-agent-includes.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Public API headers ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;lt;tasks&amp;gt;[2]Describe the seven &amp;lt;net-snmp/*_api.h&amp;gt; header files&amp;lt;/tasks&amp;gt;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== Internal API headers ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;lt;tasks&amp;gt;[2]Describe the important &amp;lt;net-snmp/{library,agent}/*.h&amp;gt; header files&amp;lt;/tasks&amp;gt;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== Autoconf ==&lt;br /&gt;
&lt;br /&gt;
Problems may arise when an application needs to combine the Net-SNMP libraries with those from another package also uses autoconf generated configuration files. Generally, these configuration files conflict with each other due to special package symbols that autoconf inserts into the configuration files. Thus, including our particular configuration file (&amp;lt;code&amp;gt;net-snmp/net-snmp-config.h&amp;lt;/code&amp;gt;) ahead of or below your own package&amp;#039;s configuration file will cause conflicts.&lt;br /&gt;
&lt;br /&gt;
To get around this problem, your package should probably not be including our generated configuration file but should be instead using its own. A minimal template for how to accomplish this safely is included below:&lt;br /&gt;
&lt;br /&gt;
    #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
    #include &amp;lt;netinet/in.h&amp;gt;&lt;br /&gt;
    #include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    /* If you have sys/time.h on your machine: */&lt;br /&gt;
    #include &amp;lt;sys/time.h&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    /* Else pick one of these instead:&lt;br /&gt;
    #include &amp;lt;time.h&amp;gt;&lt;br /&gt;
    #include &amp;lt;sys/timeb.h&amp;gt;&lt;br /&gt;
    */&lt;br /&gt;
    &lt;br /&gt;
    /* if on windows: */&lt;br /&gt;
    #ifdef WIN32&lt;br /&gt;
    #include &amp;lt;winsock.h&amp;gt;&lt;br /&gt;
    #endif&lt;br /&gt;
    &lt;br /&gt;
    /* put a proper extern in front of certain functions */&lt;br /&gt;
    #define NETSNMP_IMPORT extern&lt;br /&gt;
    &lt;br /&gt;
    /* don&amp;#039;t use inline constructs (define to &amp;lt;i&amp;gt;inline&amp;lt;/i&amp;gt; if you want them) */&lt;br /&gt;
    #define NETSNMP_INLINE&lt;br /&gt;
    &lt;br /&gt;
    /* run man signal and see what the user function is supposed to return&lt;br /&gt;
       to avoid warnings, or leave as &amp;quot;void&amp;quot; below if you don&amp;#039;t care about&lt;br /&gt;
       any warnings you might be seeing */&lt;br /&gt;
    #define RETSIGTYPE void&lt;br /&gt;
    &lt;br /&gt;
    /* tell the Net-SNMP core functionality headers that we&amp;#039;ve done the&lt;br /&gt;
       minimal requirements */&lt;br /&gt;
    #define NET_SNMP_CONFIG_H&lt;br /&gt;
    &lt;br /&gt;
    /* include the core Net-SNMP functionality headers */&lt;br /&gt;
    #include &amp;lt;net-snmp/net-snmp-includes.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{TUT:LIST}}&lt;/div&gt;</summary>
		<author><name>Dts12</name></author>	</entry>

	</feed>