tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Adding const to in6_sin_2_v4mapsin6



Would anyone object to the following change ?

It makes it easier to use an address from the route cache as the
input to the address mapping.

Index: in6.c
===================================================================
RCS file: /cvsroot/src/sys/netinet6/in6.c,v
retrieving revision 1.180
diff -u -r1.180 in6.c
--- in6.c       2 Dec 2014 19:36:58 -0000       1.180
+++ in6.c       18 Feb 2015 19:39:39 -0000
@@ -2341,7 +2341,7 @@
 
 /* Convert sockaddr_in to sockaddr_in6 in v4 mapped addr format. */
 void
-in6_sin_2_v4mapsin6(struct sockaddr_in *sin, struct sockaddr_in6 *sin6)
+in6_sin_2_v4mapsin6(const struct sockaddr_in *sin, struct sockaddr_in6 *sin6)
 {
        memset(sin6, 0, sizeof(*sin6));
        sin6->sin6_len = sizeof(struct sockaddr_in6);
Index: in6.h
===================================================================
RCS file: /cvsroot/src/sys/netinet6/in6.h,v
retrieving revision 1.82
diff -u -r1.82 in6.h
--- in6.h       20 Jan 2015 21:27:36 -0000      1.82
+++ in6.h       18 Feb 2015 19:39:39 -0000
@@ -770,7 +770,7 @@
 struct cmsghdr;
 
 void   in6_sin6_2_sin(struct sockaddr_in *, struct sockaddr_in6 *);
-void   in6_sin_2_v4mapsin6(struct sockaddr_in *, struct sockaddr_in6 *);
+void   in6_sin_2_v4mapsin6(const struct sockaddr_in *, struct sockaddr_in6 *);
 void   in6_sin6_2_sin_in_sock(struct sockaddr *);
 void   in6_sin_2_v4mapsin6_in_sock(struct sockaddr **);
 


Home | Main Index | Thread Index | Old Index