Lines Matching refs:devfd
207 int c, lock = -1, devfd = -1, err = 0, rw = -1, ns = -1, set = 0; in main() local
296 devfd = opendevice(NULL); in main()
299 devfd = opendevice(IPSTATE_NAME); in main()
301 devfd = opendevice(IPNAT_NAME); in main()
303 if (devfd == -1) in main()
308 err = setlock(devfd, lock); in main()
315 err = writenat(devfd, filename); in main()
317 err = writestate(devfd, filename); in main()
324 err = readnat(devfd, filename); in main()
326 err = readstate(devfd, filename); in main()
767 int fd, devfd; in writeall() local
786 devfd = opendevice(IPSTATE_NAME); in writeall()
787 if (devfd == -1) in writeall()
789 if (writestate(devfd, NULL)) in writeall()
791 close(devfd); in writeall()
793 devfd = opendevice(IPNAT_NAME); in writeall()
794 if (devfd == -1) in writeall()
796 if (writenat(devfd, NULL)) in writeall()
798 close(devfd); in writeall()
817 int fd, devfd; in readall() local
835 devfd = opendevice(IPSTATE_NAME); in readall()
836 if (devfd == -1) in readall()
838 if (readstate(devfd, NULL)) in readall()
840 close(devfd); in readall()
842 devfd = opendevice(IPNAT_NAME); in readall()
843 if (devfd == -1) in readall()
845 if (readnat(devfd, NULL)) in readall()
847 close(devfd); in readall()