diff options
author | paul <paul> | 2005-05-06 21:25:49 +0000 |
---|---|---|
committer | paul <paul> | 2005-05-06 21:25:49 +0000 |
commit | 8cc4198f9fabe5f10f5a773de1503d82f33a01fb (patch) | |
tree | 77045da709ff66629bd12029b9ee17700360909b /lib/sockunion.h | |
parent | e7fe8c88c3d552400e1ae3ae9243319ab95d6f2d (diff) |
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/sockunion.h')
-rw-r--r-- | lib/sockunion.h | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/lib/sockunion.h b/lib/sockunion.h index 738df06c..96b9a0d4 100644 --- a/lib/sockunion.h +++ b/lib/sockunion.h @@ -87,42 +87,42 @@ enum connect_result #define sockunion_family(X) (X)->sa.sa_family /* Prototypes. */ -int str2sockunion (const char *, union sockunion *); -const char *sockunion2str (union sockunion *, char *, size_t); -int sockunion_cmp (union sockunion *, union sockunion *); -int sockunion_same (union sockunion *, union sockunion *); +extern int str2sockunion (const char *, union sockunion *); +extern const char *sockunion2str (union sockunion *, char *, size_t); +extern int sockunion_cmp (union sockunion *, union sockunion *); +extern int sockunion_same (union sockunion *, union sockunion *); -char *sockunion_su2str (union sockunion *su); -union sockunion *sockunion_str2su (const char *str); -struct in_addr sockunion_get_in_addr (union sockunion *su); -int sockunion_accept (int sock, union sockunion *); -int sockunion_stream_socket (union sockunion *); -int sockopt_reuseaddr (int); -int sockopt_reuseport (int); -int sockunion_bind (int sock, union sockunion *, unsigned short, union sockunion *); -int sockopt_ttl (int family, int sock, int ttl); -int sockunion_socket (union sockunion *su); -const char *inet_sutop (union sockunion *su, char *str); -enum connect_result -sockunion_connect (int fd, union sockunion *su, unsigned short port, unsigned int); -union sockunion *sockunion_getsockname (int); -union sockunion *sockunion_getpeername (int); -union sockunion *sockunion_dup (union sockunion *); -void sockunion_free (union sockunion *); +extern char *sockunion_su2str (union sockunion *su); +extern union sockunion *sockunion_str2su (const char *str); +extern struct in_addr sockunion_get_in_addr (union sockunion *su); +extern int sockunion_accept (int sock, union sockunion *); +extern int sockunion_stream_socket (union sockunion *); +extern int sockopt_reuseaddr (int); +extern int sockopt_reuseport (int); +extern int sockunion_bind (int sock, union sockunion *, + unsigned short, union sockunion *); +extern int sockopt_ttl (int family, int sock, int ttl); +extern int sockunion_socket (union sockunion *su); +extern const char *inet_sutop (union sockunion *su, char *str); +extern enum connect_result sockunion_connect (int fd, union sockunion *su, + unsigned short port, + unsigned int); +extern union sockunion *sockunion_getsockname (int); +extern union sockunion *sockunion_getpeername (int); +extern union sockunion *sockunion_dup (union sockunion *); +extern void sockunion_free (union sockunion *); #ifndef HAVE_INET_NTOP -const char * -inet_ntop (int family, const void *addrptr, char *strptr, size_t len); +extern const char * inet_ntop (int family, const void *addrptr, + char *strptr, size_t len); #endif /* HAVE_INET_NTOP */ #ifndef HAVE_INET_PTON -int -inet_pton (int family, const char *strptr, void *addrptr); +extern int inet_pton (int family, const char *strptr, void *addrptr); #endif /* HAVE_INET_PTON */ #ifndef HAVE_INET_ATON -int -inet_aton (const char *cp, struct in_addr *inaddr); +extern int inet_aton (const char *cp, struct in_addr *inaddr); #endif #endif /* _ZEBRA_SOCKUNION_H */ |