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 
00083 struct datagram *datagram_create_address(const char *address, int port);
00084 
00088 void datagram_delete(struct datagram *d);
00089 
00099 int datagram_recv(struct datagram *d, char *data, int length, char *addr, int *port, int timeout);
00100 
00109 int datagram_send(struct datagram *d, const char *data, int length, const char *addr, int port);
00110 
00115 int datagram_fd(struct datagram *d);
00116 
00117 #endif

Generated on 27 Aug 2014 for cctools by  doxygen 1.4.7