version 1.13, 2007/12/19 01:47:00 |
version 1.14, 2010/04/28 18:22:11 |
|
|
static void unixdomainpr(struct socket *, caddr_t); |
static void unixdomainpr(struct socket *, caddr_t); |
|
|
static struct file *file, *fileNFILE; |
static struct file *file, *fileNFILE; |
static int nfiles; |
static int fcnt; |
extern kvm_t *kvmd; |
extern kvm_t *kvmd; |
|
|
void |
void |
|
|
char *filebuf; |
char *filebuf; |
struct protosw *unixsw = (struct protosw *)off; |
struct protosw *unixsw = (struct protosw *)off; |
|
|
filebuf = kvm_getfiles(kvmd, KERN_FILE, 0, &nfiles); |
filebuf = kvm_getfiles(kvmd, KERN_FILE, 0, &fcnt); |
if (filebuf == NULL) { |
if (filebuf == NULL) { |
printf("Out of memory (file table).\n"); |
printf("Out of memory (file table).\n"); |
return; |
return; |
} |
} |
file = (struct file *)(filebuf + sizeof(fp)); |
file = (struct file *)(filebuf + sizeof(fp)); |
fileNFILE = file + nfiles; |
fileNFILE = file + fcnt; |
for (fp = file; fp < fileNFILE; fp++) { |
for (fp = file; fp < fileNFILE; fp++) { |
if (fp->f_count == 0 || fp->f_type != DTYPE_SOCKET) |
if (fp->f_count == 0 || fp->f_type != DTYPE_SOCKET) |
continue; |
continue; |