Source-Changes archive

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

CVS commit: othersrc/external/bsd/httpdev



Module Name:    othersrc
Committed By:   agc
Date:           Wed Feb 15 04:38:06 UTC 2012

Update of /cvsroot/othersrc/external/bsd/httpdev
In directory ivanova.netbsd.org:/tmp/cvs-serv2020

Log Message:
httpdev is a (very) small utility which allows a remote file to appear
as a local one, just like iscsi-initiator(8).  However, unlike iSCSI,
httpdev uses HTTP as a transport, so the remote end only requires a
web server.  The local end just requires the ability to issue
partial-range HTTP commands and read responses.  To do that, I wrote a
minimalist HTTP client library, although any such library could be
used.  Again, in contrast to iSCSI, no special protocol is used, there
is no encapsulation of SCSI commands, and no framing of blocks, and no
needless synthesis of SCSI commands in the initiator, or
interpretation of SCSI commands in the target.  Discovery requires no
login - either one can access a file on a webserver, or one can't.

To illustrate its use, the following commands should show how to use
the daily ISO images on nyftp to be read as an ISO image on the local
machine.

# httpdev 
http://nyftp.netbsd.org/pub/NetBSD-daily/HEAD/201202061530Z/iso/NetBSD-5.99.64-amd64.iso
 /mnt &
# ls -al /mnt/nyftp.netbsd.org/
total 18
drwxr-xr-x  2 agc   agc         1024 Feb 14 05:51 .
drwxr-xr-x  2 root  wheel          0 Dec 31  1969 ..
lrw-r--r--  1 agc   agc           12 Feb 14 05:51 address -> 128.59.23.63
lrw-r--r--  1 agc   agc           16 Feb 14 05:51 hostname -> nyftp.netbsd.org
lrw-r--r--  1 agc   agc            4 Feb 14 05:51 port -> http
lrw-r--r--  1 agc   agc           14 Feb 14 05:51 product -> NetBSD httpdev
-rw-r--r--  1 agc   agc    356603904 Feb 14 05:51 storage
lrw-r--r--  1 agc   agc           16 Feb 14 05:51 targetname -> nyftp.netbsd.org
lrw-r--r--  1 agc   agc            6 Feb 14 05:51 vendor -> NetBSD
lrw-r--r--  1 agc   agc           18 Feb 14 05:51 version -> bozohttpd-20100920
# file /mnt/nyftp.netbsd.org/storage 
/mnt/nyftp.netbsd.org/storage: # ISO 9660 CD-ROM filesystem data 'NETBSD_59964  
                  ' (bootable)
# vnconfig vnd0 /mnt/nyftp.netbsd.org/storage 
# mount -rt cd9660 /dev/vnd0a /cdrom
# ls -al /cdrom
total 6467
drwxr-xr-x  17 611   wheel     4096 Dec 31  1969 .
drwxr-xr-x  23 root  wheel      512 Jan  2 19:53 ..
drwxr-xr-x   4 611   wheel     2048 Feb  6 09:21 amd64
drwxr-xr-x   2 611   wheel     6144 Feb  6 09:04 bin
-r--r--r--   1 611   wheel    75120 Feb  6 09:25 boot
-rw-r--r--   1 611   wheel      555 Feb  6 09:25 boot.cfg
drwxr-xr-x   2 611   wheel     2048 Feb  6 09:25 dev
drwxr-xr-x  26 611   wheel    12288 Feb  6 09:25 etc
-r-xr-xr-x   1 611   wheel     3082 Feb  6 09:25 install.sh
drwxr-xr-x   2 611   wheel    10240 Feb  6 09:05 lib
drwxr-xr-x   3 611   wheel     2048 Feb  6 08:41 libdata
drwxr-xr-x   4 611   wheel     2048 Feb  6 09:25 libexec
drwxr-xr-x   2 611   wheel     2048 Feb  6 08:41 mnt
drwxr-xr-x   2 611   wheel     2048 Feb  6 09:25 mnt2
-rw-r--r--   1 611   wheel  6175009 Feb  6 09:25 netbsd
drwxr-xr-x   2 611   wheel    18432 Feb  6 09:05 sbin
drwxr-xr-x   3 611   wheel     2048 Feb  6 08:49 stand
-rwxr-xr-x   1 611   wheel   180679 Feb  6 09:25 sysinst
-rwxr-xr-x   1 611   wheel    29983 Feb  6 09:25 sysinstmsgs.de
-rwxr-xr-x   1 611   wheel    28954 Feb  6 09:25 sysinstmsgs.es
-rwxr-xr-x   1 611   wheel    29458 Feb  6 09:25 sysinstmsgs.fr
-rwxr-xr-x   1 611   wheel    25761 Feb  6 09:25 sysinstmsgs.pl
drwxr-xr-x   2 611   wheel     2048 Feb  6 09:25 targetroot
drwxr-xr-x   2 611   wheel     2048 Feb  6 08:41 tmp
drwxr-xr-x   8 611   wheel     2048 Feb  6 09:25 usr
drwxr-xr-x   2 611   wheel     2048 Feb  6 09:25 var
#

httpdev uses refuse(3) and the virtdir(3) routines, and a small http
client library I wrote.  If that was replaced with libcurl, then
httpdev could also take advantage of https (assuming we trust the
CAs...)

As for size:

% size ./httpdev
   text   data    bss     dec      hex   filename
  15065   1328   1128   17521   0x4471   ./httpdev
%

If someone were wanting to distribute a new release of an operating
system, httpdev could be very useful for accessing ISO images on a
central webserver, for example. Just saying...

Status:

Vendor Tag:     CROOKS
Release Tags:   httpdev-base
                
N othersrc/external/bsd/httpdev/Makefile
N othersrc/external/bsd/httpdev/dist/httpdev.8
N othersrc/external/bsd/httpdev/dist/Makefile
N othersrc/external/bsd/httpdev/dist/http.c
N othersrc/external/bsd/httpdev/dist/http.h
N othersrc/external/bsd/httpdev/dist/virtdir.c
N othersrc/external/bsd/httpdev/dist/virtdir.h
N othersrc/external/bsd/httpdev/dist/main.c
N othersrc/external/bsd/httpdev/sbin/Makefile

No conflicts created by this import




Home | Main Index | Thread Index | Old Index