diff --git a/bgpd/bgp_snmp.c b/bgpd/bgp_snmp.c
index 576e3e0..0f44e68 100644
--- a/bgpd/bgp_snmp.c
+++ b/bgpd/bgp_snmp.c
@@ -43,6 +43,7 @@
 #include "bgpd/bgp_attr.h"
 #include "bgpd/bgp_route.h"
 #include "bgpd/bgp_fsm.h"
+#include "bgpd/bgp_snmp.h"
 
 /* BGP4-MIB described in RFC1657. */
 #define BGP4MIB 1,3,6,1,2,1,15
@@ -128,12 +129,18 @@
 static struct in_addr bgp_empty_addr = {0};
 
 /* Hook functions. */
-static u_char *bgpVersion ();
-static u_char *bgpLocalAs ();
-static u_char *bgpPeerTable ();
-static u_char *bgpRcvdPathAttrTable ();
-static u_char *bgpIdentifier ();
-static u_char *bgp4PathAttrTable ();
+static u_char *bgpVersion (struct variable *, oid [], size_t *, int,
+			   size_t *, WriteMethod **);
+static u_char *bgpLocalAs (struct variable *, oid [], size_t *,
+			   int, size_t *, WriteMethod **);
+static u_char *bgpPeerTable (struct variable *, oid [], size_t *,
+			     int, size_t *, WriteMethod **);
+static u_char *bgpRcvdPathAttrTable (struct variable *, oid [], size_t *,
+				     int, size_t *, WriteMethod **);
+static u_char *bgpIdentifier (struct variable *, oid [], size_t *,
+			      int, size_t *, WriteMethod **);
+static u_char *bgp4PathAttrTable (struct variable *, oid [], size_t *,
+				  int, size_t *, WriteMethod **);
 /* static u_char *bgpTraps (); */
 
 struct variable bgp_variables[] = 
@@ -277,7 +284,7 @@
   return SNMP_INTEGER (bgp->as);
 }
 
-struct peer *
+static struct peer *
 peer_lookup_addr_ipv4 (struct in_addr *src)
 {
   struct bgp *bgp;
@@ -302,7 +309,7 @@
   return NULL;
 }
 
-struct peer *
+static struct peer *
 bgp_peer_lookup_next (struct in_addr *src)
 {
   struct bgp *bgp;
@@ -335,7 +342,7 @@
   return NULL;
 }
 
-struct peer *
+static struct peer *
 bgpPeerTable_lookup (struct variable *v, oid name[], size_t *length, 
 		     struct in_addr *addr, int exact)
 {
@@ -374,7 +381,7 @@
 }
 
 /* BGP write methods. */
-int
+static int
 write_bgpPeerTable (int action, u_char *var_val,
 		    u_char var_val_type, size_t var_val_len,
 		    u_char *statP, oid *name, size_t length,
@@ -383,7 +390,7 @@
   struct in_addr addr;
   struct peer *peer;
   long intval;
-  int bigsize = SNMP_MAX_LEN;
+  size_t bigsize = SNMP_MAX_LEN;
   
   if (var_val_type != ASN_INTEGER) 
     {
@@ -446,7 +453,7 @@
   return SNMP_ERR_NOERROR;
 }
 
-u_char *
+static u_char *
 bgpPeerTable (struct variable *v, oid name[], size_t *length,
 	      int exact, size_t *var_len, WriteMethod **write_method)
 {
@@ -586,7 +593,7 @@
   return NULL;
 }
 
-u_char *
+static u_char *
 bgpIdentifier (struct variable *v, oid name[], size_t *length,
 	       int exact, size_t *var_len, WriteMethod **write_method)
 {
@@ -603,7 +610,7 @@
   return SNMP_IPADDRESS (bgp->router_id);
 }
 
-u_char *
+static u_char *
 bgpRcvdPathAttrTable (struct variable *v, oid name[], size_t *length,
 		      int exact, size_t *var_len, WriteMethod **write_method)
 {
@@ -614,7 +621,7 @@
   return NULL;
 }
 
-struct bgp_info *
+static struct bgp_info *
 bgp4PathAttrLookup (struct variable *v, oid name[], size_t *length,
 		    struct bgp *bgp, struct prefix_ipv4 *addr, int exact)
 {
@@ -751,7 +758,7 @@
   return NULL;
 }
 
-u_char *
+static u_char *
 bgp4PathAttrTable (struct variable *v, oid name[], size_t *length,
 		   int exact, size_t *var_len, WriteMethod **write_method)
 {
diff --git a/lib/smux.c b/lib/smux.c
index 4a3696c..fd0c89c 100644
--- a/lib/smux.c
+++ b/lib/smux.c
@@ -138,7 +138,7 @@
   return 0;
 }
 
-int
+static int
 oid_compare_part (oid *o1, int o1_len, oid *o2, int o2_len)
 {
   int i;
@@ -156,7 +156,7 @@
   return 0;
 }
 
-void
+static void
 smux_oid_dump (const char *prefix, oid *oid, size_t oid_len)
 {
   unsigned int i;
@@ -173,7 +173,7 @@
   zlog_debug ("%s: %s", prefix, buf);
 }
 
-int
+static int
 smux_socket ()
 {
   int ret;
@@ -266,7 +266,7 @@
   return sock;
 }
 
-void
+static void
 smux_getresp_send (oid objid[], size_t objid_len, long reqid, long errstat,
 		   long errindex, u_char val_type, void *arg, size_t arg_len)
 {
@@ -324,13 +324,13 @@
   asn_build_sequence(h1,&length,(u_char)SMUX_GETRSP,ptr-h1e);
 
   if (debug_smux)
-    zlog_debug ("SMUX getresp send: %ld", (ptr - buf));
+    zlog_debug ("SMUX getresp send: %td", (ptr - buf));
   
   ret = send (smux_sock, buf, (ptr - buf), 0);
 }
 
-char *
-smux_var (char *ptr, size_t len, oid objid[], size_t *objid_len,
+static u_char *
+smux_var (u_char *ptr, size_t len, oid objid[], size_t *objid_len,
           size_t *var_val_len,
           u_char *var_val_type,
           void **var_value)
@@ -341,14 +341,14 @@
   u_char *val;
 
   if (debug_smux)
-    zlog_debug ("SMUX var parse: len %ld", len);
+    zlog_debug ("SMUX var parse: len %zd", len);
 
   /* Parse header. */
   ptr = asn_parse_header (ptr, &len, &type);
   
   if (debug_smux)
     {
-      zlog_debug ("SMUX var parse: type %d len %ld", type, len);
+      zlog_debug ("SMUX var parse: type %d len %zd", type, len);
       zlog_debug ("SMUX var parse: type must be %d", 
 		 (ASN_SEQUENCE | ASN_CONSTRUCTOR));
     }
@@ -430,7 +430,7 @@
    ucd-snmp smux and as such suppose, that the peer receives in the message
    only one variable. Fortunately, IBM seems to do the same in AIX. */
 
-int
+static int
 smux_set (oid *reqid, size_t *reqid_len,
           u_char val_type, void *val, size_t val_len, int action)
 {
@@ -498,7 +498,7 @@
   return SNMP_ERR_NOSUCHNAME;
 }
 
-int
+static int
 smux_get (oid *reqid, size_t *reqid_len, int exact, 
 	  u_char *val_type,void **val, size_t *val_len)
 {
@@ -564,7 +564,7 @@
   return SNMP_ERR_NOSUCHNAME;
 }
 
-int
+static int
 smux_getnext (oid *reqid, size_t *reqid_len, int exact, 
 	      u_char *val_type,void **val, size_t *val_len)
 {
@@ -650,8 +650,8 @@
 }
 
 /* GET message header. */
-char *
-smux_parse_get_header (char *ptr, size_t *len, long *reqid)
+static u_char *
+smux_parse_get_header (u_char *ptr, size_t *len, long *reqid)
 {
   u_char type;
   long errstat;
@@ -667,19 +667,19 @@
   ptr = asn_parse_int (ptr, len, &type, &errstat, sizeof (errstat));
 
   if (debug_smux)
-    zlog_debug ("SMUX GET errstat %ld len: %ld", errstat, *len);
+    zlog_debug ("SMUX GET errstat %ld len: %zd", errstat, *len);
 
   /* Error index. */
   ptr = asn_parse_int (ptr, len, &type, &errindex, sizeof (errindex));
 
   if (debug_smux)
-    zlog_debug ("SMUX GET errindex %ld len: %ld", errindex, *len);
+    zlog_debug ("SMUX GET errindex %ld len: %zd", errindex, *len);
 
   return ptr;
 }
 
-void
-smux_parse_set (char *ptr, size_t len, int action)
+static void
+smux_parse_set (u_char *ptr, size_t len, int action)
 {
   long reqid;
   oid oid[MAX_OID_LEN];
@@ -690,7 +690,7 @@
   int ret;
 
   if (debug_smux)
-    zlog_debug ("SMUX SET(%s) message parse: len %ld",
+    zlog_debug ("SMUX SET(%s) message parse: len %zd",
                (RESERVE1 == action) ? "RESERVE1" : ((FREE == action) ? "FREE" : "COMMIT"),
                len);
 
@@ -709,8 +709,8 @@
     smux_getresp_send (oid, oid_len, reqid, ret, 3, ASN_NULL, NULL, 0);
 }
 
-void
-smux_parse_get (char *ptr, size_t len, int exact)
+static void
+smux_parse_get (u_char *ptr, size_t len, int exact)
 {
   long reqid;
   oid oid[MAX_OID_LEN];
@@ -721,7 +721,7 @@
   int ret;
 
   if (debug_smux)
-    zlog_debug ("SMUX GET message parse: len %ld", len);
+    zlog_debug ("SMUX GET message parse: len %zd", len);
   
   /* Parse GET message header. */
   ptr = smux_parse_get_header (ptr, &len, &reqid);
@@ -743,8 +743,8 @@
 }
 
 /* Parse SMUX_CLOSE message. */
-void
-smux_parse_close (char *ptr, int len)
+static void
+smux_parse_close (u_char *ptr, int len)
 {
   long reason = 0;
 
@@ -757,10 +757,10 @@
 }
 
 /* SMUX_RRSP message. */
-void
-smux_parse_rrsp (char *ptr, size_t len)
+static void
+smux_parse_rrsp (u_char *ptr, size_t len)
 {
-  char val;
+  u_char val;
   long errstat;
   
   ptr = asn_parse_int (ptr, &len, &val, &errstat, sizeof (errstat));
@@ -770,8 +770,8 @@
 }
 
 /* Parse SMUX message. */
-int
-smux_parse (char *ptr, size_t len)
+static int
+smux_parse (u_char *ptr, size_t len)
 {
   /* This buffer we'll use for SOUT message. We could allocate it with
      malloc and save only static pointer/lenght, but IMHO static
@@ -791,7 +791,7 @@
   ptr = asn_parse_header (ptr, &len, &type);
 
   if (debug_smux)
-    zlog_debug ("SMUX message received type: %d rest len: %ld", type, len);
+    zlog_debug ("SMUX message received type: %d rest len: %zd", type, len);
 
   switch (type)
     {
@@ -883,7 +883,7 @@
 }
 
 /* SMUX message read function. */
-int
+static int
 smux_read (struct thread *t)
 {
   int sock;
@@ -939,13 +939,13 @@
   return 0;
 }
 
-int
+static int
 smux_open (int sock)
 {
   u_char buf[BUFSIZ];
   u_char *ptr;
   size_t len;
-  u_long version;
+  long version;
   u_char progname[] = QUAGGA_PROGNAME "-" QUAGGA_VERSION;
 
   if (debug_smux)
@@ -983,7 +983,7 @@
   ptr = asn_build_string (ptr, &len, 
 			  (u_char)
 			  (ASN_UNIVERSAL | ASN_PRIMITIVE | ASN_OCTET_STR),
-			  smux_passwd, strlen (smux_passwd));
+			  (u_char *)smux_passwd, strlen (smux_passwd));
 
   /* Fill in real SMUX header.  We exclude ASN header size (2). */
   len = BUFSIZ;
@@ -1034,13 +1034,13 @@
   val = SNMP_TRAP_ENTERPRISESPECIFIC;
   ptr = asn_build_int (ptr, &len, 
 		       (u_char)(ASN_UNIVERSAL | ASN_PRIMITIVE | ASN_INTEGER),
-		       &val, sizeof (val));
+		       (long *)&val, sizeof (val));
 
   /* Specific trap integer. */
   val = sptrap;
   ptr = asn_build_int (ptr, &len, 
 		       (u_char)(ASN_UNIVERSAL | ASN_PRIMITIVE | ASN_INTEGER),
-		       &val, sizeof (val));
+		       (long *)&val, sizeof (val));
 
   /* Timeticks timestamp. */
   val = 0;
@@ -1118,7 +1118,7 @@
   return send (smux_sock, buf, (ptr - buf), 0);
 }
 
-int
+static int
 smux_register (int sock)
 {
   u_char buf[BUFSIZ];
@@ -1175,7 +1175,7 @@
 }
 
 /* Try to connect to SNMP agent. */
-int
+static int
 smux_connect (struct thread *t)
 {
   int ret;
@@ -1226,7 +1226,7 @@
 }
 
 /* Clear all SMUX related resources. */
-void
+static void
 smux_stop ()
 {
   if (smux_read_thread)
@@ -1269,7 +1269,7 @@
     }
 }
 
-int
+static int
 smux_str2oid (const char *str, oid *oid, size_t *oid_len)
 {
   int len;
@@ -1312,7 +1312,7 @@
   return 0;
 }
 
-oid *
+static oid *
 smux_oid_dup (oid *objid, size_t objid_len)
 {
   oid *new;
@@ -1323,7 +1323,7 @@
   return new;
 }
 
-int
+static int
 smux_peer_oid (struct vty *vty, const char *oid_str, const char *passwd_str)
 {
   int ret;
@@ -1387,7 +1387,7 @@
   return MATCH_SUCCEEDED;
 }
 
-int
+static int
 smux_peer_default ()
 {
   if (smux_oid)
@@ -1467,7 +1467,7 @@
        "SMUX peering object ID\n"
        "SMUX peering password\n")
 
-int
+static int
 config_write_smux (struct vty *vty)
 {
   int first = 1;
@@ -1504,13 +1504,6 @@
   listnode_add_sort(treelist, tree);
 }
 
-void
-smux_reset ()
-{
-  /* Setting configuration to default. */
-  smux_peer_default ();
-}
-
 /* Compare function to keep treelist sorted */
 static int
 smux_tree_cmp(struct subtree *tree1, struct subtree *tree2)
diff --git a/ospf6d/ospf6_snmp.c b/ospf6d/ospf6_snmp.c
index 8d9842c..5ac7846 100644
--- a/ospf6d/ospf6_snmp.c
+++ b/ospf6d/ospf6_snmp.c
@@ -47,6 +47,7 @@
 #include "ospf6_message.h"
 #include "ospf6_neighbor.h"
 #include "ospf6d.h"
+#include "ospf6_snmp.h"
 
 /* OSPFv3-MIB */
 #define OSPFv3MIB 1,3,6,1,3,102
@@ -128,9 +129,12 @@
 static struct in_addr ospf6_empty_id = {0};
 
 /* Hook functions. */
-static u_char *ospfv3GeneralGroup ();
-static u_char *ospfv3AreaEntry ();
-static u_char *ospfv3AreaLsdbEntry ();
+static u_char *ospfv3GeneralGroup (struct variable *, oid *, size_t *,
+				   int, size_t *, WriteMethod **);
+static u_char *ospfv3AreaEntry (struct variable *, oid *, size_t *,
+				int, size_t *, WriteMethod **);
+static u_char *ospfv3AreaLsdbEntry (struct variable *, oid *, size_t *,
+				    int, size_t *, WriteMethod **);
 
 struct variable ospfv3_variables[] =
 {
diff --git a/ospfd/ospf_snmp.c b/ospfd/ospf_snmp.c
index e6ce1f0..c47d432 100644
--- a/ospfd/ospf_snmp.c
+++ b/ospfd/ospf_snmp.c
@@ -53,6 +53,7 @@
 #include "ospfd/ospf_flood.h"
 #include "ospfd/ospf_ism.h"
 #include "ospfd/ospf_dump.h"
+#include "ospfd/ospf_snmp.h"
 
 /* OSPF2-MIB. */
 #define OSPF2MIB 1,3,6,1,2,1,14
@@ -220,19 +221,32 @@
 static struct in_addr ospf_empty_addr = {0};
 
 /* Hook functions. */
-static u_char *ospfGeneralGroup ();
-static u_char *ospfAreaEntry ();
-static u_char *ospfStubAreaEntry ();
-static u_char *ospfLsdbEntry ();
-static u_char *ospfAreaRangeEntry ();
-static u_char *ospfHostEntry ();
-static u_char *ospfIfEntry ();
-static u_char *ospfIfMetricEntry ();
-static u_char *ospfVirtIfEntry ();
-static u_char *ospfNbrEntry ();
-static u_char *ospfVirtNbrEntry ();
-static u_char *ospfExtLsdbEntry ();
-static u_char *ospfAreaAggregateEntry ();
+static u_char *ospfGeneralGroup (struct variable *, oid *, size_t *,
+				 int, size_t *, WriteMethod **);
+static u_char *ospfAreaEntry (struct variable *, oid *, size_t *, int,
+			      size_t *, WriteMethod **);
+static u_char *ospfStubAreaEntry (struct variable *, oid *, size_t *,
+				  int, size_t *, WriteMethod **);
+static u_char *ospfLsdbEntry (struct variable *, oid *, size_t *, int,
+			      size_t *, WriteMethod **);
+static u_char *ospfAreaRangeEntry (struct variable *, oid *, size_t *, int,
+				   size_t *, WriteMethod **);
+static u_char *ospfHostEntry (struct variable *, oid *, size_t *, int,
+			      size_t *, WriteMethod **);
+static u_char *ospfIfEntry (struct variable *, oid *, size_t *, int,
+			    size_t *, WriteMethod **);
+static u_char *ospfIfMetricEntry (struct variable *, oid *, size_t *, int,
+				  size_t *, WriteMethod **);
+static u_char *ospfVirtIfEntry (struct variable *, oid *, size_t *, int,
+				size_t *, WriteMethod **);
+static u_char *ospfNbrEntry (struct variable *, oid *, size_t *, int,
+			     size_t *, WriteMethod **);
+static u_char *ospfVirtNbrEntry (struct variable *, oid *, size_t *, int,
+				 size_t *, WriteMethod **);
+static u_char *ospfExtLsdbEntry (struct variable *, oid *, size_t *, int,
+				 size_t *, WriteMethod **);
+static u_char *ospfAreaAggregateEntry (struct variable *, oid *, size_t *,
+				       int, size_t *, WriteMethod **);
 
 struct variable ospf_variables[] = 
 {
@@ -495,7 +509,7 @@
 
 /* The administrative status of OSPF.  When OSPF is enbled on at least
    one interface return 1. */
-int
+static int
 ospf_admin_stat (struct ospf *ospf)
 {
   struct listnode *node;
@@ -612,7 +626,7 @@
   return NULL;
 }
 
-struct ospf_area *
+static struct ospf_area *
 ospf_area_lookup_next (struct ospf *ospf, struct in_addr *area_id, int first)
 {
   struct ospf_area *area;
@@ -643,7 +657,7 @@
   return NULL;
 }
 
-struct ospf_area *
+static struct ospf_area *
 ospfAreaLookup (struct variable *v, oid name[], size_t *length,
 		struct in_addr *addr, int exact)
 {
@@ -746,7 +760,7 @@
   return NULL;
 }
 
-struct ospf_area *
+static struct ospf_area *
 ospf_stub_area_lookup_next (struct in_addr *area_id, int first)
 {
   struct ospf_area *area;
@@ -776,7 +790,7 @@
   return NULL;
 }
 
-struct ospf_area *
+static struct ospf_area *
 ospfStubAreaLookup (struct variable *v, oid name[], size_t *length,
 		    struct in_addr *addr, int exact)
 {
@@ -877,7 +891,7 @@
   return NULL;
 }
 
-struct ospf_lsa *
+static struct ospf_lsa *
 lsdb_lookup_next (struct ospf_area *area, u_char *type, int type_next,
 		  struct in_addr *ls_id, int ls_id_next,
 		  struct in_addr *router_id, int router_id_next)
@@ -912,7 +926,7 @@
   return NULL;
 }
 
-struct ospf_lsa *
+static struct ospf_lsa *
 ospfLsdbLookup (struct variable *v, oid *name, size_t *length,
 		struct in_addr *area_id, u_char *type,
 		struct in_addr *ls_id, struct in_addr *router_id, int exact)
@@ -1124,7 +1138,7 @@
   return NULL;
 }
 
-struct ospf_area_range *
+static struct ospf_area_range *
 ospfAreaRangeLookup (struct variable *v, oid *name, size_t *length,
 		     struct in_addr *area_id, struct in_addr *range_net,
 		     int exact)
@@ -1273,7 +1287,7 @@
   return NULL;
 }
 
-struct ospf_nbr_nbma *
+static struct ospf_nbr_nbma *
 ospfHostLookup (struct variable *v, oid *name, size_t *length,
 		struct in_addr *addr, int exact)
 {
@@ -1388,7 +1402,7 @@
   struct interface *ifp;
 };
 
-struct ospf_snmp_if *
+static struct ospf_snmp_if *
 ospf_snmp_if_new ()
 {
   struct ospf_snmp_if *osif;
@@ -1398,7 +1412,7 @@
   return osif;
 }
 
-void
+static void
 ospf_snmp_if_free (struct ospf_snmp_if *osif)
 {
   XFREE (0, osif);
@@ -1488,7 +1502,7 @@
   listnode_add_after (ospf_snmp_iflist, pn, osif);
 }
 
-int
+static int
 ospf_snmp_is_if_have_addr (struct interface *ifp)
 {
   struct listnode *nn;
@@ -1504,7 +1518,7 @@
   return 0;
 }
 
-struct ospf_interface *
+static struct ospf_interface *
 ospf_snmp_if_lookup (struct in_addr *ifaddr, unsigned int *ifindex)
 {
   struct listnode *node;
@@ -1528,7 +1542,7 @@
   return oi;
 }
 
-struct ospf_interface *
+static struct ospf_interface *
 ospf_snmp_if_lookup_next (struct in_addr *ifaddr, unsigned int *ifindex,
 			  int ifaddr_next, int ifindex_next)
 {
@@ -1563,19 +1577,21 @@
     {
       /* Usual interface */
       if (ifaddr->s_addr) 
-        /* The interface must have valid AF_INET connected address */
-        /* it must have lager IPv4 address value than the lookup entry */
-        if ((ospf_snmp_is_if_have_addr(osif->ifp)) &&
-            (ntohl (osif->addr.s_addr) > ntohl (ifaddr->s_addr)))
-          {
-            *ifaddr = osif->addr;
-            *ifindex = osif->ifindex;
+	{
+	  /* The interface must have valid AF_INET connected address */
+	  /* it must have lager IPv4 address value than the lookup entry */
+	  if ((ospf_snmp_is_if_have_addr(osif->ifp)) &&
+	      (ntohl (osif->addr.s_addr) > ntohl (ifaddr->s_addr)))
+	    {
+	      *ifaddr = osif->addr;
+	      *ifindex = osif->ifindex;
         
-            /* and it must be an OSPF interface */
-            oi = ospf_if_lookup_by_local_addr (ospf, osif->ifp, *ifaddr);
-            if (oi)
-              return oi;
-          }
+	      /* and it must be an OSPF interface */
+	      oi = ospf_if_lookup_by_local_addr (ospf, osif->ifp, *ifaddr);
+	      if (oi)
+		return oi;
+	    }
+	}
       /* Unnumbered interface */
       else  
         /* The interface must NOT have valid AF_INET connected address */
@@ -1595,7 +1611,7 @@
   return NULL;
 }
 
-int
+static int
 ospf_snmp_iftype (struct interface *ifp)
 {
 #define ospf_snmp_iftype_broadcast         1
@@ -1609,7 +1625,7 @@
   return ospf_snmp_iftype_broadcast;
 }
 
-struct ospf_interface *
+static struct ospf_interface *
 ospfIfLookup (struct variable *v, oid *name, size_t *length,
 	      struct in_addr *ifaddr, unsigned int *ifindex, int exact)
 {
@@ -1665,7 +1681,7 @@
 
 static u_char *
 ospfIfEntry (struct variable *v, oid *name, size_t *length, int exact,
-	     size_t  *var_len, WriteMethod **write_method)
+	     size_t *var_len, WriteMethod **write_method)
 {
   unsigned int ifindex;
   struct in_addr ifaddr;
@@ -1769,7 +1785,7 @@
 
 #define OSPF_SNMP_METRIC_VALUE 1
 
-struct ospf_interface *
+static struct ospf_interface *
 ospfIfMetricLookup (struct variable *v, oid *name, size_t *length,
 		    struct in_addr *ifaddr, unsigned int *ifindex, int exact)
 {
@@ -1915,7 +1931,7 @@
   route_unlock_node (rn);
 }
 
-struct ospf_vl_data *
+static struct ospf_vl_data *
 ospf_snmp_vl_lookup (struct in_addr *area_id, struct in_addr *neighbor)
 {
   struct prefix_ls lp;
@@ -1938,7 +1954,7 @@
   return NULL;
 }
 
-struct ospf_vl_data *
+static struct ospf_vl_data *
 ospf_snmp_vl_lookup_next (struct in_addr *area_id, struct in_addr *neighbor,
 			  int first)
 {
@@ -1975,7 +1991,7 @@
   return NULL;
 }
 
-struct ospf_vl_data *
+static struct ospf_vl_data *
 ospfVirtIfLookup (struct variable *v, oid *name, size_t *length,
 		  struct in_addr *area_id, struct in_addr *neighbor, int exact)
 {
@@ -2025,7 +2041,7 @@
 
 static u_char *
 ospfVirtIfEntry (struct variable *v, oid *name, size_t *length, int exact,
-		 size_t  *var_len, WriteMethod **write_method)
+		 size_t *var_len, WriteMethod **write_method)
 {
   struct ospf_vl_data *vl_data;
   struct ospf_interface *oi;
@@ -2089,7 +2105,7 @@
   return NULL;
 }
 
-struct ospf_neighbor *
+static struct ospf_neighbor *
 ospf_snmp_nbr_lookup (struct ospf *ospf, struct in_addr *nbr_addr,
 		      unsigned int *ifindex)
 {
@@ -2118,7 +2134,7 @@
   return NULL;
 }
 
-struct ospf_neighbor *
+static struct ospf_neighbor *
 ospf_snmp_nbr_lookup_next (struct in_addr *nbr_addr, unsigned int *ifindex,
 			   int first)
 {
@@ -2164,7 +2180,7 @@
   return NULL;
 }
 
-struct ospf_neighbor *
+static struct ospf_neighbor *
 ospfNbrLookup (struct variable *v, oid *name, size_t *length,
 	       struct in_addr *nbr_addr, unsigned int *ifindex, int exact)
 {
@@ -2258,7 +2274,7 @@
 
 static u_char *
 ospfNbrEntry (struct variable *v, oid *name, size_t *length, int exact,
-	      size_t  *var_len, WriteMethod **write_method)
+	      size_t *var_len, WriteMethod **write_method)
 {
   struct in_addr nbr_addr;
   unsigned int ifindex;
@@ -2320,7 +2336,7 @@
 
 static u_char *
 ospfVirtNbrEntry (struct variable *v, oid *name, size_t *length, int exact,
-		  size_t  *var_len, WriteMethod **write_method)
+		  size_t *var_len, WriteMethod **write_method)
 {
   struct ospf_vl_data *vl_data;
   struct in_addr area_id;
@@ -2373,7 +2389,7 @@
   return NULL;
 }
 
-struct ospf_lsa *
+static struct ospf_lsa *
 ospfExtLsdbLookup (struct variable *v, oid *name, size_t *length, u_char *type,
 		   struct in_addr *ls_id, struct in_addr *router_id, int exact)
 {
@@ -2466,7 +2482,7 @@
 
 static u_char *
 ospfExtLsdbEntry (struct variable *v, oid *name, size_t *length, int exact,
-		  size_t  *var_len, WriteMethod **write_method)
+		  size_t *var_len, WriteMethod **write_method)
 {
   struct ospf_lsa *lsa;
   struct lsa_header *lsah;
diff --git a/ripd/rip_snmp.c b/ripd/rip_snmp.c
index d02c761..61c47c7 100644
--- a/ripd/rip_snmp.c
+++ b/ripd/rip_snmp.c
@@ -93,10 +93,14 @@
 struct route_table *rip_ifaddr_table;
 
 /* Hook functions. */
-static u_char *rip2Globals ();
-static u_char *rip2IfStatEntry ();
-static u_char *rip2IfConfAddress ();
-static u_char *rip2PeerTable ();
+static u_char *rip2Globals (struct variable *, oid [], size_t *,
+			    int, size_t *, WriteMethod **);
+static u_char *rip2IfStatEntry (struct variable *, oid [], size_t *,
+				int, size_t *, WriteMethod **);
+static u_char *rip2IfConfAddress (struct variable *, oid [], size_t *,
+				  int, size_t *, WriteMethod **);
+static u_char *rip2PeerTable (struct variable *, oid [], size_t *,
+			      int, size_t *, WriteMethod **);
 
 struct variable rip_variables[] = 
 {
@@ -215,7 +219,7 @@
     }
 }
 
-struct interface *
+static struct interface *
 rip_ifaddr_lookup_next (struct in_addr *addr)
 {
   struct prefix_ipv4 p;
diff --git a/zebra/zebra_snmp.c b/zebra/zebra_snmp.c
index 7e66e2f..0fde4bb 100644
--- a/zebra/zebra_snmp.c
+++ b/zebra/zebra_snmp.c
@@ -90,10 +90,14 @@
 oid ipfw_oid [] = { IPFWMIB };
 
 /* Hook functions. */
-u_char * ipFwNumber ();
-u_char * ipFwTable ();
-u_char * ipCidrNumber ();
-u_char * ipCidrTable ();
+static u_char * ipFwNumber (struct variable *, oid [], size_t *,
+		     int, size_t *, WriteMethod **);
+static u_char * ipFwTable (struct variable *, oid [], size_t *,
+			   int, size_t *, WriteMethod **);
+static u_char * ipCidrNumber (struct variable *, oid [], size_t *,
+			      int, size_t *, WriteMethod **);
+static u_char * ipCidrTable (struct variable *, oid [], size_t *,
+			     int, size_t *, WriteMethod **);
 
 struct variable zebra_variables[] = 
   {
@@ -133,7 +137,7 @@
   };
 
 
-u_char *
+static u_char *
 ipFwNumber (struct variable *v, oid objid[], size_t *objid_len,
 	    int exact, size_t *val_len, WriteMethod **write_method)
 {
@@ -158,7 +162,7 @@
   return (u_char *)&result;
 }
 
-u_char *
+static u_char *
 ipCidrNumber (struct variable *v, oid objid[], size_t *objid_len,
 	      int exact, size_t *val_len, WriteMethod **write_method)
 {
@@ -183,7 +187,7 @@
   return (u_char *)&result;
 }
 
-int
+static int
 in_addr_cmp(u_char *p1, u_char *p2)
 {
   int i;
@@ -199,7 +203,7 @@
   return 0;
 }
 
-int 
+static int 
 in_addr_add(u_char *p, int num)
 {
   int i, ip0;
@@ -224,7 +228,8 @@
   return 1;
 }
 
-int proto_trans(int type)
+static int
+proto_trans(int type)
 {
   switch (type)
     {
@@ -251,7 +256,7 @@
     }
 }
 
-void
+static void
 check_replace(struct route_node *np2, struct rib *rib2, 
               struct route_node **np, struct rib **rib)
 {
@@ -294,7 +299,7 @@
   return;
 }
 
-void
+static void
 get_fwtable_route_node(struct variable *v, oid objid[], size_t *objid_len, 
 		       int exact, struct route_node **np, struct rib **rib)
 {
@@ -339,7 +344,7 @@
    * ipForwardDest, ipForwardProto, ipForwardPolicy, ipForwardNextHop
    */
 
-  if (*objid_len > v->namelen)
+  if (*objid_len > (unsigned) v->namelen)
     oid2in_addr (objid + v->namelen, MIN(4, *objid_len - v->namelen), &dest);
 
   if (*objid_len > (unsigned) v->namelen + 4)
@@ -441,7 +446,7 @@
   return;
 }
 
-u_char *
+static u_char *
 ipFwTable (struct variable *v, oid objid[], size_t *objid_len,
 	   int exact, size_t *val_len, WriteMethod **write_method)
 {
@@ -546,7 +551,7 @@
   return NULL;
 }
 
-u_char *
+static u_char *
 ipCidrTable (struct variable *v, oid objid[], size_t *objid_len,
 	     int exact, size_t *val_len, WriteMethod **write_method)
 {
