PERFORCE change 92498 for review
Robert Watson
rwatson at FreeBSD.org
Mon Feb 27 16:24:41 PST 2006
http://perforce.freebsd.org/chv.cgi?CH=92498
Change 92498 by rwatson at rwatson_peppercorn on 2006/02/28 00:23:33
Avoid unsightly and unportable grubbing around in 32-bit fields of
struct in6_addr. Linux and Solaris have the same structure fields,
but each with their own subtly different naming conventions.
Affected files ...
.. //depot/projects/trustedbsd/openbsm/libbsm/bsm_io.c#32 edit
Differences ...
==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_io.c#32 (text+ko) ====
@@ -31,7 +31,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_io.c#31 $
+ * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_io.c#32 $
*/
#include <sys/types.h>
@@ -397,10 +397,7 @@
break;
case AU_IPv6:
- ipv6.__u6_addr.__u6_addr32[0] = ipaddr[0];
- ipv6.__u6_addr.__u6_addr32[1] = ipaddr[1];
- ipv6.__u6_addr.__u6_addr32[2] = ipaddr[2];
- ipv6.__u6_addr.__u6_addr32[3] = ipaddr[3];
+ bcopy(ipaddr, &ipv6, sizeof(ipv6));
fprintf(fp, "%s", inet_ntop(AF_INET6, &ipv6, dst,
INET6_ADDRSTRLEN));
break;
More information about the trustedbsd-cvs
mailing list