Deleted Added
full compact
kmem.c (145519) kmem.c (153881)
1/* $FreeBSD: head/contrib/ipfilter/lib/kmem.c 145519 2005-04-25 18:20:15Z darrenr $ */
1/* $FreeBSD: head/contrib/ipfilter/lib/kmem.c 153881 2005-12-30 11:52:26Z guido $ */
2
3/*
4 * Copyright (C) 1993-2001 by Darren Reed.
5 *
6 * See the IPFILTER.LICENCE file for details on licencing.
7 */
8/*
9 * kmemcpy() - copies n bytes from kernel memory into user buffer.
10 * returns 0 on success, -1 on error.
11 */
12
13#include <stdio.h>
14#include <sys/param.h>
15#include <sys/types.h>
16#include <sys/uio.h>
17#include <unistd.h>
18#include <string.h>
19#include <fcntl.h>
20#include <sys/file.h>
2
3/*
4 * Copyright (C) 1993-2001 by Darren Reed.
5 *
6 * See the IPFILTER.LICENCE file for details on licencing.
7 */
8/*
9 * kmemcpy() - copies n bytes from kernel memory into user buffer.
10 * returns 0 on success, -1 on error.
11 */
12
13#include <stdio.h>
14#include <sys/param.h>
15#include <sys/types.h>
16#include <sys/uio.h>
17#include <unistd.h>
18#include <string.h>
19#include <fcntl.h>
20#include <sys/file.h>
21#if !defined(__sgi) && !defined(__hpux) && !defined(__osf__) && !defined(linux)
21#if !defined(__sgi) && !defined(__hpux) && !defined(__osf__) && !defined(linux) && !defined(_AIX51)
22#include <kvm.h>
23#endif
24#include <fcntl.h>
25#include <sys/socket.h>
26#include <sys/ioctl.h>
27#include <netinet/in.h>
28#include <arpa/inet.h>
29#include <netinet/in_systm.h>

--- 9 unchanged lines hidden (view full) ---

39#include "kmem.h"
40
41#ifndef __STDC__
42# define const
43#endif
44
45#if !defined(lint)
46static const char sccsid[] = "@(#)kmem.c 1.4 1/12/96 (C) 1992 Darren Reed";
22#include <kvm.h>
23#endif
24#include <fcntl.h>
25#include <sys/socket.h>
26#include <sys/ioctl.h>
27#include <netinet/in.h>
28#include <arpa/inet.h>
29#include <netinet/in_systm.h>

--- 9 unchanged lines hidden (view full) ---

39#include "kmem.h"
40
41#ifndef __STDC__
42# define const
43#endif
44
45#if !defined(lint)
46static const char sccsid[] = "@(#)kmem.c 1.4 1/12/96 (C) 1992 Darren Reed";
47static const char rcsid[] = "@(#)Id: kmem.c,v 1.16.2.1 2004/06/20 10:25:58 darrenr Exp";
47static const char rcsid[] = "@(#)$Id: kmem.c,v 1.16.2.2 2005/06/12 07:18:41 darrenr Exp $";
48#endif
49
50
51
48#endif
49
50
51
52#if !defined(__sgi) && !defined(__hpux) && !defined(__osf__) && !defined(linux)
52#if !defined(__sgi) && !defined(__hpux) && !defined(__osf__) && \
53 !defined(linux) && !defined(_AIX51)
53/*
54 * For all platforms where there is a libkvm and a kvm_t, we use that...
55 */
56static kvm_t *kvm_f = NULL;
57
58#else
59/*
60 *...and for the others (HP-UX, IRIX, Tru64), we have to provide our own.

--- 143 unchanged lines hidden ---
54/*
55 * For all platforms where there is a libkvm and a kvm_t, we use that...
56 */
57static kvm_t *kvm_f = NULL;
58
59#else
60/*
61 *...and for the others (HP-UX, IRIX, Tru64), we have to provide our own.

--- 143 unchanged lines hidden ---