X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=common-src%2Fdgram.h;h=84277b8a9d7bae6c036a6edcdf85873e7950eb7d;hb=3e9b502276de9d7e44246f164b39f365765d00c1;hp=6a58346f632f8dd515361dbe64b015c6c217e926;hpb=3ab887b9bc819a846c75dd7f2ee5d41fac22b19f;p=debian%2Famanda diff --git a/common-src/dgram.h b/common-src/dgram.h index 6a58346..84277b8 100644 --- a/common-src/dgram.h +++ b/common-src/dgram.h @@ -1,6 +1,6 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver - * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 1991-1999 University of Maryland at College Park * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -25,7 +25,7 @@ * University of Maryland at College Park */ /* - * $Id: dgram.h,v 1.6.2.2.4.1.2.1 2002/03/24 19:23:23 jrjackson Exp $ + * $Id: dgram.h,v 1.15 2006/05/25 01:47:11 johnfranks Exp $ * * interface for datagram module */ @@ -44,21 +44,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 *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); #endif /* ! DGRAM_H */