From owner-freebsd-hackers Thu Feb 27 19:24:50 2003 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A9C9637B401; Thu, 27 Feb 2003 19:24:49 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5120D43F3F; Thu, 27 Feb 2003 19:24:49 -0800 (PST) (envelope-from njl@FreeBSD.org) Received: from freefall.freebsd.org (njl@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id h1S3OnNS078008; Thu, 27 Feb 2003 19:24:49 -0800 (PST) (envelope-from njl@freefall.freebsd.org) Received: (from njl@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id h1S3OndV078007; Thu, 27 Feb 2003 19:24:49 -0800 (PST) Date: Thu, 27 Feb 2003 19:24:49 -0800 (PST) From: Nate Lawson Message-Id: <200302280324.h1S3OndV078007@freefall.freebsd.org> To: current@freebsd.org, hackers@freebsd.org Subject: 64 bit endian routines Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG First, the simple question: what's the simplest cross-platform way of implementing scsi_ulto4b and scsi_4btoul (/sys/cam/scsi/scsi_all.h) for 64 bit values. GEOM (/sys/geom/geom_enc.c) implements it via a 64 bit cast in g_enc_le8. Is this the best current way? Second, anyone done work on unifying our various byte ordering macros? Besides htonl and ntohl, there are scsi_*ul*, g_enc_*, openssl/aes_locl.h, machine/endian.h, arpa/nameser.h, and I'm sure there are others. Perhaps the best thing is to add macros similar to geom_enc_* to machine/endian.h. Any ideas? Thanks, Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message