staging: usbip: userspace tools v1.0.0
[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 modify_match_busid(char *busid, int add);
29 int read_string(char *path, char *, size_t len);
30 int read_integer(char *path);
31 int getdevicename(char *busid, char *name, size_t len);
32 int getdriver(char *busid, int conf, int infnum, char *driver, size_t len);
33 int read_bNumInterfaces(char *busid);
34 int read_bConfigurationValue(char *busid);
35 int write_integer(char *path, int value);
36 int write_bConfigurationValue(char *busid, int config);
37 int read_bDeviceClass(char *busid);
38 int readline(int sockfd, char *str, int strlen);
39 int writeline(int sockfd, char *buff, int bufflen);