-int dgram_bind P((dgram_t *dgram, int *portp));
-void dgram_socket P((dgram_t *dgram, int sock));
-int dgram_send P((char *hostname, int port, dgram_t *dgram));
-int dgram_send_addr P((struct sockaddr_in addr, dgram_t *dgram));
-int dgram_recv P((dgram_t *dgram, int timeout, struct sockaddr_in *fromaddr));
-void dgram_zero P((dgram_t *dgram));
-void dgram_cat P((dgram_t *dgram, const char *str));
-void dgram_eatline P((dgram_t *dgram));
-
-extern dgram_t *debug_dgram_alloc P((char *c, int l));
-
-#define dgram_alloc() debug_dgram_alloc(__FILE__, __LINE__)
+int dgram_bind(dgram_t *dgram, sa_family_t family, in_port_t *portp);
+void dgram_socket(dgram_t *dgram, int sock);
+int dgram_send_addr(sockaddr_union *addr, dgram_t *dgram);
+ssize_t dgram_recv(dgram_t *dgram, int timeout,
+ sockaddr_union *fromaddr);
+void dgram_zero(dgram_t *dgram);
+int dgram_cat(dgram_t *dgram, const char *fmt, ...)
+ G_GNUC_PRINTF(2,3);
+void dgram_eatline(dgram_t *dgram);