From owner-freebsd-hackers Wed Jun 18 11:48:34 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id LAA03088 for hackers-outgoing; Wed, 18 Jun 1997 11:48:34 -0700 (PDT) Received: from ecsl.cs.sunysb.edu (sequoia.cs.sunysb.edu [130.245.14.12]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id LAA03079 for ; Wed, 18 Jun 1997 11:48:26 -0700 (PDT) Received: (from yifeng@localhost) by ecsl.cs.sunysb.edu (8.6.12/8.6.9) id OAA15814 for freebsd-hackers@FreeBSD.org; Wed, 18 Jun 1997 14:48:15 -0400 From: Yi-feng Li Message-Id: <199706181848.OAA15814@ecsl.cs.sunysb.edu> Subject: no subject (file transmission) To: freebsd-hackers@FreeBSD.org Date: Wed, 18 Jun 1997 14:48:14 -0400 (EDT) X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-hackers@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk Dear Sir, My name is Yi-Feng Li. I am a graduate student, studying in the SUNY at Stony Brook. Currently, I am doing my master project about IP Firewall on the BSD 2.1.6. To do this project, I have to modify the kernel source code. My major job is working on the /sys/netinet/ directory. According to the lack of knowledge and experience, I have getten some problems and can not solve. I hope you can help me. My problems are as followings: 1) How to get the system time and user time, used by a process, in the kernel? I have tried to use getrusage() function in the /sys/kern/kern_resource.c, but it won't work. I can not reboot the machine successfully. I bet I have done something wrong; neither this is not a good way to do it nor I do not use it currectly. 2) How to open a file and write messages into the file in the kernel? Your help will be appreciated!! Thanks!! Yi-Feng Li yifeng@ecsl.cs.sunysb.edu