lib: constify sockunion api

Add const to read-only api calls.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
diff --git a/lib/sockunion.h b/lib/sockunion.h
index b9f3514..2c79fb5 100644
--- a/lib/sockunion.h
+++ b/lib/sockunion.h
@@ -84,9 +84,9 @@
 
 /* Prototypes. */
 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 *);
+extern const char *sockunion2str (const union sockunion *, char *, size_t);
+extern int sockunion_cmp (const union sockunion *, const union sockunion *);
+extern int sockunion_same (const union sockunion *, const union sockunion *);
 
 extern union sockunion *sockunion_str2su (const char *str);
 extern int sockunion_accept (int sock, union sockunion *);
@@ -99,14 +99,14 @@
 extern int sockopt_ttl (int family, int sock, int ttl);
 extern int sockopt_minttl (int family, int sock, int minttl);
 extern int sockopt_cork (int sock, int onoff);
-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, 
+extern int sockunion_socket (const union sockunion *su);
+extern const char *inet_sutop (const union sockunion *su, char *str);
+extern enum connect_result sockunion_connect (int fd, const 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 union sockunion *sockunion_dup (const union sockunion *);
 extern void sockunion_free (union sockunion *);
 
 #ifndef HAVE_INET_NTOP