Mercurial > hg > audiostuff
diff intercom/udp.h @ 2:13be24d74cd2
import intercom-0.4.1
author | Peter Meerwald <pmeerw@cosy.sbg.ac.at> |
---|---|
date | Fri, 25 Jun 2010 09:57:52 +0200 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/intercom/udp.h Fri Jun 25 09:57:52 2010 +0200 @@ -0,0 +1,26 @@ +/* udp.h + * + * Copyright (C) DFS Deutsche Flugsicherung (2004, 2005). + * All Rights Reserved. + * + * UDP functions for IPv4 + * + * Version 0.2 + */ + +class UDP { + int local_fd; + struct sockaddr_in foreign_sock; +public: + void send_init(char *foreign_name, int foreign_port, int local_fd_); + void send(char *buf, int bytes); + void send_close(); +}; + +int UDP_recv_init(int port); + +// IP to ASCII +char *iptoa(char *buf, in_addr_t ip); + +// ASCII to IP +in_addr_t atoip(char *buf);