Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* mount() returns bizarre errno
@ 1994-01-03 23:37 John Hascall
  1994-01-04  6:48 ` John Hascall
  1994-01-05 13:22 ` Ezra Peisach
  0 siblings, 2 replies; 3+ messages in thread
From: John Hascall @ 1994-01-03 23:37 UTC (permalink / raw)


This is on a DEC 3000/300 running:
   DEC OSF/1 V1.3 (Rev. 111); Sun Dec 12 11:31:43 CST 1993
   DEC OSF/1 V1.3 Worksystem Software (Rev. 111)

I have an application which calls mount() which I am attempting to port
from Ultrix to OSF/1 and the mount() routine is returning errno=46
     EPFNOSUPPORT ``Protocol family not supported''
which is, of course, not mentioned in the man page... :-(

The arguments to mount are:

     mount(MOUNT_NFS, "/nfs/fs-10/u4", M_NOSUID, &nfs_args);

The directory exists (ls -ldg /nfs/fs-10/u4):
drwxrwxrwx   2 root     system       512 Jan 03 00:53 /nfs/fs-10/u4

And the structure nfs_args contains:
 addr
  sin_family = 2
  sin_port   = 2049
  sin_addr   = 129.186.160.160
 fh          = 221500008003000040f29d5b8003000040f29d5b000000000000000000000000
 flags       = 0000003f
 rsize       = 4096
 wsize       = 4096
 timeo       = 8
 retrans     = 7
 hostname    = "fs-10.iastate.edu"
 acregmin    = 3
 acregmax    = 60
 acdirmin    = 30
 acdirmax    = 60
 netname     = "fs-10.iastate.edu"
 pathconf    = 14002bcf0 (pointer to zero'd struct pathcnf)
 (The server fs-10 is running Ultrix 4.2a (hence the fh format above.)

All of which look OK to me?

Any clues would be much appreciated...
(PS, I can mount this filesystem on this dir using the mount command,
but I really don't want to modify the application to fork&exec it
if I can avoid it).

Thanks,
John
-- 
John Hascall                   ``An ill-chosen word is the fool's messenger.''
Systems Software Engineer
Project Vincent
Iowa State University Computation Center  +  Ames, IA  50011  +  515/294-9551


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mount() returns bizarre errno
  1994-01-03 23:37 mount() returns bizarre errno John Hascall
@ 1994-01-04  6:48 ` John Hascall
  1994-01-05 13:22 ` Ezra Peisach
  1 sibling, 0 replies; 3+ messages in thread
From: John Hascall @ 1994-01-04  6:48 UTC (permalink / raw)


In article <CJ2uxr.C0w@news.iastate.edu> john@iastate.edu (John Hascall) writes:
}I have an application which calls mount() which I am attempting to port
}from Ultrix to OSF/1 and the mount() routine is returning errno=46
}     EPFNOSUPPORT ``Protocol family not supported''
}which is, of course, not mentioned in the man page... :-(
}
}And the structure nfs_args contains:
} addr
}  sin_family = 2
}  sin_port   = 2049
}  sin_addr   = 129.186.160.160
     :
     :

Thanks to Dave King @ DEC for pointing out this little OSF/1
perversion in /usr/include/netinet/in.h:

#if     defined(_SOCKADDR_LEN) || defined(_KERNEL)
struct sockaddr_in {
        u_char  sin_len;
        u_char  sin_family;
        u_short sin_port;
        struct  in_addr sin_addr;
        char    sin_zero[8];
};
#else
struct sockaddr_in {
        u_short sin_family;
        u_short sin_port;
        struct  in_addr sin_addr;
        char    sin_zero[8];
};
#endif

John
-- 
John Hascall                   ``An ill-chosen word is the fool's messenger.''
Systems Software Engineer
Project Vincent
Iowa State University Computation Center  +  Ames, IA  50011  +  515/294-9551


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mount() returns bizarre errno
  1994-01-03 23:37 mount() returns bizarre errno John Hascall
  1994-01-04  6:48 ` John Hascall
@ 1994-01-05 13:22 ` Ezra Peisach
  1 sibling, 0 replies; 3+ messages in thread
From: Ezra Peisach @ 1994-01-05 13:22 UTC (permalink / raw)


In article <CJ2uxr.C0w@news.iastate.edu> john@iastate.edu (John Hascall) writes:

>I have an application which calls mount() which I am attempting to port
>from Ultrix to OSF/1 and the mount() routine is returning errno=46
>     EPFNOSUPPORT ``Protocol family not supported''
>which is, of course, not mentioned in the man page... :-(
>
>The arguments to mount are:
>
>     mount(MOUNT_NFS, "/nfs/fs-10/u4", M_NOSUID, &nfs_args);
>

You'll love the answer to this one. OSF on DEC supports bith BSD4.3 and
BSD4.4 network structures. For the most part programs don't care which
you use, but for using mount - you need the BSD4.4 one....

I placed the following in my program before the header files and all
worked:

/* The following hack is required for OSF/1 on the alpha as it turns on the
   BSD 4.4 network sockaddr_in which is used by the kernel NFS mount.
   See netinet/in.h.... Essentially, the len and family fields were
   merged and we were trampling over things....
   (This is for OSF 1.3)
 */
#if defined(__osf__)
#define _SOCKADDR_LEN 1
#endif


	Have fun....

	Ezra




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1994-01-05 13:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-01-03 23:37 mount() returns bizarre errno John Hascall
1994-01-04  6:48 ` John Hascall
1994-01-05 13:22 ` Ezra Peisach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox