<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to OID</title><link>https://sourceforge.net/p/snmppp/wiki/OID/</link><description>Recent changes to OID</description><atom:link href="https://sourceforge.net/p/snmppp/wiki/OID/feed" rel="self"/><language>en</language><lastBuildDate>Fri, 22 Feb 2013 21:14:41 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/snmppp/wiki/OID/feed" rel="self" type="application/rss+xml"/><item><title>WikiPage OID modified by Stéphane Charette</title><link>https://sourceforge.net/p/snmppp/wiki/OID/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stéphane Charette</dc:creator><pubDate>Fri, 22 Feb 2013 21:14:41 -0000</pubDate><guid>https://sourceforge.netc0bbb876da6d661a1743708e1ec5889f939d2329</guid></item><item><title>WikiPage SNMPpp::OID modified by Stéphane Charette</title><link>https://sourceforge.net/p/snmppp/wiki/SNMPpp%253A%253AOID/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v3
+++ v4
@@ -3,12 +3,12 @@

 net-snmp uses C arrays of unsigned longs as OIDs, and because there is no way to determine the length of arrays, a length must always accompany the array.

-Note that net-snmp typedefs "oid", so the lowercase "oid" unfortunately makes for a bad variable name to use if you have all warnings enabled in your compiler.
+Note that net-snmp typedefs `oid`, so the lowercase "oid" unfortunately makes for a bad variable name to use if you have all warnings enabled in your compiler.

 SNMPpp::OID
 -----------

-The C++ OID class uses std::vector to store the components of arrays.  This makes it relatively easy to use C++ OIDs when calling net-snmp C APIs.
+The C++ OID class uses `std::vector` to store the components of arrays.  This makes it relatively easy to use C++ OIDs when calling net-snmp C APIs.

 Constructing, parsing, passing, and displaying OIDs has been made as easy as possible.  For example:

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stéphane Charette</dc:creator><pubDate>Mon, 18 Feb 2013 07:13:44 -0000</pubDate><guid>https://sourceforge.netdeacbf3ab613a61b95d75ce8910c28b5896291fa</guid></item><item><title>WikiPage SNMPpp::OID modified by Stéphane Charette</title><link>https://sourceforge.net/p/snmppp/wiki/SNMPpp%253A%253AOID/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -32,5 +32,5 @@
     SNMP::OID o( ".1.3.6.1.4.1.38322" );

     snmp_add_null_var( pdu, o, o );
-    // where the first "o" calls operator const unsigned long *()
-    // where the second "o" calls operator size_t()
+    // where the 1st "o" results in a call to "operator const unsigned long *() const"
+    // where the 2nd "o" results in a call to "operator size_t() const"
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stéphane Charette</dc:creator><pubDate>Mon, 18 Feb 2013 07:08:49 -0000</pubDate><guid>https://sourceforge.net6720d71bfa4f27e2b54f5f39a63030aa9b913906</guid></item><item><title>WikiPage SNMPpp::OID modified by Stéphane Charette</title><link>https://sourceforge.net/p/snmppp/wiki/SNMPpp%253A%253AOID/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -2,6 +2,8 @@
 ===

 net-snmp uses C arrays of unsigned longs as OIDs, and because there is no way to determine the length of arrays, a length must always accompany the array.
+
+Note that net-snmp typedefs "oid", so the lowercase "oid" unfortunately makes for a bad variable name to use if you have all warnings enabled in your compiler.

 SNMPpp::OID
 -----------
@@ -10,7 +12,7 @@

 Constructing, parsing, passing, and displaying OIDs has been made as easy as possible.  For example:

-    :::c++
+    :::C++
     SNMPpp::OID oid1( ".1.3.6.1.4.1.38322.1.1.1" );
     SNMPpp::OID oid2( oid1 );
     oid2 += "1.0";
@@ -21,4 +23,14 @@
     {
         ...etc...

-Note that net-snmp typedefs "oid", so the lowercase "oid" unfortunately makes for a bad variable name to use if you have all warnings enabled in your compiler.
+Calling Legacy net-snmp APIs
+----------------------------
+
+With conversion operators, the net-snmp APIs can easily be passed C++ OIDs.  For example:
+
+    :::C++
+    SNMP::OID o( ".1.3.6.1.4.1.38322" );
+    
+    snmp_add_null_var( pdu, o, o );
+    // where the first "o" calls operator const unsigned long *()
+    // where the second "o" calls operator size_t()
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stéphane Charette</dc:creator><pubDate>Mon, 18 Feb 2013 07:07:50 -0000</pubDate><guid>https://sourceforge.net7f6070ac794acb5ed56db6981ac3186bab5a07af</guid></item><item><title>WikiPage SNMPpp::OID modified by Stéphane Charette</title><link>https://sourceforge.net/p/snmppp/wiki/SNMPpp%253A%253AOID/</link><description>&lt;div class="markdown_content"&gt;&lt;h1 id="oid"&gt;OID&lt;/h1&gt;
&lt;p&gt;net-snmp uses C arrays of unsigned longs as OIDs, and because there is no way to determine the length of arrays, a length must always accompany the array.&lt;/p&gt;
&lt;h2 id="snmpppoid"&gt;SNMPpp::OID&lt;/h2&gt;
&lt;p&gt;The C++ OID class uses std::vector to store the components of arrays.  This makes it relatively easy to use C++ OIDs when calling net-snmp C APIs.&lt;/p&gt;
&lt;p&gt;Constructing, parsing, passing, and displaying OIDs has been made as easy as possible.  For example:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;SNMPpp&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;OID&lt;/span&gt; &lt;span class="n"&gt;oid1&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;.1.3.6.1.4.1.38322.1.1.1&amp;quot;&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;SNMPpp&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;OID&lt;/span&gt; &lt;span class="n"&gt;oid2&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="n"&gt;oid1&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;oid2&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;1.0&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;cout&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;OID is: &amp;quot;&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;oid2&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;endl&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="n"&gt;oid2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;isChildOf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="n"&gt;oid1&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="n"&gt;etc&lt;/span&gt;&lt;span class="p"&gt;...&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Note that net-snmp typedefs "oid", so the lowercase "oid" unfortunately makes for a bad variable name to use if you have all warnings enabled in your compiler.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stéphane Charette</dc:creator><pubDate>Mon, 18 Feb 2013 07:01:13 -0000</pubDate><guid>https://sourceforge.neta7139332fd488e0bd837be8c7b4934867294fc40</guid></item></channel></rss>