$NetBSD: patch-ab,v 1.2 2004/03/29 16:27:30 cube Exp $

--- gkrellm_snmp.c.orig	2001-07-27 20:06:41.000000000 +0000
+++ gkrellm_snmp.c
@@ -33,14 +33,9 @@
 #include <stdio.h>
 #include <sys/types.h>
 
-#include <ucd-snmp/asn1.h>
-#include <ucd-snmp/mib.h>
-#include <ucd-snmp/parse.h>
-
-#include <ucd-snmp/snmp.h>
-#include <ucd-snmp/snmp_api.h>
-#include <ucd-snmp/snmp_client.h>
-#include <ucd-snmp/snmp_impl.h> /* special ASN types */
+#include <net-snmp/net-snmp-config.h>
+#include <net-snmp/net-snmp-includes.h>
+
 #ifdef DEBUG_SNMP
 #include <ucd-snmp/snmp_debug.h>
 #endif /* DEBUG_SNMP */
@@ -88,6 +83,7 @@ struct Reader {
 	GtkTooltips             *tooltip;
 };
 
+oid *snmp_parse_oid(const char *argv, oid *root, size_t *rootlen);
 
 /*
  * caller needs to free the returned gchar*
@@ -277,7 +273,8 @@ retry:
       if (response->errstat == SNMP_ERR_NOERROR){
         /* just render all vars */
         for(vars = response->variables; vars; vars = vars->next_variable) {
-	    sprint_variable(textbuf, vars->name, vars->name_length, vars);
+	    snprint_variable(textbuf, 1023, vars->name, vars->name_length, vars);
+	    textbuf[1023] = '\0';
 	    if (result) {
 	        tmp = result;
 		result = g_strdup_printf("%s\n%s\n", tmp, textbuf);
@@ -375,7 +372,7 @@ snmp_input(int op,
     u_long time = 0;
     Reader *reader = NULL;
 
-    if (op == RECEIVED_MESSAGE) {
+    if (op == NETSNMP_CALLBACK_OP_RECEIVED_MESSAGE) {
 
         if (pdu->errstat == SNMP_ERR_NOERROR) {
 
@@ -415,7 +412,7 @@ snmp_input(int op,
         }
 
 
-    } else if (op == TIMED_OUT){
+    } else if (op == NETSNMP_CALLBACK_OP_TIMED_OUT){
         error = g_strdup_printf("Error! SNMP Timeout.");
     }
     /* we use session's callback magic to pass back data */
