21 #include <sane/sane.h>
23 #ifdef HAVE_WINSOCK2_H
26 #ifdef HAVE_SYS_SOCKET_H
27 #include <netinet/in.h>
30 #ifdef HAVE_SYS_TYPES_H
31 #include <sys/types.h>
34 extern SANE_Status sanei_udp_open(
const char *host,
int port,
int *fdp);
35 extern SANE_Status sanei_udp_open_broadcast(
int *fdp);
36 extern void sanei_udp_close(
int fd);
37 extern void sanei_udp_set_nonblock(
int fd, SANE_Bool nonblock);
38 extern ssize_t sanei_udp_write(
int fd,
const u_char * buf,
int count);
39 extern ssize_t sanei_udp_read(
int fd, u_char * buf,
int count);
40 extern ssize_t sanei_udp_write_broadcast(
int fd,
int port,
const u_char * buf,
int count);
41 extern ssize_t sanei_udp_recvfrom(
int fd, u_char * buf,
int count,
char **fromp);