* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2011, 2012, Intel Corporation.
+ * Copyright (c) 2011, 2014, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
# include <libcfs/user-time.h>
# include <libcfs/user-prim.h>
# include <libcfs/user-mem.h>
-# include <libcfs/user-lock.h>
-# include <libcfs/user-tcpip.h>
# include <libcfs/user-bitops.h>
#endif /* __KERNEL__ */
#include "curproc.h"
-#ifndef offsetof
-# define offsetof(typ,memb) ((long)(long_ptr_t)((char *)&(((typ *)0)->memb)))
-#endif
-
#ifndef ARRAY_SIZE
#define ARRAY_SIZE(a) ((sizeof (a)) / (sizeof ((a)[0])))
#endif
# error cfs_for_each_possible_cpu is not supported by kernel!
#endif
-/* libcfs tcpip */
-int libcfs_ipif_query(char *name, int *up, __u32 *ip, __u32 *mask);
-int libcfs_ipif_enumerate(char ***names);
-void libcfs_ipif_free_enumeration(char **names, int n);
-int libcfs_sock_listen(cfs_socket_t **sockp, __u32 ip, int port, int backlog);
-int libcfs_sock_accept(cfs_socket_t **newsockp, cfs_socket_t *sock);
-void libcfs_sock_abort_accept(cfs_socket_t *sock);
-int libcfs_sock_connect(cfs_socket_t **sockp, int *fatal,
- __u32 local_ip, int local_port,
- __u32 peer_ip, int peer_port);
-int libcfs_sock_setbuf(cfs_socket_t *socket, int txbufsize, int rxbufsize);
-int libcfs_sock_getbuf(cfs_socket_t *socket, int *txbufsize, int *rxbufsize);
-int libcfs_sock_getaddr(cfs_socket_t *socket, int remote, __u32 *ip, int *port);
-int libcfs_sock_write(cfs_socket_t *sock, void *buffer, int nob, int timeout);
-int libcfs_sock_read(cfs_socket_t *sock, void *buffer, int nob, int timeout);
-void libcfs_sock_release(cfs_socket_t *sock);
-
/* libcfs watchdogs */
struct lc_watchdog;
#include <libcfs/libcfs_ioctl.h>
#include <libcfs/libcfs_prim.h>
#include <libcfs/libcfs_time.h>
-#include <libcfs/libcfs_string.h>
+#ifdef __KERNEL__
+# include <libcfs/libcfs_string.h>
+#endif /* __KERNEL__ */
#include <libcfs/libcfs_kernelcomm.h>
#include <libcfs/libcfs_workitem.h>
-#include <libcfs/libcfs_hash.h>
+#ifdef __KERNEL__
+# include <libcfs/libcfs_hash.h>
+#endif /* __KERNEL__ */
#include <libcfs/libcfs_heap.h>
#include <libcfs/libcfs_fail.h>
-#include <libcfs/params_tree.h>
/* container_of depends on "likely" which is defined in libcfs_private.h */
static inline void *__container_of(const void *ptr, unsigned long shift)