projects
/
debian
/
amanda
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Upstream version 2.5.1
[debian/amanda]
/
common-src
/
packet.h
diff --git
a/common-src/packet.h
b/common-src/packet.h
index fb126261037e4319845a9b67c23977ad6ef12663..f508b3fd6324cc14c37b42229356db9451c37a77 100644
(file)
--- a/
common-src/packet.h
+++ b/
common-src/packet.h
@@
-24,40
+24,37
@@
* file named AUTHORS, in the root directory of this distribution.
*/
/*
* file named AUTHORS, in the root directory of this distribution.
*/
/*
- * $Id: packet.h,v 1.
6 2004/02/13 14:00:35 martinea
Exp $
+ * $Id: packet.h,v 1.
8 2006/05/25 01:47:12 johnfranks
Exp $
*
* interfaces for modifying amanda protocol packet type
*/
#ifndef PACKET_H
#define PACKET_H
*
* interfaces for modifying amanda protocol packet type
*/
#ifndef PACKET_H
#define PACKET_H
-/*
- * We limit our body length to 50k.
- */
-#define MAX_PACKET (50*1024)
-
typedef enum { P_REQ = 0, P_REP = 1, P_PREP = 2, P_ACK = 3, P_NAK = 4 } pktype_t;
typedef struct {
typedef enum { P_REQ = 0, P_REP = 1, P_PREP = 2, P_ACK = 3, P_NAK = 4 } pktype_t;
typedef struct {
- pktype_t type; /* type of packet */
- char body[MAX_PACKET]; /* body of packet */
+ pktype_t type; /* type of packet */
+ char * body; /* body of packet */
+ size_t size;
+ size_t packet_size;
} pkt_t;
/*
* Initialize a packet
*/
} pkt_t;
/*
* Initialize a packet
*/
-void pkt_init
P((pkt_t *, pktype_t, const char *, ...)
)
+void pkt_init
(pkt_t *, pktype_t, const char *, ...
)
__attribute__ ((format (printf, 3, 4)));
/*
* Append data to a packet
*/
__attribute__ ((format (printf, 3, 4)));
/*
* Append data to a packet
*/
-void pkt_cat
P((pkt_t *, const char *, ...)
)
+void pkt_cat
(pkt_t *, const char *, ...
)
__attribute__ ((format (printf, 2, 3)));
/*
* Convert the packet type to and from a string
*/
__attribute__ ((format (printf, 2, 3)));
/*
* Convert the packet type to and from a string
*/
-const char *pkt_type2str
P((pktype_t)
);
-pktype_t pkt_str2type
P((const char *)
);
+const char *pkt_type2str
(pktype_t
);
+pktype_t pkt_str2type
(const char *
);
#endif /* PACKET_H */
#endif /* PACKET_H */