datagram.h

Go to the documentation of this file.
00001 /*
00002 Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
00003 Copyright (C) 2005- The University of Notre Dame
00004 This software is distributed under the GNU General Public License.
00005 See the file COPYING for details.
00006 */
00007 
00008 #ifndef DATAGRAM_H
00009 #define DATAGRAM_H
00010 
00061 #define DATAGRAM_ADDRESS_MAX 48
00062 
00064 #define DATAGRAM_PAYLOAD_MAX 65536
00065 
00067 #define DATAGRAM_PORT_ANY 0
00068 
00070 #define DATAGRAM_ADDRESS_BROADCAST "255.255.255.255"
00071 
00076 struct datagram *datagram_create(int port);
00077 
00081 void datagram_delete(struct datagram *d);
00082 
00092 int datagram_recv(struct datagram *d, char *data, int length, char *addr, int *port, int timeout);
00093 
00102 int datagram_send(struct datagram *d, const char *data, int length, const char *addr, int port);
00103 
00108 int datagram_fd(struct datagram *d);
00109 
00110 #endif

Generated on Sun Aug 14 23:01:35 2011 for cctools by  doxygen 1.6.1