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