X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=common-src%2Fdgram.h;h=d791b9a9006c545ece11000228a4d7de1b33daa4;hb=HEAD;hp=01edece2089ac2143c3e7e0cd11550176c461aff;hpb=1194fb66aa28d9929c3f2bef3cc6c1c3f40a60a4;p=debian%2Famanda diff --git a/common-src/dgram.h b/common-src/dgram.h index 01edece..d791b9a 100644 --- a/common-src/dgram.h +++ b/common-src/dgram.h @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1999 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -25,7 +26,7 @@ * University of Maryland at College Park */ /* - * $Id: dgram.h,v 1.13 2001/07/13 22:38:05 jrjackson Exp $ + * $Id: dgram.h,v 1.15 2006/05/25 01:47:11 johnfranks Exp $ * * interface for datagram module */ @@ -44,18 +45,18 @@ typedef struct dgram_s { char *cur; int socket; - int len; + size_t len; char data[MAX_DGRAM+1]; } dgram_t; -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 *fmt, ...)) - __attribute__ ((format (printf, 2, 3))); -void dgram_eatline P((dgram_t *dgram)); +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); #endif /* ! DGRAM_H */