summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorpaul <paul>2004-10-11 11:28:44 +0000
committerpaul <paul>2004-10-11 11:28:44 +0000
commitc9eca01b298b83a849a608477f5f5b978a58167e (patch)
treeafd25d986e49e57c73a4d555d4c083ab66d454fa /lib
parent6c83567192ada1a66822c3f35580ce6a85f51ac9 (diff)
2004-10-11 Paul Jakma <paul@dishone.st>
* if.h: mtu's should be unsigned. * routemap.{c,h}: const char updates * smux.{c,h}: ditto
Diffstat (limited to 'lib')
-rw-r--r--lib/ChangeLog3
-rw-r--r--lib/if.h4
-rw-r--r--lib/routemap.c10
-rw-r--r--lib/routemap.h10
-rw-r--r--lib/smux.c3
-rw-r--r--lib/smux.h2
6 files changed, 18 insertions, 14 deletions
diff --git a/lib/ChangeLog b/lib/ChangeLog
index 30eafa81..d258ab30 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -3,6 +3,9 @@
* thread.c: (funcname_thread_add_timer)
(funcname_thread_add_timer_msec) Fix mistakes from last change.
Pointed out by Liu Xin in [quagga-dev 1609].
+ * if.h: mtu's should be unsigned.
+ * routemap.{c,h}: const char updates
+ * smux.{c,h}: ditto
2004-10-10 Paul Jakma <paul@dishone.st>
diff --git a/lib/if.h b/lib/if.h
index 0f088a97..218f1026 100644
--- a/lib/if.h
+++ b/lib/if.h
@@ -94,8 +94,8 @@ struct interface
int metric;
/* Interface MTU. */
- int mtu; /* IPv4 MTU */
- int mtu6; /* IPv6 MTU - probably, but not neccessarily same as mtu */
+ unsigned int mtu; /* IPv4 MTU */
+ unsigned int mtu6; /* IPv6 MTU - probably, but not neccessarily same as mtu */
/* Hardware address. */
#ifdef HAVE_SOCKADDR_DL
diff --git a/lib/routemap.c b/lib/routemap.c
index cd231be7..cc63e3a1 100644
--- a/lib/routemap.c
+++ b/lib/routemap.c
@@ -489,7 +489,7 @@ route_map_rule_delete (struct route_map_rule_list *list,
/* strcmp wrapper function which don't crush even argument is NULL. */
int
-rulecmp (char *dst, char *src)
+rulecmp (const char *dst, const char *src)
{
if (dst == NULL)
{
@@ -511,7 +511,7 @@ rulecmp (char *dst, char *src)
/* Add match statement to route map. */
int
route_map_add_match (struct route_map_index *index, const char *match_name,
- char *match_arg)
+ const char *match_arg)
{
struct route_map_rule *rule;
struct route_map_rule *next;
@@ -570,7 +570,7 @@ route_map_add_match (struct route_map_index *index, const char *match_name,
/* Delete specified route match rule. */
int
route_map_delete_match (struct route_map_index *index, const char *match_name,
- char *match_arg)
+ const char *match_arg)
{
struct route_map_rule *rule;
struct route_map_rule_cmd *cmd;
@@ -597,7 +597,7 @@ route_map_delete_match (struct route_map_index *index, const char *match_name,
/* Add route-map set statement to the route map. */
int
route_map_add_set (struct route_map_index *index, const char *set_name,
- char *set_arg)
+ const char *set_arg)
{
struct route_map_rule *rule;
struct route_map_rule *next;
@@ -656,7 +656,7 @@ route_map_add_set (struct route_map_index *index, const char *set_name,
/* Delete route map set rule. */
int
route_map_delete_set (struct route_map_index *index, const char *set_name,
- char *set_arg)
+ const char *set_arg)
{
struct route_map_rule *rule;
struct route_map_rule_cmd *cmd;
diff --git a/lib/routemap.h b/lib/routemap.h
index 73874d6b..22a2b19d 100644
--- a/lib/routemap.h
+++ b/lib/routemap.h
@@ -81,7 +81,7 @@ struct route_map_rule_cmd
route_map_object_t, void *);
/* Compile argument and return result as void *. */
- void *(*func_compile)(char *);
+ void *(*func_compile)(const char *);
/* Free allocated value by func_compile (). */
void (*func_free)(void *);
@@ -156,24 +156,24 @@ void route_map_init_vty ();
int
route_map_add_match (struct route_map_index *index,
const char *match_name,
- char *match_arg);
+ const char *match_arg);
/* Delete specified route match rule. */
int
route_map_delete_match (struct route_map_index *index,
const char *match_name,
- char *match_arg);
+ const char *match_arg);
/* Add route-map set statement to the route map. */
int
route_map_add_set (struct route_map_index *index,
const char *set_name,
- char *set_arg);
+ const char *set_arg);
/* Delete route map set rule. */
int
route_map_delete_set (struct route_map_index *index, const char *set_name,
- char *set_arg);
+ const char *set_arg);
/* Install rule command to the match list. */
void
diff --git a/lib/smux.c b/lib/smux.c
index 5831b818..7e443e3c 100644
--- a/lib/smux.c
+++ b/lib/smux.c
@@ -1445,7 +1445,8 @@ config_write_smux (struct vty *vty)
/* Register subtree to smux master tree. */
void
-smux_register_mib (char *descr, struct variable *var, size_t width, int num,
+smux_register_mib (const char *descr, struct variable *var,
+ size_t width, int num,
oid name[], size_t namelen)
{
struct subtree *tree;
diff --git a/lib/smux.h b/lib/smux.h
index 1d259932..975cf8b9 100644
--- a/lib/smux.h
+++ b/lib/smux.h
@@ -146,7 +146,7 @@ struct trap_object
void smux_init (struct thread_master *tm, oid [], size_t);
void smux_start (void);
-void smux_register_mib(char *, struct variable *, size_t, int, oid [], size_t);
+void smux_register_mib(const char *, struct variable *, size_t, int, oid [], size_t);
int smux_header_generic (struct variable *, oid [], size_t *, int, size_t *,
WriteMethod **);
int smux_trap (oid *, size_t, oid *, size_t, struct trap_object *, size_t, unsigned int, u_char);