From: kcm@tca1.dl.ac.uk (Kevin Maguire)
Subject: nfswatch / pfopen
Date: 1996/01/09 [thread overview]
Message-ID: <4cun6j$nm7@mserv1.dl.ac.uk> (raw)
Hi
I'm trying to compile nfswatch4.1 (I got the pointer from
http://www.digital.com/info/misc/pub-domain-osf1.txt.html )
Code compiles fine until the link, when it tries
cc -o nfswatch dlpi.o logfile.o netaddr.o nfswatch.o nit.o pfilt.o
pktfilter.o rpcfilter.o rpcutil.o screen.o snoop.o util.o xdr.o
parsenfsfh.o -lcurses -ltermcap -lm pfopen.c /usr/lib/cmplrs/cc/cfe:
Error: pfopen.c: 1: Cannot open file /usr/examples/packetfilter/pfopen.c
for #include
This pfopen.c file doesn't exist on my DUnix 3.0 system. Taking this C
file out of the link the code links without error.
(If someone tells which package on the CD this file lives in then I
can try again.)
There is a fpopen function in libc:
~/nfswatch4.1 [146] nm /usr/lib/libc.a | grep pfopen
3091:/usr/lib/libc.a[pfopen.o]:
3099:__pfopen | 0000000000000016 | T | 0000000000000008
3102:pfopen | 0000000000000016 | T | 0000000000000008
I've no idea if the pfopen in "/usr/examples/packetfilter/pfopen.c" is any
different from that compiled into libc.
But then running nfswatch -all gives an error:
# ./nfswatch -all
./nfswatch: (null): No such file or directory
#
(There is plenty of nfs activity that should be reported incidentally).
Compiling on an IRIX5 system went fine.
Any Suggestions ? Am I missing something obvious ?
Kev
Some dbx output follows:
# dbx nfswatch
dbx version 3.11.6
Type 'help' for help.
main: 256 char *device = NULL;
(dbx) list
257 extern void nfswatch();
258
259 pname = *argv;
260
261 /*
262 * Get our host name. The default destination
263 * host is the one we're running on.
264 */
265 if (gethostname(myhost, sizeof(myhost)) < 0) {
266 error("gethostname");
267 finish(-1);
268 }
(dbx) stop at 265
[2] stop at "nfswatch.c":265
(dbx) run
[2] stopped at [main:265 ,0x120005d0c] if (gethostname(myhost, sizeof(myhost)) < 0) {
(dbx) step
[main:270 ,0x120005d54] (void) strcpy(dsthost, myhost);
(dbx) step
[main:275 ,0x120005d6c] while (--argc) {
(dbx) step
[main:487 ,0x1200064a0] switch (showwhich) {
(dbx) step
[main:489 ,0x1200064b8] showwhich = SHOWFILESYSTEM;
(dbx) step
[main:490 ,0x1200064c4] break;
(dbx) step
[main:503 ,0x120006514] (void) signal(SIGINT, finish);
(dbx) step
[main:504 ,0x12000652c] (void) signal(SIGQUIT, finish);
(dbx) step
[main:505 ,0x120006544] (void) signal(SIGTERM, finish);
(dbx) step
[main:581 ,0x12000655c] if (allintf) {
(dbx) step
[main:593 ,0x120006648] if_fd[0] = setup_pfilt_dev(&device);
(dbx) step
[setup_pfilt_dev:69 ,0x1200071a0] {
(dbx) step
[setup_pfilt_dev:73 ,0x1200071b4] short backlog = -1; /* request the most */
(dbx) step
[setup_pfilt_dev:80 ,0x1200071bc] if ((fd = pfopen(*device, 0)) < 0) {
(dbx) step
[setup_pfilt_dev:81 ,0x1200071e4] return(-1);
(dbx) step
[main:595 ,0x120006664] if (if_fd[0] < 0) {
(dbx) step
[main:596 ,0x120006670] error(device);
(dbx) step
[error:228 ,0x12000cd80] {
(dbx) step
[error:231 ,0x12000cd98] (void) sprintf(buf, "%s: %s", pname, str);
(dbx) step
[error:232 ,0x12000cdc0] (void) perror(buf);
(dbx) step
nfswatch: (null): No such file or directory
[error:233 ,0x12000cdd4] }
(dbx) where
> 0 error(str = (nil)) ["util.c":233, 0x12000cdd4]
1 main(argc = 0, argv = 0x11ffff9c8) ["nfswatch.c":596, 0x120006678]
(dbx) step
[main:597 ,0x120006684] finish(-1);
(dbx) step
[finish:241 ,0x12000cdf0] {
(dbx) step
[finish:247 ,0x12000ce04] for (i = 0; i < ninterfaces; i++) {
(dbx) step
[finish:255 ,0x12000ce6c] if (screen_inited) {
(dbx) step
[finish:269 ,0x12000cf00] if (logging) {
(dbx) step
[finish:274 ,0x12000cf44] (void) putchar('\n');
(dbx) step
[finish:276 ,0x12000cfac] if (code < 0)
(dbx) step
[finish:277 ,0x12000cfb4] (void) exit(-code);
(dbx) step
Program terminated by Trace/BPT trap
(dbx) step
program is not active
(dbx) quit
--
___________________________
_ / Kevin Maguire \ _
/ )| Higher Scientific Officer |( \
/ / | Daresbury Laboratory | \ \
_( (_ | K.Maguire@dl.ac.uk | _) )_
(((\ \> \/->____<-=-=-=-=->_____<-\/ </ /)))
(\\\\ \_/ / \ \_/ ////)
\ / \ /
\ _/ \_ /
/ / \ \
/___/ \___\
next reply other threads:[~1996-01-09 5:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-01-09 5:00 Kevin Maguire [this message]
1996-01-10 5:00 ` nfswatch / pfopen Jeffrey Mogul
1996-01-12 5:00 ` Eric Werme
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox