From mboxrd@z Thu Jan 1 00:00:00 1970
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fee84,4f0811c861055356,start
X-Google-Attributes: gidfee84,public
From: Ross Maloney
Subject: Help to crawl into the file system
Date: 1997/10/10
Message-ID: <343DF14A.9FB4DCBA@domain.com>#1/1
X-Deja-AN: 279293381
X-Priority: 3 (Normal)
X-Complaints-To: usenet@alpha10.curtin.edu.au
X-Trace: alpha10.curtin.edu.au 876474698 7906 (None) 134.7.108.30
Organization: Curtin University of Technology
Newsgroups: comp.unix.osf.osf1
Hi,
I need to create a program on DUnix that acts as an extension of the
file system. The program, running in the background, is to mount at a
particular point in the file system and then respond to DUnix system
requests, much in the fashion of NFS. Could somebody help me in
overcoming these coding difficulties:
o establishing the mount via the system procedure;
o showing how DUnix would send service requests (together with their
format) to, and expect responses from, this program - may be by
a reference to the documentation set.
My suspicion is that sockets are involved in this process.
I am using DUnix v3.2c, compiling with gcc v2.7.2 and have access to
V3.2C Online Documentation.
In relation to the first of these questions, the following program was
written:
#include
#include
#include
#include
#include
main()
{
int mnt_type, mnt_flag;
struct nfs_args mnt_structure;
struct sockaddr_in *sock;
mnt_type = MOUNT_NFS3;
mnt_flag = M_NOEXEC; /* not very ambitious */
bzero((char *)&mnt_structure, sizeof(mnt_structure));
mnt_structure.addr = sock;
mnt_structure.fh = "/";
mnt_structure.flags = M_GRPID;
mnt_structure.wsize = 8192;
mnt_structure.rsize = 8192;
mnt_structure.timeo = 100; /* 10s timeout */
mnt_structure.retrans = 0;
mnt_structure.hostname = "rwin";
mnt_structure.netname = "net";
printf("mount return = %d\n",
mount(mnt_type, "/mnt", mnt_flag, (caddr_t)&mnt_structure));
printf("mount: [%d] %s\n", errno, strerror(errno));
}
When run, a "[14] Bad address" error response was obtained. What am I
doing wrong?
Ross
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
Ross Maloney = voice: +61 (08) 9364 1927
+
Graduate Student =
Department of Computer Science +
Curtin University of Technology = email: x409@cs.curtin.edu.au
Perth, WA. +
AUSTRALIA =
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=