sanei_udp.h

00001 /* sane - Scanner Access Now Easy.
00002  * Copyright (C) 2007 Tower Technologies
00003  * Author: Alessandro Zummo <a.zummo@towertech.it>
00004  * This file is part of the SANE package.
00005  *
00006  * This file is in the public domain.  You may use and modify it as
00007  * you see fit, as long as this copyright message is included and
00008  * that there is an indication as to what modifications have been
00009  * made (if any).
00010  *
00011  * SANE is distributed in the hope that it will be useful, but WITHOUT
00012  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00013  * FITNESS FOR A PARTICULAR PURPOSE.
00014  *
00015  * Header file for UDP/IP communications. 
00016  */
00017 
00018 #ifndef sanei_udp_h
00019 #define sanei_udp_h
00020 
00021 #include <sane/sane.h>
00022 
00023 #include <netinet/in.h>
00024 #include <netdb.h>
00025 
00026 extern SANE_Status sanei_udp_open(const char *host, int port, int *fdp);
00027 extern SANE_Status sanei_udp_open_broadcast(int *fdp);
00028 extern void sanei_udp_close(int fd);
00029 extern ssize_t sanei_udp_write(int fd, const u_char * buf, int count);
00030 extern ssize_t sanei_udp_read(int fd, u_char * buf, int count);
00031 extern ssize_t sanei_udp_write_broadcast(int fd, int port, const u_char * buf, int count);
00032 extern ssize_t sanei_udp_recvfrom(int fd, u_char * buf, int count, char **fromp);
00033 
00034 #endif /* sanei_udp_h */

Generated on Wed Nov 5 02:30:50 2008 for SANEI by  doxygen 1.5.1