diff --git a/lib/ChangeLog b/lib/ChangeLog
index 5aedc1e..84cf7fc 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,8 @@
+2004-10-05 Hasso Tepper <hasso at quagga.net>
+
+	* *.[c|h]: Make many strings cons and a lot of int -> unsigned int
+	  changes to fix warnings.
+
 2004-10-05 Paul Jakma <paul@dishone.st>
 
 	* sockopt.{c,h}: add sockopt_iphdrincl_swab_{htosys,systoh},
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 3b3d546..9cb25f7 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -29,4 +29,4 @@
 
 version.c: Makefile
 	echo '' >version.c
-	echo 'char *host_name = "$(host_alias)";' >>version.c
+	echo 'const char *host_name = "$(host_alias)";' >>version.c
diff --git a/lib/buffer.c b/lib/buffer.c
index 0fffdfd..6fd9a2b 100644
--- a/lib/buffer.c
+++ b/lib/buffer.c
@@ -382,7 +382,7 @@
 /* Flush buffer to the file descriptor.  Mainly used from vty
    interface. */
 int
-buffer_flush_vty (struct buffer *b, int fd, int size, 
+buffer_flush_vty (struct buffer *b, int fd, unsigned int size, 
 		  int erase_flag, int no_more_flag)
 {
   int nbytes;
diff --git a/lib/command.c b/lib/command.c
index a4cf9eb..c65e6fa 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -37,7 +37,7 @@
 struct host host;
 
 /* Default motd string. */
-char *default_motd = 
+const char *default_motd = 
 "\r\n\
 Hello, this is " QUAGGA_PROGNAME " (version " QUAGGA_VERSION ").\r\n\
 Copyright 1996-2004 Kunihiro Ishiguro, et al.\r\n\
@@ -142,7 +142,7 @@
 void
 sort_node ()
 {
-  int i, j;
+  unsigned int i, j;
   struct cmd_node *cnode;
   vector descvec;
   struct cmd_element *cmd_element;
@@ -218,7 +218,7 @@
 void
 cmd_free_strvec (vector v)
 {
-  int i;
+  unsigned int i;
   char *cp;
 
   if (!v)
@@ -268,14 +268,14 @@
 
 /* New string vector. */
 vector
-cmd_make_descvec (char *string, char *descstr)
+cmd_make_descvec (const char *string, const char *descstr)
 {
   int multiple = 0;
-  char *sp;
+  const char *sp;
   char *token;
   int len;
-  char *cp;
-  char *dp;
+  const char *cp;
+  const char *dp;
   vector allvec;
   vector strvec = NULL;
   struct desc *desc;
@@ -363,8 +363,7 @@
 int
 cmd_cmdsize (vector strvec)
 {
-  int i;
-  char *str;
+  unsigned int i;
   int size = 0;
   vector descvec;
 
@@ -376,9 +375,7 @@
 	{
 	  struct desc *desc = vector_slot (descvec, 0);
 
-	  str = desc->cmd;
-	  
-	  if (str == NULL || CMD_OPTION (str))
+	  if (desc->cmd == NULL || CMD_OPTION (desc->cmd))
 	    return size;
 	  else
 	    size++;
@@ -390,7 +387,7 @@
 }
 
 /* Return prompt character of specified node. */
-char *
+const char *
 cmd_prompt (enum node_type node)
 {
   struct cmd_node *cnode;
@@ -448,7 +445,7 @@
   return crypt (passwd, salt);
 }
 
-char *
+const char *
 syslog_facility_print (int facility)
 {
   switch (facility)
@@ -639,9 +636,9 @@
 };
 
 enum match_type
-cmd_ipv4_match (char *str)
+cmd_ipv4_match (const char *str)
 {
-  char *sp;
+  const char *sp;
   int dots = 0, nums = 0;
   char buf[4];
 
@@ -696,9 +693,9 @@
 }
 
 enum match_type
-cmd_ipv4_prefix_match (char *str)
+cmd_ipv4_prefix_match (const char *str)
 {
-  char *sp;
+  const char *sp;
   int dots = 0;
   char buf[4];
 
@@ -787,11 +784,11 @@
 #ifdef HAVE_IPV6
 
 enum match_type
-cmd_ipv6_match (char *str)
+cmd_ipv6_match (const char *str)
 {
   int state = STATE_START;
   int colons = 0, nums = 0, double_colon = 0;
-  char *sp = NULL;
+  const char *sp = NULL;
   struct sockaddr_in6 sin6_dummy;
   int ret;
 
@@ -893,12 +890,12 @@
 }
 
 enum match_type
-cmd_ipv6_prefix_match (char *str)
+cmd_ipv6_prefix_match (const char *str)
 {
   int state = STATE_START;
   int colons = 0, nums = 0, double_colon = 0;
   int mask;
-  char *sp = NULL;
+  const char *sp = NULL;
   char *endptr = NULL;
 
   if (str == NULL)
@@ -1028,7 +1025,7 @@
 #define DECIMAL_STRLEN_MAX 10
 
 int
-cmd_range_match (char *range, char *str)
+cmd_range_match (const char *range, const char *str)
 {
   char *p;
   char buf[DECIMAL_STRLEN_MAX + 1];
@@ -1074,10 +1071,10 @@
 
 /* Make completion match and return match type flag. */
 enum match_type
-cmd_filter_by_completion (char *command, vector v, int index)
+cmd_filter_by_completion (char *command, vector v, unsigned int index)
 {
-  int i;
-  char *str;
+  unsigned int i;
+  const char *str;
   struct cmd_element *cmd_element;
   enum match_type match_type;
   vector descvec;
@@ -1093,7 +1090,7 @@
 	  vector_slot (v, i) = NULL;
 	else
 	  {
-	    int j;
+	    unsigned int j;
 	    int matched = 0;
 
 	    descvec = vector_slot (cmd_element->strvec, index);
@@ -1189,10 +1186,10 @@
 
 /* Filter vector by command character with index. */
 enum match_type
-cmd_filter_by_string (char *command, vector v, int index)
+cmd_filter_by_string (char *command, vector v, unsigned int index)
 {
-  int i;
-  char *str;
+  unsigned int i;
+  const char *str;
   struct cmd_element *cmd_element;
   enum match_type match_type;
   vector descvec;
@@ -1210,7 +1207,7 @@
 	  vector_slot (v, i) = NULL;
 	else 
 	  {
-	    int j;
+	    unsigned int j;
 	    int matched = 0;
 
 	    descvec = vector_slot (cmd_element->strvec, index);
@@ -1299,11 +1296,11 @@
 int
 is_cmd_ambiguous (char *command, vector v, int index, enum match_type type)
 {
-  int i;
-  int j;
-  char *str = NULL;
+  unsigned int i;
+  unsigned int j;
+  const char *str = NULL;
   struct cmd_element *cmd_element;
-  char *matched = NULL;
+  const char *matched = NULL;
   vector descvec;
   struct desc *desc;
   
@@ -1393,8 +1390,8 @@
 }
 
 /* If src matches dst return dst string, otherwise return NULL */
-char *
-cmd_entry_function (char *src, char *dst)
+const char *
+cmd_entry_function (const char *src, const char *dst)
 {
   /* Skip variable arguments. */
   if (CMD_OPTION (dst) || CMD_VARIABLE (dst) || CMD_VARARG (dst) ||
@@ -1415,8 +1412,8 @@
 /* If src matches dst return dst string, otherwise return NULL */
 /* This version will return the dst string always if it is
    CMD_VARIABLE for '?' key processing */
-char *
-cmd_entry_function_desc (char *src, char *dst)
+const char *
+cmd_entry_function_desc (const char *src, const char *dst)
 {
   if (CMD_VARARG (dst))
     return dst;
@@ -1480,9 +1477,9 @@
 /* Check same string element existence.  If it isn't there return
     1. */
 int
-cmd_unique_string (vector v, char *str)
+cmd_unique_string (vector v, const char *str)
 {
-  int i;
+  unsigned int i;
   char *match;
 
   for (i = 0; i < vector_max (v); i++)
@@ -1495,9 +1492,9 @@
 /* Compare string to description vector.  If there is same string
    return 1 else return 0. */
 int
-desc_unique_string (vector v, char *str)
+desc_unique_string (vector v, const char *str)
 {
-  int i;
+  unsigned int i;
   struct desc *desc;
 
   for (i = 0; i < vector_max (v); i++)
@@ -1523,12 +1520,12 @@
 vector
 cmd_describe_command_real (vector vline, struct vty *vty, int *status)
 {
-  int i;
+  unsigned int i;
   vector cmd_vector;
 #define INIT_MATCHVEC_SIZE 10
   vector matchvec;
   struct cmd_element *cmd_element;
-  int index;
+  unsigned int index;
   int ret;
   enum match_type match;
   char *command;
@@ -1554,7 +1551,7 @@
 	{
 	  struct cmd_element *cmd_element;
 	  vector descvec;
-	  int j, k;
+	  unsigned int j, k;
 
 	  for (j = 0; j < vector_max (cmd_vector); j++)
 	    if ((cmd_element = vector_slot (cmd_vector, j)) != NULL)
@@ -1600,7 +1597,7 @@
   for (i = 0; i < vector_max (cmd_vector); i++)
     if ((cmd_element = vector_slot (cmd_vector, i)) != NULL)
       {
-	char *string = NULL;
+	const char *string = NULL;
 	vector strvec = cmd_element->strvec;
 
         /* if command is NULL, index may be equal to vector_max */
@@ -1617,7 +1614,7 @@
 	      }
 	    else
 	      {
-		int j;
+		unsigned int j;
 		vector descvec = vector_slot (strvec, index);
 		struct desc *desc;
 
@@ -1657,7 +1654,7 @@
     {
       enum node_type onode;
       vector shifted_vline;
-      int index;
+      unsigned int index;
 
       onode = vty->node;
       vty->node = ENABLE_NODE;
@@ -1719,12 +1716,12 @@
 char **
 cmd_complete_command_real (vector vline, struct vty *vty, int *status)
 {
-  int i;
+  unsigned int i;
   vector cmd_vector = vector_copy (cmd_node_vector (cmdvec, vty->node));
 #define INIT_MATCHVEC_SIZE 10
   vector matchvec;
   struct cmd_element *cmd_element;
-  int index = vector_max (vline) - 1;
+  unsigned int index = vector_max (vline) - 1;
   char **match_str;
   struct desc *desc;
   vector descvec;
@@ -1767,7 +1764,7 @@
   for (i = 0; i < vector_max (cmd_vector); i++)
     if ((cmd_element = vector_slot (cmd_vector, i)) != NULL)
       {
-	char *string;
+	const char *string;
 	vector strvec = cmd_element->strvec;
 	
 	/* Check field length */
@@ -1775,7 +1772,7 @@
 	  vector_slot (cmd_vector, i) = NULL;
 	else 
 	  {
-	    int j;
+	    unsigned int j;
 
 	    descvec = vector_slot (strvec, index);
 	    for (j = 0; j < vector_max (descvec); j++)
@@ -1872,7 +1869,7 @@
     {
       enum node_type onode;
       vector shifted_vline;
-      int index;
+      unsigned int index;
 
       onode = vty->node;
       vty->node = ENABLE_NODE;
@@ -1926,8 +1923,8 @@
 int
 cmd_execute_command_real (vector vline, struct vty *vty, struct cmd_element **cmd)
 {
-  int i;
-  int index;
+  unsigned int i;
+  unsigned int index;
   vector cmd_vector;
   struct cmd_element *cmd_element;
   struct cmd_element *matched_element;
@@ -2020,12 +2017,11 @@
 	  if (vector_max (descvec) == 1)
 	    {
 	      struct desc *desc = vector_slot (descvec, 0);
-	      char *str = desc->cmd;
 
-	      if (CMD_VARARG (str))
+	      if (CMD_VARARG (desc->cmd))
 		varflag = 1;
 
-	      if (varflag || CMD_VARIABLE (str) || CMD_OPTION (str))
+	      if (varflag || CMD_VARIABLE (desc->cmd) || CMD_OPTION (desc->cmd))
 		argv[argc++] = vector_slot (vline, i);
 	    }
 	  else
@@ -2058,7 +2054,7 @@
   if ( cmd_try_do_shortcut(vty->node, vector_slot(vline, 0) ) )
     {
       vector shifted_vline;
-      int index;
+      unsigned int index;
 
       vty->node = ENABLE_NODE;
       /* We can try it on enable node, cos' the vty is authenticated */
@@ -2106,8 +2102,8 @@
 cmd_execute_command_strict (vector vline, struct vty *vty, 
 			    struct cmd_element **cmd)
 {
-  int i;
-  int index;
+  unsigned int i;
+  unsigned int index;
   vector cmd_vector;
   struct cmd_element *cmd_element;
   struct cmd_element *matched_element;
@@ -2195,12 +2191,11 @@
 	  if (vector_max (descvec) == 1)
 	    {
 	      struct desc *desc = vector_slot (descvec, 0);
-	      char *str = desc->cmd;
 
-	      if (CMD_VARARG (str))
+	      if (CMD_VARARG (desc->cmd))
 		varflag = 1;
 	  
-	      if (varflag || CMD_VARIABLE (str) || CMD_OPTION (str))
+	      if (varflag || CMD_VARIABLE (desc->cmd) || CMD_OPTION (desc->cmd))
 		argv[argc++] = vector_slot (vline, i);
 	    }
 	  else
@@ -2437,7 +2432,7 @@
        "list",
        "Print command list\n")
 {
-  int i;
+  unsigned int i;
   struct cmd_node *cnode = vector_slot (cmdvec, vty->node);
   struct cmd_element *cmd;
 
@@ -2455,7 +2450,7 @@
        "Write running configuration to memory, network, or terminal\n"
        "Write to configuration file\n")
 {
-  int i;
+  unsigned int i;
   int fd;
   struct cmd_node *node;
   char *config_file;
@@ -2592,7 +2587,7 @@
        "Write running configuration to memory, network, or terminal\n"
        "Write to terminal\n")
 {
-  int i;
+  unsigned int i;
   struct cmd_node *node;
 
   if (vty->type == VTY_SHELL_SERV)
diff --git a/lib/command.h b/lib/command.h
index d1648d6..66883fb 100644
--- a/lib/command.h
+++ b/lib/command.h
@@ -60,7 +60,7 @@
   int encrypt;
 
   /* Banner configuration. */
-  char *motd;
+  const char *motd;
 };
 
 /* There are some command levels which called from command node. */
@@ -113,7 +113,7 @@
   enum node_type node;		
 
   /* Prompt character at vty interface. */
-  char *prompt;			
+  const char *prompt;			
 
   /* Is this node's configuration goes to vtysh ? */
   int vtysh;
@@ -128,12 +128,12 @@
 /* Structure of command element. */
 struct cmd_element 
 {
-  char *string;			/* Command specification by string. */
+  const char *string;			/* Command specification by string. */
   int (*func) (struct cmd_element *, struct vty *, int, char **);
-  char *doc;			/* Documentation of this command. */
+  const char *doc;			/* Documentation of this command. */
   int daemon;                   /* Daemon to which this command belong. */
   vector strvec;		/* Pointing out each description vector. */
-  int cmdsize;			/* Command index count. */
+  unsigned int cmdsize;		/* Command index count. */
   char *config;			/* Configuration string */
   vector subconfig;		/* Sub configuration string */
 };
@@ -141,8 +141,8 @@
 /* Command description structure. */
 struct desc
 {
-  char *cmd;			/* Command string. */
-  char *str;			/* Command's description. */
+  const char *cmd;			/* Command string. */
+  const char *str;			/* Command's description. */
 };
 
 /* Return value of the commands. */
@@ -291,7 +291,7 @@
 void cmd_free_strvec (vector);
 vector cmd_describe_command ();
 char **cmd_complete_command ();
-char *cmd_prompt (enum node_type);
+const char *cmd_prompt (enum node_type);
 int config_from_file (struct vty *, FILE *);
 int cmd_execute_command (vector, struct vty *, struct cmd_element **);
 int cmd_execute_command_strict (vector, struct vty *, struct cmd_element **);
diff --git a/lib/distribute.c b/lib/distribute.c
index 59dbc5a..78de4bf 100644
--- a/lib/distribute.c
+++ b/lib/distribute.c
@@ -119,8 +119,7 @@
 unsigned int
 distribute_hash_make (struct distribute *dist)
 {
-  unsigned int key;
-  int i;
+  unsigned int i, key;
 
   key = 0;
   if (dist->ifname)
@@ -625,7 +624,7 @@
 int
 config_show_distribute (struct vty *vty)
 {
-  int i;
+  unsigned int i;
   struct hash_backet *mp;
   struct distribute *dist;
 
@@ -704,7 +703,7 @@
 int
 config_write_distribute (struct vty *vty)
 {
-  int i;
+  unsigned int i;
   struct hash_backet *mp;
   int write = 0;
 
diff --git a/lib/filter.c b/lib/filter.c
index cd4bc0a..ee3dbc0 100644
--- a/lib/filter.c
+++ b/lib/filter.c
@@ -137,7 +137,7 @@
 }
 
 /* Return string of filter_type. */
-static char *
+const static char *
 filter_type_str (struct filter *filter)
 {
   switch (filter->type)
@@ -267,9 +267,9 @@
 /* Insert new access list to list of access_list.  Each acceess_list
    is sorted by the name. */
 struct access_list *
-access_list_insert (afi_t afi, char *name)
+access_list_insert (afi_t afi, const char *name)
 {
-  int i;
+  unsigned int i;
   long number;
   struct access_list *access;
   struct access_list *point;
@@ -358,7 +358,7 @@
 
 /* Lookup access_list from list of access_list by name. */
 struct access_list *
-access_list_lookup (afi_t afi, char *name)
+access_list_lookup (afi_t afi, const char *name)
 {
   struct access_list *access;
   struct access_master *master;
@@ -384,7 +384,7 @@
 /* Get access list from list of access_list.  If there isn't matched
    access_list create new one and return it. */
 struct access_list *
-access_list_get (afi_t afi, char *name)
+access_list_get (afi_t afi, const char *name)
 {
   struct access_list *access;
 
@@ -595,8 +595,8 @@
 
 int
 filter_set_cisco (struct vty *vty, char *name_str, char *type_str,
-		  char *addr_str, char *addr_mask_str,
-		  char *mask_str, char *mask_mask_str,
+		  const char *addr_str, const char *addr_mask_str,
+		  const char *mask_str, const char *mask_mask_str,
 		  int extended, int set)
 {
   int ret;
@@ -1153,8 +1153,8 @@
 }
 
 int
-filter_set_zebra (struct vty *vty, char *name_str, char *type_str,
-		  afi_t afi, char *prefix_str, int exact, int set)
+filter_set_zebra (struct vty *vty, const char *name_str, const char *type_str,
+		  afi_t afi, const char *prefix_str, int exact, int set)
 {
   int ret;
   enum filter_type type;
diff --git a/lib/filter.h b/lib/filter.h
index 077ac2f..a33e7bf 100644
--- a/lib/filter.h
+++ b/lib/filter.h
@@ -61,7 +61,7 @@
 void access_list_reset (void);
 void access_list_add_hook (void (*func)(struct access_list *));
 void access_list_delete_hook (void (*func)(struct access_list *));
-struct access_list *access_list_lookup (afi_t, char *);
+struct access_list *access_list_lookup (afi_t, const char *);
 enum filter_type access_list_apply (struct access_list *, void *);
 
 #endif /* _ZEBRA_FILTER_H */
diff --git a/lib/hash.c b/lib/hash.c
index e89171b..04549ad 100644
--- a/lib/hash.c
+++ b/lib/hash.c
@@ -140,7 +140,7 @@
 hash_iterate (struct hash *hash, 
 	      void (*func) (struct hash_backet *, void *), void *arg)
 {
-  int i;
+  unsigned int i;
   struct hash_backet *hb;
   struct hash_backet *hbnext;
 
@@ -159,7 +159,7 @@
 void
 hash_clean (struct hash *hash, void (*free_func) (void *))
 {
-  int i;
+  unsigned int i;
   struct hash_backet *hb;
   struct hash_backet *next;
 
diff --git a/lib/if.c b/lib/if.c
index 43e84a4..8fbaa76 100644
--- a/lib/if.c
+++ b/lib/if.c
@@ -203,7 +203,7 @@
       if (ifp->ifindex == index)
 	return ifp->name;
     }
-  return "unknown";
+  return (char *) "unknown";
 }
 
 /* Interface existance check by interface name. */
diff --git a/lib/if_rmap.c b/lib/if_rmap.c
index 4cf8ad9..0f3fa9c 100644
--- a/lib/if_rmap.c
+++ b/lib/if_rmap.c
@@ -106,8 +106,7 @@
 unsigned int
 if_rmap_hash_make (struct if_rmap *if_rmap)
 {
-  unsigned int key;
-  int i;
+  unsigned int i, key;
 
   key = 0;
   for (i = 0; i < strlen (if_rmap->ifname); i++)
@@ -276,7 +275,7 @@
 int
 config_write_if_rmap (struct vty *vty)
 {
-  int i;
+  unsigned int i;
   struct hash_backet *mp;
   int write = 0;
 
diff --git a/lib/keychain.c b/lib/keychain.c
index 527da05..1d38167 100644
--- a/lib/keychain.c
+++ b/lib/keychain.c
@@ -59,7 +59,7 @@
 }
 
 struct keychain *
-keychain_lookup (char *name)
+keychain_lookup (const char *name)
 {
   struct listnode *nn;
   struct keychain *keychain;
@@ -76,7 +76,7 @@
 }
 
 int
-key_cmp_func (struct key *k1, struct key *k2)
+key_cmp_func (const struct key *k1, const struct key *k2)
 {
   if (k1->index > k2->index)
     return 1;
@@ -94,7 +94,7 @@
 }
 
 struct keychain *
-keychain_get (char *name)
+keychain_get (const char *name)
 {
   struct keychain *keychain;
 
@@ -125,7 +125,7 @@
 }
 
 struct key *
-key_lookup (struct keychain *keychain, u_int32_t index)
+key_lookup (const struct keychain *keychain, u_int32_t index)
 {
   struct listnode *nn;
   struct key *key;
@@ -139,7 +139,7 @@
 }
 
 struct key *
-key_lookup_for_accept (struct keychain *keychain, u_int32_t index)
+key_lookup_for_accept (const struct keychain *keychain, u_int32_t index)
 {
   struct listnode *nn;
   struct key *key;
@@ -163,7 +163,7 @@
 }
 
 struct key *
-key_match_for_accept (struct keychain *keychain, char *auth_str)
+key_match_for_accept (const struct keychain *keychain, const char *auth_str)
 {
   struct listnode *nn;
   struct key *key;
@@ -183,7 +183,7 @@
 }
 
 struct key *
-key_lookup_for_send (struct keychain *keychain)
+key_lookup_for_send (const struct keychain *keychain)
 {
   struct listnode *nn;
   struct key *key;
@@ -204,7 +204,7 @@
 }
 
 struct key *
-key_get (struct keychain *keychain, u_int32_t index)
+key_get (const struct keychain *keychain, u_int32_t index)
 {
   struct key *key;
 
@@ -370,17 +370,18 @@
 /* Convert HH:MM:SS MON DAY YEAR to time_t value.  -1 is returned when
    given string is malformed. */
 time_t 
-key_str2time(char *time_str, char *day_str, char *month_str, char *year_str)
+key_str2time (const char *time_str, const char *day_str, const char *month_str,
+	      const char *year_str)
 {
   int i = 0;
   char *colon;
   struct tm tm;
   time_t time;
-  int sec, min, hour;
-  int day, month, year;
+  unsigned int sec, min, hour;
+  unsigned int day, month, year;
   char *endptr = NULL;
 
-  char *month_name[] = 
+  const char *month_name[] = 
   {
     "January",
     "February",
@@ -466,10 +467,11 @@
 }
 
 int
-key_lifetime_set (struct vty *vty, struct key_range *krange, char *stime_str,
-		  char *sday_str, char *smonth_str, char *syear_str,
-		  char *etime_str, char *eday_str, char *emonth_str,
-		  char *eyear_str)
+key_lifetime_set (struct vty *vty, struct key_range *krange,
+		  const char *stime_str, const char *sday_str,
+		  const char *smonth_str, const char *syear_str,
+		  const char *etime_str, const char *eday_str,
+		  const char *emonth_str, const char *eyear_str)
 {
   time_t time_start;
   time_t time_end;
@@ -502,8 +504,9 @@
 
 int
 key_lifetime_duration_set (struct vty *vty, struct key_range *krange,
-			   char *stime_str, char *sday_str, char *smonth_str,
-			   char *syear_str, char *duration_str)
+			   const char *stime_str, const char *sday_str,
+			   const char *smonth_str, const char *syear_str,
+			   const char *duration_str)
 {
   time_t time_start;
   u_int32_t duration;
@@ -531,8 +534,8 @@
 
 int
 key_lifetime_infinite_set (struct vty *vty, struct key_range *krange,
-			   char *stime_str, char *sday_str, char *smonth_str,
-			   char *syear_str)
+			   const char *stime_str, const char *sday_str,
+			   const char *smonth_str, const char *syear_str)
 {
   time_t time_start;
     
diff --git a/lib/keychain.h b/lib/keychain.h
index 0cfa3d5..e98c403 100644
--- a/lib/keychain.h
+++ b/lib/keychain.h
@@ -48,9 +48,9 @@
 };
 
 void keychain_init ();
-struct keychain *keychain_lookup (char *);
-struct key *key_lookup_for_accept (struct keychain *, u_int32_t);
-struct key *key_match_for_accept (struct keychain *, char *);
-struct key *key_lookup_for_send (struct keychain *);
+struct keychain *keychain_lookup (const char *);
+struct key *key_lookup_for_accept (const struct keychain *, u_int32_t);
+struct key *key_match_for_accept (const struct keychain *, const char *);
+struct key *key_lookup_for_send (const struct keychain *);
 
 #endif /* _ZEBRA_KEYCHAIN_H */
diff --git a/lib/log.c b/lib/log.c
index 2090b91..bbe6e99 100644
--- a/lib/log.c
+++ b/lib/log.c
@@ -474,7 +474,7 @@
 }
 
 /* Message lookup function. */
-char *
+const char *
 lookup (struct message *mes, int key)
 {
   struct message *pnt;
@@ -488,7 +488,7 @@
 
 /* Very old hacky version of message lookup function.  Still partly
    used in bgpd and ospfd. FIXME Seems that it's not used any more. */
-char *
+const char *
 mes_lookup (struct message *meslist, int max, int index)
 {
   if (index < 0 || index >= max) 
diff --git a/lib/log.h b/lib/log.h
index defe064..e2eeb82 100644
--- a/lib/log.h
+++ b/lib/log.h
@@ -121,8 +121,8 @@
 /* For hackey massage lookup and check */
 #define LOOKUP(x, y) mes_lookup(x, x ## _max, y)
 
-char *lookup (struct message *, int);
-char *mes_lookup (struct message *meslist, int max, int index);
+const char *lookup (struct message *, int);
+const char *mes_lookup (struct message *meslist, int max, int index);
 
 extern const char *zlog_priority[];
 
diff --git a/lib/plist.c b/lib/plist.c
index 4069f86..ef2fffc 100644
--- a/lib/plist.c
+++ b/lib/plist.c
@@ -184,7 +184,7 @@
 static struct prefix_list *
 prefix_list_insert (afi_t afi, char *name)
 {
-  int i;
+  unsigned int i;
   long number;
   struct prefix_list *plist;
   struct prefix_list *point;
@@ -517,7 +517,7 @@
 }
 
 /* Return string of prefix_list_type. */
-static char *
+const static char *
 prefix_list_type_str (struct prefix_list_entry *pentry)
 {
   switch (pentry->type)
diff --git a/lib/privs.h b/lib/privs.h
index 65c9f35..76e8af2 100644
--- a/lib/privs.h
+++ b/lib/privs.h
@@ -61,9 +61,9 @@
   zebra_capabilities_t *caps_i;       /* caps to allow inheritance of */
   int cap_num_p;                      /* number of caps in arrays */
   int cap_num_i;                    
-  char *user;                         /* user and group to run as */
-  char *group;
-  char *vty_group;                    /* group to chown vty socket to */
+  const char *user;                   /* user and group to run as */
+  const char *group;
+  const char *vty_group;              /* group to chown vty socket to */
   /* methods */
   int 
     (*change) (zebra_privs_ops_t);    /* change privileges, 0 on success */
diff --git a/lib/routemap.c b/lib/routemap.c
index 9d6bbcf..67bbc03 100644
--- a/lib/routemap.c
+++ b/lib/routemap.c
@@ -171,7 +171,7 @@
 }
 
 /* Return route map's type string. */
-static char *
+const static char *
 route_map_type_str (enum route_map_type type)
 {
   switch (type)
@@ -426,7 +426,7 @@
 struct route_map_rule_cmd *
 route_map_lookup_match (char *name)
 {
-  int i;
+  unsigned int i;
   struct route_map_rule_cmd *rule;
 
   for (i = 0; i < vector_max (route_match_vec); i++)
@@ -440,7 +440,7 @@
 struct route_map_rule_cmd *
 route_map_lookup_set (char *name)
 {
-  int i;
+  unsigned int i;
   struct route_map_rule_cmd *rule;
 
   for (i = 0; i < vector_max (route_set_vec); i++)
diff --git a/lib/sockunion.c b/lib/sockunion.c
index 039da1a..587b324 100644
--- a/lib/sockunion.c
+++ b/lib/sockunion.c
@@ -704,7 +704,7 @@
 int
 in6addr_cmp (struct in6_addr *addr1, struct in6_addr *addr2)
 {
-  int i;
+  unsigned int i;
   u_char *p1, *p2;
 
   p1 = (u_char *)addr1;
diff --git a/lib/thread.c b/lib/thread.c
index 474571e..2847b8b 100644
--- a/lib/thread.c
+++ b/lib/thread.c
@@ -382,7 +382,7 @@
 
 /* Trim blankspace and "()"s */
 static char *
-strip_funcname (char *funcname) 
+strip_funcname (const char *funcname) 
 {
   char buff[100];
   char tmp, *ret, *e, *b = buff;
@@ -410,7 +410,7 @@
 /* Get new thread.  */
 static struct thread *
 thread_get (struct thread_master *m, u_char type,
-	    int (*func) (struct thread *), void *arg, char* funcname)
+	    int (*func) (struct thread *), void *arg, const char* funcname)
 {
   struct thread *thread;
 
@@ -439,7 +439,7 @@
 /* Add new read thread. */
 struct thread *
 funcname_thread_add_read (struct thread_master *m, 
-		 int (*func) (struct thread *), void *arg, int fd, char* funcname)
+		 int (*func) (struct thread *), void *arg, int fd, const char* funcname)
 {
   struct thread *thread;
 
@@ -462,7 +462,7 @@
 /* Add new write thread. */
 struct thread *
 funcname_thread_add_write (struct thread_master *m,
-		 int (*func) (struct thread *), void *arg, int fd, char* funcname)
+		 int (*func) (struct thread *), void *arg, int fd, const char* funcname)
 {
   struct thread *thread;
 
@@ -487,7 +487,7 @@
                                    int (*func) (struct thread *), 
                                   void *arg, 
                                   struct timeval *time_relative, 
-                                  char* funcname)
+                                  const char* funcname)
 {
   struct thread *thread;
   struct timeval timer_now;
@@ -528,7 +528,7 @@
 struct thread *
 funcname_thread_add_timer (struct thread_master *m,
 		           int (*func) (struct thread *), 
-		           void *arg, long timer, char* funcname)
+		           void *arg, long timer, const char* funcname)
 {
   struct timeval trel;
 
@@ -544,7 +544,7 @@
 struct thread *
 funcname_thread_add_timer_msec (struct thread_master *m,
                                 int (*func) (struct thread *), 
-                                void *arg, long timer, char* funcname)
+                                void *arg, long timer, const char* funcname)
 {
   struct timeval trel;
 
@@ -561,7 +561,7 @@
 /* Add simple event thread. */
 struct thread *
 funcname_thread_add_event (struct thread_master *m,
-		  int (*func) (struct thread *), void *arg, int val, char* funcname)
+		  int (*func) (struct thread *), void *arg, int val, const char* funcname)
 {
   struct thread *thread;
 
@@ -888,7 +888,7 @@
                 int (*func)(struct thread *), 
                 void *arg,
                 int val,
-		char* funcname)
+		const char* funcname)
 {
   struct thread dummy; 
 
diff --git a/lib/thread.h b/lib/thread.h
index 9a8c2be..716a6a6 100644
--- a/lib/thread.h
+++ b/lib/thread.h
@@ -74,7 +74,7 @@
 
 struct cpu_thread_history {
   int (*func)(struct thread *);
-  char *funcname;
+  const char *funcname;
   unsigned int total_calls;
   unsigned long total, max;
   unsigned char types;
@@ -138,21 +138,21 @@
 /* Prototypes. */
 struct thread_master *thread_master_create ();
 struct thread *funcname_thread_add_read (struct thread_master *, 
-				int (*)(struct thread *), void *, int, char*);
+				int (*)(struct thread *), void *, int, const char*);
 struct thread *funcname_thread_add_write (struct thread_master *,
-				 int (*)(struct thread *), void *, int, char*);
+				 int (*)(struct thread *), void *, int, const char*);
 struct thread *funcname_thread_add_timer (struct thread_master *,
-				 int (*)(struct thread *), void *, long, char*);
+				 int (*)(struct thread *), void *, long, const char*);
 struct thread *funcname_thread_add_timer_msec (struct thread_master *,
-				 int (*)(struct thread *), void *, long, char*);
+				 int (*)(struct thread *), void *, long, const char*);
 struct thread *funcname_thread_add_event (struct thread_master *,
-				 int (*)(struct thread *), void *, int, char*);
+				 int (*)(struct thread *), void *, int, const char*);
 void thread_cancel (struct thread *);
 void thread_cancel_event (struct thread_master *, void *);
 
 struct thread *thread_fetch (struct thread_master *, struct thread *);
 struct thread *funcname_thread_execute (struct thread_master *,
-			       int (*)(struct thread *), void *, int, char *);
+			       int (*)(struct thread *), void *, int, const char *);
 void thread_call (struct thread *);
 unsigned long thread_timer_remain_second (struct thread *);
 
diff --git a/lib/vty.c b/lib/vty.c
index 3e799b8..c10c984 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -848,9 +848,10 @@
 
 void
 vty_describe_fold (struct vty *vty, int cmd_width,
-                 int desc_width, struct desc *desc)
+		   unsigned int desc_width, struct desc *desc)
 {
-  char *buf, *cmd, *p;
+  char *buf;
+  const char *cmd, *p;
   int pos;
 
   cmd = desc->cmd[0] == '.' ? desc->cmd + 1 : desc->cmd;
@@ -891,7 +892,7 @@
   int ret;
   vector vline;
   vector describe;
-  int i, width, desc_width;
+  unsigned int i, width, desc_width;
   struct desc *desc, *desc_cr = NULL;
 
   vline = cmd_make_strvec (vty->buf);
@@ -934,7 +935,7 @@
   for (i = 0; i < vector_max (describe); i++)
     if ((desc = vector_slot (describe, i)) != NULL)
       {
-	int len;
+	unsigned int len;
 
 	if (desc->cmd[0] == '\0')
 	  continue;
@@ -2308,7 +2309,7 @@
 void
 vty_log (const char *proto_str, const char *format, va_list va)
 {
-  int i;
+  unsigned int i;
   struct vty *vty;
 
   for (i = 0; i < vector_max (vtyvec); i++)
@@ -2397,7 +2398,7 @@
        "who",
        "Display who is on vty\n")
 {
-  int i;
+  unsigned int i;
   struct vty *v;
 
   for (i = 0; i < vector_max (vtyvec); i++)
@@ -2677,7 +2678,7 @@
 void
 vty_reset ()
 {
-  int i;
+  unsigned int i;
   struct vty *vty;
   struct thread *vty_serv_thread;
 
@@ -2717,7 +2718,7 @@
 void
 vty_finish ()
 {
-  int i;
+  unsigned int i;
   struct vty *vty;
   struct thread *vty_serv_thread;
 
diff --git a/lib/zclient.c b/lib/zclient.c
index 5df420f..98829f6 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -167,7 +167,7 @@
 #include <sys/un.h>
 
 int
-zclient_socket_un (char *path)
+zclient_socket_un (const char *path)
 {
   int ret;
   int sock, len;
diff --git a/lib/zclient.h b/lib/zclient.h
index 03a6e0a..d18cf62 100644
--- a/lib/zclient.h
+++ b/lib/zclient.h
@@ -109,7 +109,7 @@
 void zclient_stop (struct zclient *);
 void zclient_reset (struct zclient *);
 int zclient_socket ();
-int zclient_socket_un (char *);
+int zclient_socket_un (const char *);
 
 void zclient_redistribute (int, struct zclient *, int);
 void zclient_redistribute_default (int, struct zclient *);
