SANEI 1.3.1.72-4c77c
sanei_tcp.h
1/* sane - Scanner Access Now Easy.
2 * Copyright (C) 2006 Tower Technologies
3 * Author: Alessandro Zummo <a.zummo@towertech.it>
4 * This file is part of the SANE package.
5 *
6 * This file is in the public domain. You may use and modify it as
7 * you see fit, as long as this copyright message is included and
8 * that there is an indication as to what modifications have been
9 * made (if any).
10 *
11 * SANE is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE.
14 *
15 * Header file for TCP/IP communications.
16 */
17
18#ifndef sanei_tcp_h
19#define sanei_tcp_h
20
21#include <sane/sane.h>
22
23#ifdef HAVE_WINSOCK2_H
24#include <winsock2.h>
25#endif
26#ifdef HAVE_SYS_SOCKET_H
27#include <netinet/in.h>
28#include <netdb.h>
29#endif
30#include <sys/types.h>
31
32extern SANE_Status sanei_tcp_open(const char *host, int port, int *fdp);
33extern void sanei_tcp_close(int fd);
34extern ssize_t sanei_tcp_write(int fd, const u_char * buf, size_t count);
35extern ssize_t sanei_tcp_read(int fd, u_char * buf, size_t count);
36
37#endif /* sanei_tcp_h */