Page Menu
Home
ClusterLabs Projects
Search
Configure Global Search
Log In
Files
F3154285
ddsnap.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
ddsnap.h
View Options
#define u8 unsigned char
#define s8 char
#define u16 unsigned short
#define s16 short
#define s32 int
#define u32 unsigned
#define u64 unsigned long long
#define le_u32 u32
#define le_u16 u16
#define le_u64 u64
#define u64 unsigned long long
#define EFULL ENOMEM
#define PACKED __attribute__ ((packed))
static inline int readpipe(int fd, void *buffer, size_t count)
{
// printf("read %u bytes\n", count);
int n;
while (count) {
if ((n = read(fd, buffer, count)) < 1)
return n? n: -EPIPE;
buffer += n;
count -= n;
}
return 0;
}
#define writepipe write
#define outbead(SOCK, CODE, STRUCT, VALUES...) ({ \
struct { struct head head; STRUCT body; } PACKED message = \
{ { CODE, sizeof(STRUCT) }, { VALUES } }; \
writepipe(SOCK, &message, sizeof(message)); })
#define outhead(SOCK, CODE, SIZE) writepipe(SOCK, &(struct head){ CODE, SIZE }, sizeof(struct head) )
typedef unsigned long long chunk_t;
#define MAX_ADDRESS 16
struct server { u16 port; u8 type; u8 address_len; char address[MAX_ADDRESS]; } PACKED;
#ifndef HOST_NAME_MAX
#define HOST_NAME_MAX 256
#endif
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Wed, Feb 26, 11:34 AM (22 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1461867
Default Alt Text
ddsnap.h (1 KB)
Attached To
Mode
rF Fence Agents
Attached
Detach File
Event Timeline
Log In to Comment