Page Menu
Home
ClusterLabs Projects
Search
Configure Global Search
Log In
Files
F3153899
csnap.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
968 B
Referenced Files
None
Subscribers
None
csnap.h
View Options
#define u8 unsigned 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)); })
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, 3:31 AM (1 d, 3 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1383314
Default Alt Text
csnap.h (968 B)
Attached To
Mode
rF Fence Agents
Attached
Detach File
Event Timeline
Log In to Comment