summaryrefslogtreecommitdiffstats
path: root/lib/zclient.h
diff options
context:
space:
mode:
authorpaul <paul>2005-05-06 21:25:49 +0000
committerpaul <paul>2005-05-06 21:25:49 +0000
commit8cc4198f9fabe5f10f5a773de1503d82f33a01fb (patch)
tree77045da709ff66629bd12029b9ee17700360909b /lib/zclient.h
parente7fe8c88c3d552400e1ae3ae9243319ab95d6f2d (diff)
downloadquagga-8cc4198f9fabe5f10f5a773de1503d82f33a01fb.tar.bz2
quagga-8cc4198f9fabe5f10f5a773de1503d82f33a01fb.tar.xz
2005-05-06 Paul Jakma <paul@dishone.st>
* (general) extern and static'ification of functions in code and header. Cleanup any definitions with unspecified arguments. Add casts for callback assignments where the callback is defined, typically, as passing void *, but the function being assigned has some other pointer type defined as its argument, as gcc complains about casts from void * to X* via function arguments. Fix some old K&R style function argument definitions. Add noreturn gcc attribute to some functions, as appropriate. Add unused gcc attribute to some functions (eg ones meant to help while debugging) Add guard defines to headers which were missing them. * command.c: (install_node) add const qualifier, still doesnt shut up the warning though, because of the double pointer. (cmp_node) ditto * keychain.c: (key_str2time) Add GET_LONG_RANGE() macro, derived fromn vty.h ones to fix some of the (long) < 0 warnings. * thread.c: (various) use thread_empty (cpu_record_hash_key) should cast to uintptr_t, a stdint.h type * vty.h: Add VTY_GET_IPV4_ADDRESS and VTY_GET_IPV4_PREFIX so they removed from ospfd/ospf_vty.h * zebra.h: Move definition of ZEBRA_PORT to here, to remove dependence of lib on zebra/zserv.h
Diffstat (limited to 'lib/zclient.h')
-rw-r--r--lib/zclient.h36
1 files changed, 18 insertions, 18 deletions
diff --git a/lib/zclient.h b/lib/zclient.h
index aa9f75c2..910db0dc 100644
--- a/lib/zclient.h
+++ b/lib/zclient.h
@@ -108,38 +108,38 @@ struct zapi_ipv4
};
/* Prototypes of zebra client service functions. */
-struct zclient *zclient_new (void);
-void zclient_init (struct zclient *, int);
-int zclient_start (struct zclient *);
-void zclient_stop (struct zclient *);
-void zclient_reset (struct zclient *);
+extern struct zclient *zclient_new (void);
+extern void zclient_init (struct zclient *, int);
+extern int zclient_start (struct zclient *);
+extern void zclient_stop (struct zclient *);
+extern void zclient_reset (struct zclient *);
/* Get TCP socket connection to zebra daemon at loopback address. */
-int zclient_socket (void);
+extern int zclient_socket (void);
/* Get unix stream socket connection to zebra daemon at given path. */
-int zclient_socket_un (const char *);
+extern int zclient_socket_un (const char *);
/* Send redistribute command to zebra daemon. Do not update zclient state. */
-int zebra_redistribute_send (int command, struct zclient *, int type);
+extern int zebra_redistribute_send (int command, struct zclient *, int type);
/* If state has changed, update state and call zebra_redistribute_send. */
-void zclient_redistribute (int command, struct zclient *, int type);
+extern void zclient_redistribute (int command, struct zclient *, int type);
/* If state has changed, update state and send the command to zebra. */
-void zclient_redistribute_default (int command, struct zclient *);
+extern void zclient_redistribute_default (int command, struct zclient *);
/* Send the message in zclient->obuf to the zebra daemon (or enqueue it).
Returns 0 for success or -1 on an I/O error. */
extern int zclient_send_message(struct zclient *);
-struct interface *zebra_interface_add_read (struct stream *);
-struct interface *zebra_interface_state_read (struct stream *s);
-struct connected *zebra_interface_address_read (int, struct stream *);
-void zebra_interface_if_set_value (struct stream *, struct interface *);
-void zebra_router_id_update_read (struct stream *s, struct prefix *rid);
-int zapi_ipv4_route (u_char, struct zclient *, struct prefix_ipv4 *,
- struct zapi_ipv4 *);
+extern struct interface *zebra_interface_add_read (struct stream *);
+extern struct interface *zebra_interface_state_read (struct stream *s);
+extern struct connected *zebra_interface_address_read (int, struct stream *);
+extern void zebra_interface_if_set_value (struct stream *, struct interface *);
+extern void zebra_router_id_update_read (struct stream *s, struct prefix *rid);
+extern int zapi_ipv4_route (u_char, struct zclient *, struct prefix_ipv4 *,
+ struct zapi_ipv4 *);
#ifdef HAVE_IPV6
/* IPv6 prefix add and delete function prototype. */
@@ -163,7 +163,7 @@ struct zapi_ipv6
u_int32_t metric;
};
-int zapi_ipv6_route (u_char cmd, struct zclient *zclient,
+extern int zapi_ipv6_route (u_char cmd, struct zclient *zclient,
struct prefix_ipv6 *p, struct zapi_ipv6 *api);
#endif /* HAVE_IPV6 */