X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=para.h;h=e4e9a53dd96c740e2178b9d439cf8ed6e790ffb3;hp=fcc24746be9b18d5460292b42504898106131689;hb=165a3886ab506f4c13eac4f178a58493432a00ec;hpb=002731cd3938f3be6b71651e56c062af1adcdec0 diff --git a/para.h b/para.h index fcc24746..e4e9a53d 100644 --- a/para.h +++ b/para.h @@ -183,7 +183,7 @@ extern const char *status_item_list[]; int stat_item_valid(const char *item); int stat_line_valid(const char *); void stat_client_write(const char *msg, int itemnum); -int stat_client_add(int fd, long unsigned mask); +int stat_client_add(int fd, uint64_t mask); __printf_2_3 void para_log(int, const char*, ...); @@ -230,7 +230,8 @@ static inline long int para_random(unsigned max) } /** Round up x to a multiple of y */ -#define ROUND_UP(x, y) (((x) + ((y) - 1) / (y)) * (y)) +#define ROUND_UP(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) + /** Get the size of an array */ #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) @@ -249,3 +250,8 @@ static inline long int para_random(unsigned max) * horribly for characters which have their most significant bit set. */ #define para_isspace(c) isspace((int)(unsigned char)(c)) + +/** Data that indicates an eof-condition for a fec-encoded stream. */ +#define FEC_EOF_PACKET "\xec\x0d\xcc\xfe\0\0\0\0" \ + "\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0" +#define FEC_EOF_PACKET_LEN 32