Merge branch 'nfs-for-2.6.40' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
[pandora-kernel.git] / drivers / staging / usbip / userspace / src / utils.h
1
2 #ifdef HAVE_CONFIG_H
3 #include "../config.h"
4 #endif
5
6 #define _GNU_SOURCE
7 #include <string.h>
8 #include <sys/un.h>
9 #include <sys/types.h>
10 #include <sys/socket.h>
11
12 #include <sysfs/libsysfs.h>
13 #include <glib.h>
14 #include <unistd.h>
15 #include <stdio.h>
16 #include <sys/types.h>
17 #include <sys/stat.h>
18 #include <fcntl.h>
19 #include <stdlib.h>
20 #include <time.h>
21 #include <errno.h>
22
23
24
25 /* Be sync to kernel header */
26 #define BUS_ID_SIZE 20
27
28 int read_string(char *path, char *, size_t len);
29 int read_integer(char *path);
30 int getdevicename(char *busid, char *name, size_t len);
31 int getdriver(char *busid, int conf, int infnum, char *driver, size_t len);
32 int read_bNumInterfaces(char *busid);
33 int read_bConfigurationValue(char *busid);
34 int write_integer(char *path, int value);
35 int write_bConfigurationValue(char *busid, int config);
36 int read_bDeviceClass(char *busid);
37 int readline(int sockfd, char *str, int strlen);
38 int writeline(int sockfd, char *buff, int bufflen);